summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-22 22:02:04 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2017-12-22 22:02:04 +0000
commit9755f9276dc237907104b91198de99d625e3c607 (patch)
treecbaac7d335ba412601293a339bf6cc40c666d499
parent55c2e86d0fa97b4182bba4a43eecc076f7cce3ff (diff)
downloaddrakiso-9755f9276dc237907104b91198de99d625e3c607.tar
drakiso-9755f9276dc237907104b91198de99d625e3c607.tar.gz
drakiso-9755f9276dc237907104b91198de99d625e3c607.tar.bz2
drakiso-9755f9276dc237907104b91198de99d625e3c607.tar.xz
drakiso-9755f9276dc237907104b91198de99d625e3c607.zip
Use a single working directory specified by the user.
By adding the 'chroot' and 'build' subdirectory names ourself, we can make the clean operation a bit safer.
-rwxr-xr-xdrakclassic6
-rwxr-xr-xdraklive6
-rw-r--r--lib/MGA/DrakISO/Config.pm3
-rw-r--r--lib/MGA/DrakISO/ISOBuild.pm4
4 files changed, 7 insertions, 12 deletions
diff --git a/drakclassic b/drakclassic
index 59332fb..da1f875 100755
--- a/drakclassic
+++ b/drakclassic
@@ -128,7 +128,7 @@ drakclassic [options]
--all run all the above steps
- --clean clean installation chroot and work directory
+ --clean clean out the working directories
--config-root <dir>
root directory containing config and additional files
@@ -179,9 +179,7 @@ Built-in keys:
arch: build architecture
- builddir: directory hosting build files (initrd, loopbacks, images)
-
- chroot: directory hosting chrooted urpm queries
+ workdir: directory hosting urpmi root and all build files
repository: path to the Mandriva distribution repository (ftp/http/local)
diff --git a/draklive b/draklive
index a8ef41d..ed2a105 100755
--- a/draklive
+++ b/draklive
@@ -145,7 +145,7 @@ draklive [options]
--all run all the above steps
- --clean clean installation chroot and work directory
+ --clean clean out the working directories
--root-install (for debug) run base install of live system
--root-customise (for debug) run system customisation steps
@@ -201,9 +201,7 @@ Built-in keys:
arch: build architecture
- builddir: directory hosting build files (initrd, loopbacks, images)
-
- chroot: directory hosting chrooted installations
+ workdir: directory hosting chrooted installation and all build files
region: use the matching set of langs from the regions configuration hash
diff --git a/lib/MGA/DrakISO/Config.pm b/lib/MGA/DrakISO/Config.pm
index 2d7de1f..ce7df67 100644
--- a/lib/MGA/DrakISO/Config.pm
+++ b/lib/MGA/DrakISO/Config.pm
@@ -72,8 +72,7 @@ sub check_config {
sub complete_config {
my ($build) = @_;
- $build->{settings}{builddir} ||= '/var/lib/drakiso/build';
- $build->{settings}{chroot} ||= '/var/lib/drakiso/chroot';
+ $build->{settings}{workdir} ||= '/var/lib/drakiso';
$build->{settings}{arch} ||= chomp_(`rpm --eval '%{_target_cpu}'`);
diff --git a/lib/MGA/DrakISO/ISOBuild.pm b/lib/MGA/DrakISO/ISOBuild.pm
index 2f4bce9..ff4f60a 100644
--- a/lib/MGA/DrakISO/ISOBuild.pm
+++ b/lib/MGA/DrakISO/ISOBuild.pm
@@ -49,12 +49,12 @@ sub get_set_suffix {
sub get_builddir {
my ($build, $o_subdir) = @_;
- $build->{settings}{builddir} . '/' . $build->get_name . $build->get_set_suffix . if_($o_subdir, '/' . $o_subdir);
+ $build->{settings}{workdir} . '/build/' . $build->get_name . $build->get_set_suffix . if_($o_subdir, '/' . $o_subdir);
}
sub get_system_root {
my ($build) = @_;
- $build->{settings}{chroot} . '/' . $build->get_name . $build->get_set_suffix;
+ $build->{settings}{workdir} . '/chroot/' . $build->get_name . $build->get_set_suffix;
}
sub get_absolute_path {