public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] Fix cache-deb-src on raspberry targets
@ 2022-10-17  6:20 Uladzimir Bely
  2022-10-17  7:36 ` Bezdeka, Florian
  2022-10-24 10:39 ` Anton Mikanovich
  0 siblings, 2 replies; 4+ messages in thread
From: Uladzimir Bely @ 2022-10-17  6:20 UTC (permalink / raw)
  To: isar-users

Enabling cross-imager (commit 442c2a14) resulted in placing some
host (e.g. debian-bullseye) packages in target (raspios-bullseye)
download directories. So, `debsrc_download` function couldn't find
sources for these host (cross) packages on target mirrors.

This patch fixes the issue by using correct download directory
for the packages used by the imager.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 meta/classes/image-tools-extension.bbclass | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/meta/classes/image-tools-extension.bbclass b/meta/classes/image-tools-extension.bbclass
index e13d4a3f..ecd4365b 100644
--- a/meta/classes/image-tools-extension.bbclass
+++ b/meta/classes/image-tools-extension.bbclass
@@ -19,10 +19,15 @@ do_install_imager_deps() {
         exit
     fi
 
+    distro="${DISTRO}"
+    if [ ${ISAR_CROSS_COMPILE} -eq 1 ]; then
+        distro="${HOST_DISTRO}"
+    fi
+
     buildchroot_do_mounts
 
     E="${@ isar_export_proxies(d)}"
-    deb_dl_dir_import ${BUILDCHROOT_DIR} ${DISTRO}
+    deb_dl_dir_import ${BUILDCHROOT_DIR} ${distro}
     sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \
         apt-get update \
             -o Dir::Etc::SourceList="sources.list.d/isar-apt.list" \
@@ -32,7 +37,7 @@ do_install_imager_deps() {
             --allow-unauthenticated --allow-downgrades --download-only install \
             ${IMAGER_INSTALL}'
 
-    deb_dl_dir_export ${BUILDCHROOT_DIR} ${DISTRO}
+    deb_dl_dir_export ${BUILDCHROOT_DIR} ${distro}
     sudo -E chroot ${BUILDCHROOT_DIR} sh -c ' \
         apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y \
             --allow-unauthenticated --allow-downgrades install \
-- 
2.20.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-10-24 10:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-17  6:20 [PATCH] Fix cache-deb-src on raspberry targets Uladzimir Bely
2022-10-17  7:36 ` Bezdeka, Florian
2022-10-17  8:21   ` Uladzimir Bely
2022-10-24 10:39 ` Anton Mikanovich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox