diff options
author | Florent Villard <warly@mandriva.com> | 2005-12-12 13:34:20 +0000 |
---|---|---|
committer | Florent Villard <warly@mandriva.com> | 2005-12-12 13:34:20 +0000 |
commit | 5c84ef4160f9170ae5bd1b3bc85ceaa6e5f86f4c (patch) | |
tree | da9b195aba9b5dcd7885d7b16598f905c4db2849 /iurt2 | |
parent | 8261df6789937338d2e9d5ac4a5f3b725ea3566c (diff) | |
download | iurt-5c84ef4160f9170ae5bd1b3bc85ceaa6e5f86f4c.tar iurt-5c84ef4160f9170ae5bd1b3bc85ceaa6e5f86f4c.tar.gz iurt-5c84ef4160f9170ae5bd1b3bc85ceaa6e5f86f4c.tar.bz2 iurt-5c84ef4160f9170ae5bd1b3bc85ceaa6e5f86f4c.tar.xz iurt-5c84ef4160f9170ae5bd1b3bc85ceaa6e5f86f4c.zip |
Add more logs (rpm_qa, build_log)
Diffstat (limited to 'iurt2')
-rwxr-xr-x | iurt2 | 25 |
1 files changed, 14 insertions, 11 deletions
@@ -200,7 +200,7 @@ print "Checking basesystem tar\n"; my $chroot = "$local_home/chroot"; my $chroot_tar = "$chroot-$distro_tag.$my_arch.tar.gz"; -perform_command("sudo ~warly/files/cvs//mdk/soft/rpm-rebuilder/install-chroot-tar.sh cooker /mnt/BIG/distrib/$distro_version/$my_arch/media/main/ $chroot_tar $chroot 501 basesystem rpm-build urpmi", 'maintainers@mandriva.com', "[REBUILD] Creating the inital chroot for $distro_tag on $my_arch failed", 'chroot_inititialization',1); +perform_command("sudo ~warly/files/cvs//mdk/soft/rpm-rebuilder/install-chroot-tar.sh cooker /mnt/BIG/distrib/$distro_version/$my_arch/media/main/ $chroot_tar $chroot 501 basesystem rpm-build", 'maintainers@mandriva.com', "[REBUILD] Creating the inital chroot for $distro_tag on $my_arch failed", 'chroot_inititialization',1); my $local_spool = "$local_home/$distro_tag/$my_arch"; if (!-d "$local_home/$distro_tag/") { @@ -237,11 +237,12 @@ foreach my $t (@todo) { # 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", $maintainer, "[REBUILD] install of build dependencies of $srpm failed on $my_arch", "build_deps_$srpm", 0, 600, $cc, "$local_spool/log/") or next; + perform_command("sudo $chroot rpm -qa", '', "", "rpm_qa_$srpm", 60, '', 1) or next; print "Copying $srpm to $chroot\n"; - perform_command("sudo cp $dir/$srpm $chroot/home/builder/rpm/SRPMS/", 'warly@mandriva.com', "[REBUILD] cannot copy $srpm to $chroot", "copy_$srpm", 1); + perform_command("sudo cp $dir/$srpm $chroot/home/builder/rpm/SRPMS/", 'warly@mandriva.com', "[REBUILD] cannot copy $srpm to $chroot", "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"}, $maintainer, "[REBUILD] $srpm from $distro_tag does not build correctly on $my_arch", $srpm, 0, 18000, $cc, 0, 1)) { + if (!perform_command(qq{TMP=/home/builder/tmp/ sudo chroot $chroot /bin/su builder -c "rpm --rebuild /home/builder/rpm/SRPMS/$srpm"}, $maintainer, "[REBUILD] $srpm from $distro_tag does not build correctly on $my_arch", $srpm, 0, 18000, $cc, 1, 1)) { $::failure->{$srpm}{$my_arch} = 1; next } @@ -259,8 +260,9 @@ process_queue(); dump_cache(); print "ERROR: RPM with a wrong SRPM name:\n" if @wrong_rpm; +open my $file, ">$local_spool/log/wrong_srpm_names.log"; foreach (@wrong_rpm) { - print "$_->[1] -> $_->[0] (",$::rpm_srpm{$_->[1]},")\n" + print $file "$_->[1] -> $_->[0] (", $::rpm_srpm{$_->[1]},")\n"; } unlink $pidfile; @@ -384,21 +386,22 @@ sub perform_command { if ($pid) { print "$command\n"; my $output; + $::warning->{$hash}{$my_arch}{$mail}++; if ($log) { - my $t = time; - $output = `$command 2>&1 | tee $log/$hash.$t`; + $output = `$command 2>&1 | tee $log/$hash.$::warning->{$hash}{$my_arch}{$mail}.log`; } else { $output = `$command 2>&1`; } # FIXME process goes in defunct always, kill -14 should unsleep it, but not kill 9, $pid; if ($?) { - if ($::warning->{$hash}{$my_arch}{$mail} % $freq) { - sendmail($mail, $cc , $error , $output, 0, 0); - } else { - sendmail('warly@mandriva.com', '' , $error, $output, 0, 0); + if ($mail) { + if ($::warning->{$hash}{$my_arch}{$mail} % $freq) { + sendmail($mail, $cc , $error , $output, 0, 0); + } else { + sendmail('warly@mandriva.com', '' , $error, $output, 0, 0); + } } - $::warning->{$hash}{$my_arch}{$mail}++; print $output; die "FATAL iurt: $error." if $die; return 0 |