Message ID | 20241219110010.389690-1-felix.moessbauer@siemens.com |
---|---|
State | Accepted, archived |
Headers | show |
Series | [1/3] bootstrap: space-separate base packages | expand |
On Thu, 2024-12-19 at 12:00 +0100, 'Felix Moessbauer' via isar-users wrote: > The variable DISTRO_BOOTSTRAP_BASE_PACKAGES contains a list of base > packages that need to be included when bootstrapping. This list was > comma separated for technical reasons, which made it hard to append > or > remove from that list. Instead, we now make it space separated and > join > it by comma where needed. > > Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> > --- > meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 7 ++++--- > meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc | 7 ++++--- > 2 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > index f9dae26a..6a612852 100644 > --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc > @@ -14,8 +14,8 @@ PV = "1.0" > DEBOOTSTRAP ?= "qemu-debootstrap" > ROOTFSDIR = "${WORKDIR}/rootfs" > DISTRO_BOOTSTRAP_BASE_PACKAGES = "locales" > -DISTRO_BOOTSTRAP_BASE_PACKAGES:append:gnupg = ",gnupg" > -DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = ",ca- > certificates" > +DISTRO_BOOTSTRAP_BASE_PACKAGES:append:gnupg = " gnupg" > +DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = " ca- > certificates" > > inherit deb-dl-dir > > @@ -79,13 +79,14 @@ do_bootstrap[network] = > "${TASK_USE_NETWORK_AND_SUDO}" > > inherit compat > > +do_bootstrap[vardeps] += "DISTRO_BOOTSTRAP_BASE_PACKAGES" > do_bootstrap() { > if [ "${ISAR_ENABLE_COMPAT_ARCH}" = "1" ]; then > if [ -z "${COMPAT_DISTRO_ARCH}" ]; then > bbfatal "${DISTRO_ARCH} does not have a compat arch" > fi > fi > - debootstrap_args="--verbose --variant=minbase -- > include=${DISTRO_BOOTSTRAP_BASE_PACKAGES}" > + debootstrap_args="--verbose --variant=minbase -- > include=${@','.join(d.getVar('DISTRO_BOOTSTRAP_BASE_PACKAGES').split( > ))}" > if [ -f "${DISTRO_BOOTSTRAP_KEYRING}" ]; then > debootstrap_args="$debootstrap_args -- > keyring=${DISTRO_BOOTSTRAP_KEYRING}" > fi > diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc > b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc > index d7ddffdc..0f2e6dc9 100644 > --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc > +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc > @@ -11,8 +11,8 @@ inherit deb-dl-dir > > FILESEXTRAPATHS:append = ":${LAYERDIR_core}/recipes-core/isar- > bootstrap/files" > > -DISTRO_BOOTSTRAP_BASE_PACKAGES = "locales,apt,usrmerge" > -DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = ",ca- > certificates" > +DISTRO_BOOTSTRAP_BASE_PACKAGES = "locales apt usrmerge" > +DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = " ca- > certificates" > > BOOTSTRAP_TMPDIR = "${WORKDIR}/tempdir" > > @@ -85,13 +85,14 @@ do_bootstrap[network] = > "${TASK_USE_NETWORK_AND_SUDO}" > > DEB_DL_LOCK ?= "${DEBDIR}/${BOOTSTRAP_BASE_DISTRO}- > ${BASE_DISTRO_CODENAME}.lock" > > +do_bootstrap[vardeps] += "DISTRO_BOOTSTRAP_BASE_PACKAGES" > do_bootstrap() { > if [ "${ISAR_ENABLE_COMPAT_ARCH}" = "1" ]; then > if [ -z "${COMPAT_DISTRO_ARCH}" ]; then > bbfatal "${DISTRO_ARCH} does not have a compat arch" > fi > fi > - bootstrap_args="--verbose --variant=minbase -- > include=${DISTRO_BOOTSTRAP_BASE_PACKAGES}" > + bootstrap_args="--verbose --variant=minbase -- > include=${@','.join(d.getVar('DISTRO_BOOTSTRAP_BASE_PACKAGES').split( > ))}" > if [ -f "${DISTRO_BOOTSTRAP_KEYRING}" ]; then > bootstrap_args="$bootstrap_args -- > keyring=${DISTRO_BOOTSTRAP_KEYRING}" > cp "${DISTRO_BOOTSTRAP_KEYRING}" "${WORKDIR}/trusted.gpg.d/" > -- > 2.39.5 > Applied to next, thanks.
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc index f9dae26a..6a612852 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -14,8 +14,8 @@ PV = "1.0" DEBOOTSTRAP ?= "qemu-debootstrap" ROOTFSDIR = "${WORKDIR}/rootfs" DISTRO_BOOTSTRAP_BASE_PACKAGES = "locales" -DISTRO_BOOTSTRAP_BASE_PACKAGES:append:gnupg = ",gnupg" -DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = ",ca-certificates" +DISTRO_BOOTSTRAP_BASE_PACKAGES:append:gnupg = " gnupg" +DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = " ca-certificates" inherit deb-dl-dir @@ -79,13 +79,14 @@ do_bootstrap[network] = "${TASK_USE_NETWORK_AND_SUDO}" inherit compat +do_bootstrap[vardeps] += "DISTRO_BOOTSTRAP_BASE_PACKAGES" do_bootstrap() { if [ "${ISAR_ENABLE_COMPAT_ARCH}" = "1" ]; then if [ -z "${COMPAT_DISTRO_ARCH}" ]; then bbfatal "${DISTRO_ARCH} does not have a compat arch" fi fi - debootstrap_args="--verbose --variant=minbase --include=${DISTRO_BOOTSTRAP_BASE_PACKAGES}" + debootstrap_args="--verbose --variant=minbase --include=${@','.join(d.getVar('DISTRO_BOOTSTRAP_BASE_PACKAGES').split())}" if [ -f "${DISTRO_BOOTSTRAP_KEYRING}" ]; then debootstrap_args="$debootstrap_args --keyring=${DISTRO_BOOTSTRAP_KEYRING}" fi diff --git a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc index d7ddffdc..0f2e6dc9 100644 --- a/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc +++ b/meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc @@ -11,8 +11,8 @@ inherit deb-dl-dir FILESEXTRAPATHS:append = ":${LAYERDIR_core}/recipes-core/isar-bootstrap/files" -DISTRO_BOOTSTRAP_BASE_PACKAGES = "locales,apt,usrmerge" -DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = ",ca-certificates" +DISTRO_BOOTSTRAP_BASE_PACKAGES = "locales apt usrmerge" +DISTRO_BOOTSTRAP_BASE_PACKAGES:append:https-support = " ca-certificates" BOOTSTRAP_TMPDIR = "${WORKDIR}/tempdir" @@ -85,13 +85,14 @@ do_bootstrap[network] = "${TASK_USE_NETWORK_AND_SUDO}" DEB_DL_LOCK ?= "${DEBDIR}/${BOOTSTRAP_BASE_DISTRO}-${BASE_DISTRO_CODENAME}.lock" +do_bootstrap[vardeps] += "DISTRO_BOOTSTRAP_BASE_PACKAGES" do_bootstrap() { if [ "${ISAR_ENABLE_COMPAT_ARCH}" = "1" ]; then if [ -z "${COMPAT_DISTRO_ARCH}" ]; then bbfatal "${DISTRO_ARCH} does not have a compat arch" fi fi - bootstrap_args="--verbose --variant=minbase --include=${DISTRO_BOOTSTRAP_BASE_PACKAGES}" + bootstrap_args="--verbose --variant=minbase --include=${@','.join(d.getVar('DISTRO_BOOTSTRAP_BASE_PACKAGES').split())}" if [ -f "${DISTRO_BOOTSTRAP_KEYRING}" ]; then bootstrap_args="$bootstrap_args --keyring=${DISTRO_BOOTSTRAP_KEYRING}" cp "${DISTRO_BOOTSTRAP_KEYRING}" "${WORKDIR}/trusted.gpg.d/"
The variable DISTRO_BOOTSTRAP_BASE_PACKAGES contains a list of base packages that need to be included when bootstrapping. This list was comma separated for technical reasons, which made it hard to append or remove from that list. Instead, we now make it space separated and join it by comma where needed. Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com> --- meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 7 ++++--- meta/recipes-core/isar-mmdebstrap/isar-mmdebstrap.inc | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-)