aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt226
1 files changed, 25 insertions, 1 deletions
diff --git a/iurt2 b/iurt2
index 286cd7c..2f5691b 100755
--- a/iurt2
+++ b/iurt2
@@ -275,6 +275,17 @@ $run{todo} = [];
($run{with_flags}) = $run{with_flags} . " --without " . @_[0];
1;
}, "Adding specified extra --without parameter to rpm" ],
+ [ "", "additional-media", 1, "<path>",
+ "Includes an additional media",
+ sub {
+ $run{additional_media} ||= [];
+ push @{$run{additional_media}}, @_[0];
+ }, "Adding an additional media" ],
+ [ "", "icecream", 1, "<procs>",
+ "Enables icecream usage by <procs> procs",
+ sub {
+ $run{icecream} = @_[0];
+ }, "Enabling icecream usage" ],
);
open(my $LOG, ">&STDERR");
@@ -363,6 +374,7 @@ my %config_usage = (
'rpm-build',
'rpm-mandriva-setup-build',
'sudo',
+ 'icecream',
'urpmi',
'curl',
]
@@ -469,6 +481,14 @@ my %config_usage = (
desc => 'Name of the packages vendor',
default => 'Mandriva'
},
+ additional_media => {
+ desc => 'Additional medias to be used',
+ default => []
+ },
+ icecream => {
+ desc => 'Enabled icecream usage and uses N procs',
+ default => 0
+ },
);
config_usage() if $run{config_usage};
@@ -850,8 +870,12 @@ retry:
}
my ($srpm_name) = $srpm =~ /(?:.*:)?(.*)-[^-]+-[^-]+\.src\.rpm$/;
+ my $icecream;
+ if ($run{icecream}) {
+ $icecream = "RPM_BUILD_NCPUS=$run{icecream}";
+ }
- if (!perform_command(qq(TMP=/home/$luser/tmp/ $sudo chroot $chroot_tmp /bin/su - $luser -c "$command"),
+ if (!perform_command(qq($sudo chroot $chroot_tmp /bin/su - $luser -c "TMP=/home/$luser/tmp/ $icecream $command"),
\%run, $config, $cache,
mail => $maintainer,
error => "[REBUILD] $srpm from $run{distro_tag} does not build correctly on $run{my_arch}",