From: Anton Mikanovich <amikan@ilbers.de>
To: isar-users@googlegroups.com
Cc: Anton Mikanovich <amikan@ilbers.de>
Subject: [PATCH v3 2/3] buildchroot: Move apt_fetch dependency to dpkg-base
Date: Wed, 14 Jul 2021 09:52:33 +0300 [thread overview]
Message-ID: <20210714065234.300300-3-amikan@ilbers.de> (raw)
In-Reply-To: <20210714065234.300300-1-amikan@ilbers.de>
Buildchroot should not care about all the task depends on it, so we
should move do_apt_fetch dependency to the place where this task was
implemented.
Signed-off-by: Anton Mikanovich <amikan@ilbers.de>
---
meta/classes/buildchroot.bbclass | 3 +--
meta/classes/dpkg-base.bbclass | 3 +++
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/meta/classes/buildchroot.bbclass b/meta/classes/buildchroot.bbclass
index 0db6ef9..f77e4f0 100644
--- a/meta/classes/buildchroot.bbclass
+++ b/meta/classes/buildchroot.bbclass
@@ -5,7 +5,7 @@
ISAR_CROSS_COMPILE ??= "0"
-# Add dependency from the correct buildchroot: host or target
+# Choose the correct buildchroot: host or target
python __anonymous() {
mode = d.getVar('ISAR_CROSS_COMPILE', True)
distro_arch = d.getVar('DISTRO_ARCH')
@@ -17,7 +17,6 @@ python __anonymous() {
dep = "buildchroot-host:do_build"
rootfs = d.getVar('BUILDCHROOT_HOST_DIR', True)
- d.setVarFlag('do_apt_fetch', 'depends', dep)
d.setVar('BUILDCHROOT_DEP', dep)
d.setVar('BUILDCHROOT_DIR', rootfs)
}
diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index ed162b3..ec8fbc1 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -89,6 +89,9 @@ python do_apt_fetch() {
addtask apt_fetch after do_unpack before do_apt_unpack
do_apt_fetch[lockfiles] += "${REPO_ISAR_DIR}/isar.lock"
+# Add dependency from the correct buildchroot: host or target
+do_apt_fetch[depends] = "${BUILDCHROOT_DEP}"
+
unpack_apt() {
for uri in "${SRC_APT}"; do
sudo -E chroot --userspec=$( id -u ):$( id -g ) ${BUILDCHROOT_DIR} \
--
2.25.1
next prev parent reply other threads:[~2021-07-14 6:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-14 6:52 [PATCH v3 0/3] Fix imager-buildchroot dependency Anton Mikanovich
2021-07-14 6:52 ` [PATCH v3 1/3] buildchroot: Introduce buildchroot dependency variable Anton Mikanovich
2021-07-14 6:52 ` Anton Mikanovich [this message]
2021-07-14 6:52 ` [PATCH v3 3/3] image: Fix do_install_imager_deps dependency Anton Mikanovich
2021-07-26 15:06 ` [PATCH v3 0/3] Fix imager-buildchroot dependency Anton Mikanovich
2021-07-29 7:58 ` Anton Mikanovich
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=20210714065234.300300-3-amikan@ilbers.de \
--to=amikan@ilbers.de \
--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