public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] buildchroot: Do not build cross when there are no
@ 2019-09-18 19:26 Jan Kiszka
  2019-09-18 20:00 ` Baurzhan Ismagulov
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2019-09-18 19:26 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>
---

I still find this strange that we have to add such an extra measure - 
which isn't even working if there is only one arch-specific binary 
package. This should rather be handled by mk-build-deps or actually apt 
itself.

 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] 2+ messages in thread

* Re: [PATCH] buildchroot: Do not build cross when there are no
  2019-09-18 19:26 [PATCH] buildchroot: Do not build cross when there are no Jan Kiszka
@ 2019-09-18 20:00 ` Baurzhan Ismagulov
  0 siblings, 0 replies; 2+ messages in thread
From: Baurzhan Ismagulov @ 2019-09-18 20:00 UTC (permalink / raw)
  To: isar-users

Hello Jan,

the title is incomplete.

With kind regards,
Baurzhan.

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

end of thread, other threads:[~2019-09-18 20:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-18 19:26 [PATCH] buildchroot: Do not build cross when there are no Jan Kiszka
2019-09-18 20:00 ` Baurzhan Ismagulov

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