diff options
-rwxr-xr-x | iurt2 | 49 |
1 files changed, 40 insertions, 9 deletions
@@ -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"; |