summaryrefslogtreecommitdiff
path: root/scripts/build/chroot_package-lists
diff options
context:
space:
mode:
authorLyndon Brown <jnqnfe@gmail.com>2020-03-13 17:11:53 +0000
committerLyndon Brown <jnqnfe@gmail.com>2020-03-17 18:57:02 +0000
commitfe9195b59c9647598ecea00900edfe2678bddcac (patch)
tree91e0a0e756cabb781035d58371b5b78590dc1568 /scripts/build/chroot_package-lists
parent04d9ee0211e7cf2d5f637941ff6579b4f5462da6 (diff)
downloadvyos-live-build-fe9195b59c9647598ecea00900edfe2678bddcac.tar.gz
vyos-live-build-fe9195b59c9647598ecea00900edfe2678bddcac.zip
stagefiles: further robustify with auto filenames
as suggested by Raphaƫl rather than have fixed stagefile filename strings at all in the scripts, use `$(basename $0)` to use the name of the script (which is the same for almost all cases anyway, and the stage files are supposed to be almost exclusively unique per-script). we can thus simplify things by determining the filename for most use cases within the functions themselves. this does change the file used by a couple of scripts, affecting backwards compatibility of executing live-build upon an existing partially or fully completed build: - binary_grub-pc used "binary_grub" - chroot_includes used "includes.chroot" care had to be taken for the following cases: - there are some cases like bootstrap_cache, source_debian and bootstrap_debootstrap which are dealing with more than one file, and/or otherwise a filename that is not specific to the script itself exactly, or should not be based upon its name. - some cases like chroot_cache, bootstrap_cache and chroot_install-packages need to append something to the end of the name depending upon which pass/action mode the script is being executed with. - furthermore in the bootstrap_cache case one of the filenames is used within the bootstrap_debootstrap and thus needs very careful handling to be certain that a change in filename of bootstrap_cache does not break bootstrap_debootstrap. Gbp-Dch: Short
Diffstat (limited to 'scripts/build/chroot_package-lists')
-rwxr-xr-xscripts/build/chroot_package-lists5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/build/chroot_package-lists b/scripts/build/chroot_package-lists
index 7b3fd25ef..a069530a9 100755
--- a/scripts/build/chroot_package-lists
+++ b/scripts/build/chroot_package-lists
@@ -29,8 +29,11 @@ Echo_message "Begin queueing installation of package lists (${_PASS} pass)..."
# Requiring stage file
Require_stagefile config bootstrap
+# Set non-default stage file name (auto picked up by the functions)
+# Setting to default name with appended action name
+STAGE_FILE="$(Stagefile_name "${_PASS}")"
+
# Checking stage file
-STAGE_FILE="chroot_package-lists.${_PASS}"
Check_stagefile "${STAGE_FILE}"
# Acquire lock file