public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH v2] buildchroot: Do not build cross when there are no arch-specific outputs
@ 2019-09-18 20:12 Jan Kiszka
  0 siblings, 0 replies; only message in thread
From: Jan Kiszka @ 2019-09-18 20:12 UTC (permalink / raw)
  To: isar-users

From: Jan Kiszka <jan.kiszka@siemens.com>

When all binary packages are "Architecture: all", we can avoid the cross
build and use the host architecture directly. This specifically resolves
cross-build issue with dependencies that are not cross-ready.

More concretely, if the build dependency meta package requests an arch-
independent package, this fails because apt seems to look only for
my-dependency:arch, ignoring that there is only :all.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---

changes in v2:
 - fix subject line

 meta/recipes-devtools/buildchroot/files/deps.sh | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/meta/recipes-devtools/buildchroot/files/deps.sh b/meta/recipes-devtools/buildchroot/files/deps.sh
index 19eb9b7..c04acce 100644
--- a/meta/recipes-devtools/buildchroot/files/deps.sh
+++ b/meta/recipes-devtools/buildchroot/files/deps.sh
@@ -25,6 +25,12 @@ apt-get update \
     -o Dir::Etc::sourceparts="-" \
     -o APT::Get::List-Cleanup="0"
 
+# Do not set an architecture when building only 'all' (generic) packages.
+# This can avoid unneeded cross-build issues.
+if ! grep "^Architecture:" debian/control | grep -qv "all"; then
+	set_arch=""
+fi
+
 # Install all build deps
 mk-build-deps $set_arch -t "${install_cmd}" -i -r debian/control
 
-- 
2.16.4

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-09-18 20:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 20:12 [PATCH v2] buildchroot: Do not build cross when there are no arch-specific outputs Jan Kiszka

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