aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorOlivier Blin <blino@mageia.org>2010-11-25 23:27:06 +0000
committerOlivier Blin <blino@mageia.org>2010-11-25 23:27:06 +0000
commit695cb1ed8499f0196d4bcb7b8a329f0e5dfdb78b (patch)
tree585a46aaa2d93dc407497b17ac12db17902e7268 /lib
parentbf9683bb39657eadac73a481dfedf24bd1bc3150 (diff)
downloadiurt-695cb1ed8499f0196d4bcb7b8a329f0e5dfdb78b.tar
iurt-695cb1ed8499f0196d4bcb7b8a329f0e5dfdb78b.tar.gz
iurt-695cb1ed8499f0196d4bcb7b8a329f0e5dfdb78b.tar.bz2
iurt-695cb1ed8499f0196d4bcb7b8a329f0e5dfdb78b.tar.xz
iurt-695cb1ed8499f0196d4bcb7b8a329f0e5dfdb78b.zip
create tmp_chroot in one place only
Diffstat (limited to 'lib')
-rw-r--r--lib/Iurt/Chroot.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm
index a5c0f3e..57b5a68 100644
--- a/lib/Iurt/Chroot.pm
+++ b/lib/Iurt/Chroot.pm
@@ -425,7 +425,8 @@ sub create_chroot {
plog('NOTIFY', "creating chroot");
plog('DEBUG', "... with packages " . join(', ', @{$opt->{packages}}));
- if (mkdir($tmp_chroot) && (!-f $chroot_tar || link $chroot_tar, $tmp_tar)) {
+ if (!-f $chroot_tar || link $chroot_tar, $tmp_tar) {
+ mkdir_p($tmp_chroot);
if (!-f $chroot_tar) {
plog("rebuild chroot tarball");
$rebuild = 1;
@@ -452,7 +453,6 @@ sub create_chroot {
$rebuild = 1;
sudo($run, $config, '--rm', '-r', $tmp_chroot);
- mkdir $tmp_chroot;
if (!build_chroot($run, $config, $tmp_chroot, $chroot_tar, $opt)) {
plog('NOTIFY', "creating chroot failed.");
$clean->();