aboutsummaryrefslogtreecommitdiffstats
path: root/iurt2
diff options
context:
space:
mode:
authorFlorent Villard <warly@mandriva.com>2005-12-12 10:16:48 +0000
committerFlorent Villard <warly@mandriva.com>2005-12-12 10:16:48 +0000
commit8261df6789937338d2e9d5ac4a5f3b725ea3566c (patch)
treef3f6d1b5852cafbf28c71959bd70498e603b4ada /iurt2
parent10e36e869854acecb76973246c99f933a0b50e2f (diff)
downloadiurt-8261df6789937338d2e9d5ac4a5f3b725ea3566c.tar
iurt-8261df6789937338d2e9d5ac4a5f3b725ea3566c.tar.gz
iurt-8261df6789937338d2e9d5ac4a5f3b725ea3566c.tar.bz2
iurt-8261df6789937338d2e9d5ac4a5f3b725ea3566c.tar.xz
iurt-8261df6789937338d2e9d5ac4a5f3b725ea3566c.zip
Change logging directory
Diffstat (limited to 'iurt2')
-rwxr-xr-xiurt215
1 files changed, 8 insertions, 7 deletions
diff --git a/iurt2 b/iurt2
index c0ae8e2..0221068 100755
--- a/iurt2
+++ b/iurt2
@@ -202,11 +202,12 @@ 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);
-if (!-d "$local_home/$distro_tag/$my_arch/") {
+my $local_spool = "$local_home/$distro_tag/$my_arch";
+if (!-d "$local_home/$distro_tag/") {
mkdir "$local_home/$distro_tag";
- if (!-d "$local_home/$distro_tag/$my_arch") {
- mkdir "$local_home/$distro_tag/$my_arch";
- mkdir "$local_home/$distro_tag/log"
+ if (!-d $local_spool) {
+ mkdir $local_spool;
+ mkdir "$local_spool/log"
}
}
@@ -235,7 +236,7 @@ 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", $maintainer, "[REBUILD] install of build dependencies of $srpm failed on $my_arch", "build_deps_$srpm", 0, 600, $cc, "$local_home/$distro_tag/log/") or next;
+ 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;
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);
print "Compiling $srpm\n";
@@ -249,7 +250,7 @@ foreach my $t (@todo) {
$::failure->{$srpm}{$my_arch} = 1;
next
}
- system("cp $chroot/home/builder/rpm/RPMS/*/*.rpm $local_home/$distro_tag/$my_arch/") and print "ERROR: could not copy rpm files frpm $chroot/home/builder/rpm/RPMS/ to $local_home/$distro_tag/$my_arch/ ($!)\n";
+ 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()
}
@@ -384,7 +385,7 @@ sub perform_command {
print "$command\n";
my $output;
if ($log) {
- my $t = gmtime;
+ my $t = time;
$output = `$command 2>&1 | tee $log/$hash.$t`;
} else {
$output = `$command 2>&1`;