diff options
author | Pascal Terjan <pterjan@gmail.com> | 2014-11-09 23:31:40 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@gmail.com> | 2014-11-09 23:32:57 +0000 |
commit | 94ccd9e7bec3d9554d7885e6a24ce3202b3134a7 (patch) | |
tree | 6265d0ea7bb63e187bb5df3a3e250c529102f824 | |
parent | 665571f648a6afaacb723633ec9a136129e5567c (diff) | |
download | iurt-94ccd9e7bec3d9554d7885e6a24ce3202b3134a7.tar iurt-94ccd9e7bec3d9554d7885e6a24ce3202b3134a7.tar.gz iurt-94ccd9e7bec3d9554d7885e6a24ce3202b3134a7.tar.bz2 iurt-94ccd9e7bec3d9554d7885e6a24ce3202b3134a7.tar.xz iurt-94ccd9e7bec3d9554d7885e6a24ce3202b3134a7.zip |
Add support for sharding the build
-rw-r--r-- | NEWS | 1 | ||||
-rwxr-xr-x | iurt | 10 |
2 files changed, 11 insertions, 0 deletions
@@ -1,4 +1,5 @@ - speed up installing packages +- support sharding the build with --num_shards and --shard_id 0.6.23 - remove old src.rpm before recreating it (mga#14243) @@ -176,6 +176,12 @@ $run{todo} = []; [ "", "build-all", 0, "", "Build all packages of the media, even if they are up to date", sub { $run{build_all} = 1 }, "Setting the full build flag" ], + [ "", "num_shards", 1, "<n>", + "Number of shards for building", + sub { ($run{num_shards}) = @_; 1 }, 'Setting number of shards' ], + [ "", "shard_id", 1, "<n>", + "Shard id (starts at 0)", + sub { ($run{shard_id}) = @_; 1 }, 'Setting shard id' ], [ "n", "no", 0, "", "Perform all the check but do not compile anything", sub { ($run{no_compile}) = 1 }, "Setting the no compilation flag" ], @@ -972,6 +978,10 @@ do { my %children; for ($i; $i < @{$run{todo}}; $i++) { my ($dir, $srpm, $status) = @{$run{todo}[$i]}; + if ($run{num_shards} && ($i % $run{num_shards}) != $run{shard_id}) { + plog('DEBUG', "Skipping $srpm, not for my shard"); + next; + } $done{$srpm} and next; $done{$srpm} = 1; check_version(\%run, $srpm, \%srpm_version) or next; |