config: fix stale live-build version in iso-preparer

using `$VERSION` as part of the default `$LB_ISO_PREPARER` means that when
you simply run `lb config` once, this variable is stored as a part of the
string, and replaced on use, but if you run `lb config` twice, it gets
replaced with a fixed version, that is then used in all subsequent builds.

let's replace with a placeholder (`@LB_VERSION@`) that can be used both in
the default, or in user strings, and will be replaced on use only.

this means that subsequent builds will always reflect the actual version
of live-build used.

Gbp-Dch: Ignore
This commit is contained in:
Lyndon Brown 2020-05-03 18:02:04 +01:00
parent 26a89a45e5
commit 9bc35759aa
3 changed files with 3 additions and 1 deletions

View File

@ -390,7 +390,7 @@ Prepare_config ()
LB_BOOTAPPEND_INSTALL="$(echo ${LB_BOOTAPPEND_INSTALL} | sed -e 's/[ \t]*$//')"
LB_ISO_APPLICATION="${LB_ISO_APPLICATION:-Debian Live}"
LB_ISO_PREPARER="${LB_ISO_PREPARER:-live-build \$VERSION; https://salsa.debian.org/live-team/live-build}"
LB_ISO_PREPARER="${LB_ISO_PREPARER:-live-build @LB_VERSION@; https://salsa.debian.org/live-team/live-build}"
LB_ISO_PUBLISHER="${LB_ISO_PUBLISHER:-Debian Live project; https://wiki.debian.org/DebianLive; debian-live@lists.debian.org}"
LB_ISO_VOLUME="${LB_ISO_VOLUME:-Debian ${LB_DISTRIBUTION} \$(date $DATE_UTC_OPTION +%Y%m%d-%H:%M)}"

View File

@ -88,6 +88,7 @@ fi
if [ -n "${LB_ISO_PREPARER}" ] && [ "${LB_ISO_PREPARER}" != "none" ]
then
LB_ISO_PREPARER="$(echo "${LB_ISO_PREPARER}" | sed "s|@LB_VERSION@|${VERSION}|")"
XORRISO_OPTIONS="${XORRISO_OPTIONS} -p \"${LB_ISO_PREPARER}\""
fi

View File

@ -79,6 +79,7 @@ fi
if [ -n "${LB_ISO_PREPARER}" ] && [ "${LB_ISO_PREPARER}" != "none" ]
then
LB_ISO_PREPARER="$(echo "${LB_ISO_PREPARER}" | sed "s|@LB_VERSION@|${VERSION}|")"
XORRISO_OPTIONS="${XORRISO_OPTIONS} -p \"${LB_ISO_PREPARER}\""
fi