aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@gmail.com>2014-11-09 23:31:40 +0000
committerPascal Terjan <pterjan@gmail.com>2014-11-09 23:32:57 +0000
commit94ccd9e7bec3d9554d7885e6a24ce3202b3134a7 (patch)
tree6265d0ea7bb63e187bb5df3a3e250c529102f824
parent665571f648a6afaacb723633ec9a136129e5567c (diff)
downloadiurt-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--NEWS1
-rwxr-xr-xiurt10
2 files changed, 11 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index b4fef05..d50d0e7 100644
--- a/NEWS
+++ b/NEWS
@@ -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)
diff --git a/iurt b/iurt
index eb60726..b69b4f2 100755
--- a/iurt
+++ b/iurt
@@ -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;