diff options
author | Pascal Terjan <pterjan@mageia.org> | 2012-04-03 23:01:57 +0000 |
---|---|---|
committer | Pascal Terjan <pterjan@mageia.org> | 2012-04-03 23:01:57 +0000 |
commit | a0444be1ed4c2ff2bc1a2f856e951e4842f0276f (patch) | |
tree | e749e45c9109e65aeef70124c68ca3bb3a707f69 | |
parent | c68c869e126064f93468be2fdbfa32a2004260ca (diff) | |
download | iurt-a0444be1ed4c2ff2bc1a2f856e951e4842f0276f.tar iurt-a0444be1ed4c2ff2bc1a2f856e951e4842f0276f.tar.gz iurt-a0444be1ed4c2ff2bc1a2f856e951e4842f0276f.tar.bz2 iurt-a0444be1ed4c2ff2bc1a2f856e951e4842f0276f.tar.xz iurt-a0444be1ed4c2ff2bc1a2f856e951e4842f0276f.zip |
Take tar out of build_chroot
-rw-r--r-- | lib/Iurt/Chroot.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/Iurt/Chroot.pm b/lib/Iurt/Chroot.pm index 5912e87..93b1363 100644 --- a/lib/Iurt/Chroot.pm +++ b/lib/Iurt/Chroot.pm @@ -308,12 +308,12 @@ sub create_chroot { if ($rebuild) { sudo($config, '--rm', '-r', $chroot); - if (!build_chroot($run, $config, $tmp_chroot, $chroot_tar, $opt)) { + if (!build_chroot($run, $config, $tmp_chroot, $opt)) { plog('NOTIFY', "creating chroot failed."); $clean->(); - sudo($config, '--rm', '-r', $chroot_tar); return; } + sudo($config, "--tar", $chroot_tar, $tmp_chroot); } if (!-d $chroot) { @@ -330,7 +330,7 @@ sub create_chroot { } sub build_chroot { - my ($run, $config, $tmp_chroot, $chroot_tar, $opt) = @_; + my ($run, $config, $tmp_chroot, $opt) = @_; plog('DEBUG', "building the chroot with " . join(', ', @{$opt->{packages}})); @@ -407,7 +407,8 @@ sub build_chroot { if (-d "$tmp_chroot/urpmi_medias/") { sudo($config, "--umount", "$tmp_chroot/urpmi_medias"); } - return sudo($config, "--tar", $chroot_tar, $tmp_chroot); + + 1; } sub check_build_chroot { |