Browse Source

buildchroot: Move apt_fetch dependency to dpkg-base

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>
Anton Mikanovich 4 years ago
parent
commit
f9846f2c58
2 changed files with 4 additions and 2 deletions
  1. 1 2
      meta/classes/buildchroot.bbclass
  2. 3 0
      meta/classes/dpkg-base.bbclass

+ 1 - 2
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)
 }

+ 3 - 0
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} \