public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: "'Felix Moessbauer' via isar-users" <isar-users@googlegroups.com>
To: isar-users@googlegroups.com
Cc: Felix Moessbauer <felix.moessbauer@siemens.com>
Subject: [PATCH 2/2] fix(imager): correctly expand to-be-installed package list
Date: Tue, 28 Jul 2026 10:20:10 +0200	[thread overview]
Message-ID: <20260728082010.687942-2-felix.moessbauer@siemens.com> (raw)
In-Reply-To: <20260728082010.687942-1-felix.moessbauer@siemens.com>

The local_install variable is a shell variable. By that, it has to be
explicitly passed to the heredocs that expand the variables in the outer
shell. In case of the package pre-caching, this was done on the wrong
level: inside the lockrun heredoc, but without passing it to the lockrun
heredoc. By that, the variable was effectively empty, meaning no
packages have been downloaded and cached.

The later heredoc that does the install then downloaded the packages
(instead of just taking them from the cache), which works but also does
mean the packages were never added to the downloads cache. On subsequent
offline builds, these packages were missing, breaking the build.

This fix is related to the ReproTest with -p rootless=1.

Fixes: 4fedb1ae ("add support for fully rootless builds")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
---
 meta/classes-recipe/image-tools-extension.bbclass | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/meta/classes-recipe/image-tools-extension.bbclass b/meta/classes-recipe/image-tools-extension.bbclass
index 313c81aa..8f666444 100644
--- a/meta/classes-recipe/image-tools-extension.bbclass
+++ b/meta/classes-recipe/image-tools-extension.bbclass
@@ -169,8 +169,9 @@ EOF
 
         E="${@ isar_export_proxies(d)}"
         deb_dl_dir_import ${ROOTFS_IMAGETOOLS} ${distro}
+        local_install=$local_install \
         ${SCRIPTSDIR}/lockrun.py -r -f "${REPO_ISAR_DIR}/isar.lock" -s <<'EOAPT'
-        local_install=$local_install ${@run_privileged_cmd(d)} /bin/bash -s <<'EOF'
+        ${@run_privileged_cmd(d)} /bin/bash -s <<'EOF'
             set -e
             ${@insert_isar_mounts(d, d.getVar('ROOTFS_IMAGETOOLS'), d.getVar('IMAGER_UNSHARE_MOUNTS'))}
             chroot ${ROOTFS_IMAGETOOLS} apt-get update \
-- 
2.53.0

-- 
You received this message because you are subscribed to the Google Groups "isar-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/isar-users/20260728082010.687942-2-felix.moessbauer%40siemens.com.

  reply	other threads:[~2026-07-28  8:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-28  8:20 [PATCH 1/2] fix(imager): mount base-apt on unshare if needed 'Felix Moessbauer' via isar-users
2026-07-28  8:20 ` 'Felix Moessbauer' via isar-users [this message]
2026-07-31  8:28 ` Zhihang Wei

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260728082010.687942-2-felix.moessbauer@siemens.com \
    --to=isar-users@googlegroups.com \
    --cc=felix.moessbauer@siemens.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox