[3/5] Fix dependencies on isar-apt

Message ID 04cdeb071467cd53d984a619b4a835d7a3aa2597.1600962590.git.jan.kiszka@siemens.com
State Superseded, archived
Headers show
Series More fixes and cleanups | expand

Commit Message

Jan Kiszka Sept. 24, 2020, 7:49 a.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Currently, we fail if only running isar-bootstrap and no other task that
needs isar-apt. That's because of deb_dl_dir_export expecting the repos
already being available (even if empty).

Fix by letting the isar-bootstrap task depend also on
isar-apt:do_cache_config. Drop redundant dependencies, also for
base-apt.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 meta/classes/dpkg-base.bbclass                      | 1 -
 meta/classes/rootfs.bbclass                         | 2 +-
 meta/recipes-core/isar-bootstrap/isar-bootstrap.inc | 2 +-
 3 files changed, 2 insertions(+), 3 deletions(-)

Patch

diff --git a/meta/classes/dpkg-base.bbclass b/meta/classes/dpkg-base.bbclass
index 08880d7d..7e12ab0a 100644
--- a/meta/classes/dpkg-base.bbclass
+++ b/meta/classes/dpkg-base.bbclass
@@ -180,7 +180,6 @@  do_deploy_deb() {
 
 addtask deploy_deb after do_dpkg_build before do_build
 do_deploy_deb[lockfiles] = "${REPO_ISAR_DIR}/isar.lock"
-do_deploy_deb[depends] = "isar-apt:do_cache_config"
 do_deploy_deb[dirs] = "${S}"
 
 python do_devshell() {
diff --git a/meta/classes/rootfs.bbclass b/meta/classes/rootfs.bbclass
index afec1cbc..00254ef5 100644
--- a/meta/classes/rootfs.bbclass
+++ b/meta/classes/rootfs.bbclass
@@ -151,7 +151,7 @@  rootfs_install_pkgs_install() {
 
 do_rootfs_install[root_cleandirs] = "${ROOTFSDIR}"
 do_rootfs_install[vardeps] += "${ROOTFS_CONFIGURE_COMMAND} ${ROOTFS_INSTALL_COMMAND}"
-do_rootfs_install[depends] = "isar-bootstrap-${@'target' if d.getVar('ROOTFS_ARCH') == d.getVar('DISTRO_ARCH') else 'host'}:do_build isar-apt:do_cache_config base-apt:do_cache"
+do_rootfs_install[depends] = "isar-bootstrap-${@'target' if d.getVar('ROOTFS_ARCH') == d.getVar('DISTRO_ARCH') else 'host'}:do_build"
 do_rootfs_install[deptask] = "do_deploy_deb"
 python do_rootfs_install() {
     configure_cmds = (d.getVar("ROOTFS_CONFIGURE_COMMAND", True) or "").split()
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index 1c5dba74..b7dc1ab7 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -224,7 +224,7 @@  def get_host_release():
 
 do_bootstrap[vardeps] += "DISTRO_APT_PREMIRRORS ISAR_ENABLE_COMPAT_ARCH"
 do_bootstrap[dirs] = "${DEPLOY_DIR_BOOTSTRAP}"
-do_bootstrap[depends] = "base-apt:do_cache"
+do_bootstrap[depends] = "base-apt:do_cache isar-apt:do_cache_config"
 
 isar_bootstrap() {
     IS_HOST=""