summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-04-29 14:21:43 +0100
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-05-23 18:31:00 +0100
commitb61a93e7c26aa55623e284bca8ac19510397e848 (patch)
tree0ced51c5363ce5fed165eeeeaf5073cb1bc1aa5d
parent4cfe467c9cb86e7604d2bad0082133282938f117 (diff)
downloaddrakiso-b61a93e7c26aa55623e284bca8ac19510397e848.tar
drakiso-b61a93e7c26aa55623e284bca8ac19510397e848.tar.gz
drakiso-b61a93e7c26aa55623e284bca8ac19510397e848.tar.bz2
drakiso-b61a93e7c26aa55623e284bca8ac19510397e848.tar.xz
drakiso-b61a93e7c26aa55623e284bca8ac19510397e848.zip
Simplify working directory layout.
-rwxr-xr-xdrakclassic6
-rwxr-xr-xdraklive25
-rw-r--r--lib/MGA/DrakISO/ISOBuild.pm4
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);
}
}
diff --git a/draklive2 b/draklive2
index e6887f5..bda6303 100755
--- a/draklive2
+++ b/draklive2
@@ -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 {