diff options
author | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-04-29 14:21:43 +0100 |
---|---|---|
committer | Martin Whitaker <mageia@martin-whitaker.me.uk> | 2018-05-23 18:31:00 +0100 |
commit | b61a93e7c26aa55623e284bca8ac19510397e848 (patch) | |
tree | 0ced51c5363ce5fed165eeeeaf5073cb1bc1aa5d | |
parent | 4cfe467c9cb86e7604d2bad0082133282938f117 (diff) | |
download | drakiso-b61a93e7c26aa55623e284bca8ac19510397e848.tar drakiso-b61a93e7c26aa55623e284bca8ac19510397e848.tar.gz drakiso-b61a93e7c26aa55623e284bca8ac19510397e848.tar.bz2 drakiso-b61a93e7c26aa55623e284bca8ac19510397e848.tar.xz drakiso-b61a93e7c26aa55623e284bca8ac19510397e848.zip |
Simplify working directory layout.
-rwxr-xr-x | drakclassic | 6 | ||||
-rwxr-xr-x | draklive2 | 5 | ||||
-rw-r--r-- | lib/MGA/DrakISO/ISOBuild.pm | 4 |
3 files changed, 3 insertions, 12 deletions
diff --git a/drakclassic b/drakclassic index f42a5b0..096459c 100755 --- a/drakclassic +++ b/drakclassic @@ -53,11 +53,7 @@ sub clean { my $build_dir = $build->get_build_dir; if (-e $build_dir) { - run_('rm', '-rf', $build_dir); - } - my $chroot_dir = $build->get_chroot_dir; - if (-e $chroot_dir) { - run_as_root('rm', '-rf', $chroot_dir); + run_as_root('rm', '-rf', $build_dir); } } @@ -55,11 +55,6 @@ sub clean { umount_all_in_root($build_dir); run_as_root('rm', '-rf', $build_dir); } - my $chroot_dir = $build->get_chroot_dir; - if (-e $chroot_dir) { - umount_all_in_root($chroot_dir); - run_as_root('rm', '-rf', $chroot_dir); - } } sub prepare_root { diff --git a/lib/MGA/DrakISO/ISOBuild.pm b/lib/MGA/DrakISO/ISOBuild.pm index 7566c0c..0785062 100644 --- a/lib/MGA/DrakISO/ISOBuild.pm +++ b/lib/MGA/DrakISO/ISOBuild.pm @@ -49,12 +49,12 @@ sub get_set_suffix { sub get_build_dir { my ($build, $o_subdir) = @_; - $build->{settings}{workdir} . '/build/' . $build->get_name . $build->get_set_suffix . if_($o_subdir, '/' . $o_subdir); + $build->{settings}{workdir} . '/' . $build->get_name . $build->get_set_suffix . if_($o_subdir, '/' . $o_subdir); } sub get_chroot_dir { my ($build) = @_; - $build->{settings}{workdir} . '/chroot/' . $build->get_name . $build->get_set_suffix; + get_build_dir($build, 'chroot'); } sub get_absolute_path { |