public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH] buildchroot: Do not build cross when there are no
Date: Wed, 18 Sep 2019 21:26:37 +0200	[thread overview]
Message-ID: <10bffd91-64eb-c9d5-472f-87d794cefd87@siemens.com> (raw)

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

             reply	other threads:[~2019-09-18 19:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18 19:26 Jan Kiszka [this message]
2019-09-18 20:00 ` Baurzhan Ismagulov

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=10bffd91-64eb-c9d5-472f-87d794cefd87@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=isar-users@googlegroups.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