* [PATCH] deb-dl-dir: specify target architecture for apt-cache lookups
@ 2025-04-17 20:17 'Cedric Hombourger' via isar-users
0 siblings, 0 replies; only message in thread
From: 'Cedric Hombourger' via isar-users @ 2025-04-17 20:17 UTC (permalink / raw)
To: isar-users; +Cc: Cedric Hombourger, Srinuvasan A
apt-cache needs to be told for which main architecture it should check
when listing packages via "dumpavail": it would otherwise default to its
default architecture (HOST_DISTRO_ARCH when running outside of the target
rootfs vs DISTRO_ARCH when running under chroot). Use "apt-cache -o
APT::Architecture=${DISTRO_ARCH}" for a correct listing of packages known
to apt; this approach is preferred over e.g. "sudo chroot ${rootfs}
apt-cache dumpavail" as we avoid a sudo call and avoid running apt under
qemu (slow) when the host and target architectures are different.
Reported-by: Srinuvasan A <srinuvasan.a@siemens.com>
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
---
meta/classes/deb-dl-dir.bbclass | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/meta/classes/deb-dl-dir.bbclass b/meta/classes/deb-dl-dir.bbclass
index 24b2dec7..e12144ef 100644
--- a/meta/classes/deb-dl-dir.bbclass
+++ b/meta/classes/deb-dl-dir.bbclass
@@ -64,7 +64,8 @@ debsrc_download() {
trap "rm -f ${avail} ${wanted}" EXIT
# List all packages known to apt
- apt-cache -o Dir=${rootfs} dumpavail | debsrc_source_version_filter > ${avail}
+ apt-cache -o APT::Architecture=${DISTRO_ARCH} -o Dir=${rootfs} dumpavail \
+ | debsrc_source_version_filter > ${avail}
# Use apt-ftparchive to scan all .deb files found in the download directory
# and get the <source> <version> pairs that we wish to download
--
2.39.5
--
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/20250417201747.90299-1-cedric.hombourger%40siemens.com.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-04-17 20:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-17 20:17 [PATCH] deb-dl-dir: specify target architecture for apt-cache lookups 'Cedric Hombourger' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox