aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-25 23:32:57 +0000
committerOlivier Blin <blino@mageia.org>2010-11-25 23:32:57 +0000
commit734e71dcdff4d0acd7e24582ac4a32d57a91caa0 (patch)
tree6ec7e2d0e3bb31ecf5401851cd67aab613842cde /lib/Iurt
parent695cb1ed8499f0196d4bcb7b8a329f0e5dfdb78b (diff)
downloadiurt-734e71dcdff4d0acd7e24582ac4a32d57a91caa0.tar
iurt-734e71dcdff4d0acd7e24582ac4a32d57a91caa0.tar.gz
iurt-734e71dcdff4d0acd7e24582ac4a32d57a91caa0.tar.bz2
iurt-734e71dcdff4d0acd7e24582ac4a32d57a91caa0.tar.xz
iurt-734e71dcdff4d0acd7e24582ac4a32d57a91caa0.zip
simplify
Diffstat (limited to 'lib/Iurt')
-rw-r--r--lib/Iurt/Chroot.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index 57b5a68..da590ab 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -425,7 +425,6 @@ sub create_chroot {
plog('NOTIFY', "creating chroot");
plog('DEBUG', "... with packages " . join(', ', @{$opt->{packages}}));
- if (!-f $chroot_tar || link $chroot_tar, $tmp_tar) {
mkdir_p($tmp_chroot);
if (!-f $chroot_tar) {
plog("rebuild chroot tarball");
@@ -437,6 +436,8 @@ sub create_chroot {
return;
}
} else {
+ link $chroot_tar, $tmp_tar or die "FATAL: could not initialize chroot ($!)\n";
+
plog('DEBUG', "decompressing /var/log/qa from $chroot_tar in $tmp_chroot");
sudo($run, $config, '--untar', $chroot_tar, $tmp_chroot, "./var/log/qa");
@@ -473,9 +474,6 @@ sub create_chroot {
}
}
link $tmp_tar, $chroot_tar;
- } else {
- die "FATAL: could not initialize chroot ($!)\n";
- }
if (!-d $chroot || $rebuild) {
plog('DEBUG', "recreate chroot $chroot");