aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2005-12-12 19:20:45 +0000
committerFlorent Villard <warly@mandriva.com>2005-12-12 19:20:45 +0000
commit6cdb99f82b4fc71801bdafe96c13d4d985927f95 (patch)
treecb50bb1f40955ff247cd879d2a41a4b7d9697849 /iurt2
parent45bb58c7a08230fdea7d206e8046eefdb0921014 (diff)
downloadiurt-6cdb99f82b4fc71801bdafe96c13d4d985927f95.tar
iurt-6cdb99f82b4fc71801bdafe96c13d4d985927f95.tar.gz
iurt-6cdb99f82b4fc71801bdafe96c13d4d985927f95.tar.bz2
iurt-6cdb99f82b4fc71801bdafe96c13d4d985927f95.tar.xz
iurt-6cdb99f82b4fc71801bdafe96c13d4d985927f95.zip
Code formatting
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt249
1 files changed, 40 insertions, 9 deletions
diff --git a/iurt2 b/iurt2
index 25821b3..4b7b210 100755
--- a/iurt2
+++ b/iurt2
@@ -226,9 +226,17 @@ foreach my $t (@todo) {
$done{$srpm} = 1;
check_version($srpm) or next;
print "iurt: installing a new chroot for $srpm in $chroot\n";
- -d $chroot and perform_command("sudo rm -rf $chroot", mail => 'warly@mandriva.com', error => "[REBUILD] Deleting of old chroot $chroot failed", hash => 'chroot_deletion', die => 1);
+ -d $chroot and perform_command("sudo rm -rf $chroot",
+ mail => 'warly@mandriva.com',
+ error => "[REBUILD] Deleting of old chroot $chroot failed",
+ hash => 'chroot_deletion',
+ die => 1);
mkdir $chroot;
- perform_command("pushd $chroot && sudo tar xvf $chroot_tar", mail => 'warly@mandriva.com', error => "[REBUILD] creating the initial chroot $chroot failed", hash => 'chroot_init', die => 1);
+ perform_command("pushd $chroot && sudo tar xvf $chroot_tar",
+ mail => 'warly@mandriva.com',
+ error => "[REBUILD] creating the initial chroot $chroot failed",
+ hash => 'chroot_init',
+ die => 1);
dump_rpmmacros("$chroot/home/builder/.rpmmacros");
@@ -244,24 +252,47 @@ foreach my $t (@todo) {
print "Installing build dependencies of $srpm...\n";
# FIXME unfortunately urpmi stalls quite often
system(qq{sudo pkill -9 -u root -f "urpmi --root $chroot"});
- perform_command("sudo urpmi -v --root $chroot --no-verify-rpm -s --auto $dir/$srpm", mail => $maintainer, error => "[REBUILD] install of build dependencies of $srpm failed on $my_arch", hash => "install_deps_$srpm", timeout => 600, cc => $cc, log => "$local_spool/log/") or next;
- perform_command("sudo chroot $chroot rpm -qa", hash => "rpm_qa_$srpm", timeout => 60, log => "$local_spool/log/") or next;
+ perform_command("sudo urpmi -v --root $chroot --no-verify-rpm -s --auto $dir/$srpm",
+ mail => $maintainer,
+ error => "[REBUILD] install of build dependencies of $srpm failed on $my_arch",
+ hash => "install_deps_$srpm",
+ timeout => 600,
+ cc => $cc,
+ log => "$local_spool/log/") or next;
+ perform_command("sudo chroot $chroot rpm -qa",
+ hash => "rpm_qa_$srpm",
+ timeout => 60,
+ log => "$local_spool/log/") or next;
print "Copying $srpm to $chroot\n";
- perform_command("sudo cp $dir/$srpm $chroot/home/builder/rpm/SRPMS/", mail => 'warly@mandriva.com', error => "[REBUILD] cannot copy $srpm to $chroot", hash => "copy_$srpm") or next;
+ perform_command("sudo cp $dir/$srpm $chroot/home/builder/rpm/SRPMS/",
+ mail => 'warly@mandriva.com',
+ error => "[REBUILD] cannot copy $srpm to $chroot",
+ hash => "copy_$srpm") or next;
print "Compiling $srpm\n";
#system(qq{sudo chroot $chroot /bin/su builder -c "mkdir rpm/RPMS/x86_64 rpm/RPMS/noarch"});
- if (!perform_command(qq{TMP=/home/builder/tmp/ sudo chroot $chroot /bin/su builder -c "rpm --rebuild /home/builder/rpm/SRPMS/$srpm"}, mail => $maintainer, error => "[REBUILD] $srpm from $distro_tag does not build correctly on $my_arch", hash => "build_$srpm", timeout => 18000, cc => $cc, log => "$local_spool/log/", freq => 1)) {
+ if (!perform_command(qq{TMP=/home/builder/tmp/ sudo chroot $chroot /bin/su builder -c "rpm --rebuild /home/builder/rpm/SRPMS/$srpm"},
+ mail => $maintainer,
+ error => "[REBUILD] $srpm from $distro_tag does not build correctly on $my_arch",
+ hash => "build_$srpm",
+ timeout => 18000,
+ cc => $cc,
+ log => "$local_spool/log/",
+ freq => 1)) {
$::failure->{$srpm}{$my_arch} = 1;
next
}
- if (!perform_command("sudo urpmi --root $chroot --no-verify-rpm --auto $chroot/home/builder/rpm/RPMS/*/*.rpm", mail => $maintainer, error => "[REBUILD] binaries packages generated from $srpm do not install correctly", hash => "binary_test_$srpm", timeout => 300, freq => 1)) {
+ if (!perform_command("sudo urpmi --root $chroot --no-verify-rpm --auto $chroot/home/builder/rpm/RPMS/*/*.rpm",
+ mail => $maintainer,
+ error => "[REBUILD] binaries packages generated from $srpm do not install correctly",
+ hash => "binary_test_$srpm",
+ timeout => 300,
+ freq => 1,
+ log => "$local_spool/log/")) {
$::failure->{$srpm}{$my_arch} = 1;
- exit;
next
}
system("cp $chroot/home/builder/rpm/RPMS/*/*.rpm $local_spool") and print "ERROR: could not copy rpm files frpm $chroot/home/builder/rpm/RPMS/ to $local_spool ($!)\n";
process_queue();
- exit;
}
print "iurt: reprocess generated packages queue\n";