From: Jan Kiszka <jan.kiszka@siemens.com>
To: isar-users <isar-users@googlegroups.com>
Subject: [PATCH 22/26] isar-bootstrap: Clean up and fix rebuild
Date: Mon, 26 Aug 2019 08:26:23 +0200 [thread overview]
Message-ID: <2be0f134cdc2a6167b4c6722a7cc9e9977f35c70.1566800787.git.jan.kiszka@siemens.com> (raw)
In-Reply-To: <cover.1566800787.git.jan.kiszka@siemens.com>
In-Reply-To: <cover.1566800787.git.jan.kiszka@siemens.com>
From: Jan Kiszka <jan.kiszka@siemens.com>
There is no reason for using a lock here. All bootstraps for the same
distro/arch are detected by bitbake as identical targets in multiconfig
scenarios and not run multiple times. If they are run multiple times,
there is another bug, such as with the recently fixed bananapi machine.
Also remove the equally bogus re-execution test in
do_apt_config_prepare. This also fixes rebuilds of the isar-bootstrap
target in case some parameter has changed.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
.../isar-bootstrap/isar-bootstrap-host.bb | 30 ++++++++++------------
.../isar-bootstrap/isar-bootstrap-target.bb | 27 +++++++++----------
.../recipes-core/isar-bootstrap/isar-bootstrap.inc | 5 ----
3 files changed, 26 insertions(+), 36 deletions(-)
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
index b2dded5..8c211a9 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap-host.bb
@@ -8,7 +8,6 @@
Description = "Minimal host Debian root file system"
DEPLOY_ISAR_BOOTSTRAP = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}"
-ISAR_BOOTSTRAP_LOCK = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-${HOST_ARCH}-${DISTRO_ARCH}.lock"
require isar-bootstrap.inc
@@ -25,21 +24,20 @@ do_apt_config_prepare[vardeps] += "\
DEPLOY_ISAR_BOOTSTRAP \
"
python do_apt_config_prepare() {
- if not os.path.islink(d.getVar("DEPLOY_ISAR_BOOTSTRAP", True)):
- apt_preferences_out = d.getVar("APTPREFS", True)
- apt_preferences_list = (
- d.getVar("HOST_DISTRO_APT_PREFERENCES", True) or ""
- ).split()
- aggregate_files(d, apt_preferences_list, apt_preferences_out)
-
- apt_sources_out = d.getVar("APTSRCS", True)
- apt_sources_init_out = d.getVar("APTSRCS_INIT", True)
- apt_sources_list = (
- d.getVar("HOST_DISTRO_APT_SOURCES", True) or ""
- ).split()
-
- aggregate_files(d, apt_sources_list, apt_sources_init_out)
- aggregate_aptsources_list(d, apt_sources_list, apt_sources_out)
+ apt_preferences_out = d.getVar("APTPREFS", True)
+ apt_preferences_list = (
+ d.getVar("HOST_DISTRO_APT_PREFERENCES", True) or ""
+ ).split()
+ aggregate_files(d, apt_preferences_list, apt_preferences_out)
+
+ apt_sources_out = d.getVar("APTSRCS", True)
+ apt_sources_init_out = d.getVar("APTSRCS_INIT", True)
+ apt_sources_list = (
+ d.getVar("HOST_DISTRO_APT_SOURCES", True) or ""
+ ).split()
+
+ aggregate_files(d, apt_sources_list, apt_sources_init_out)
+ aggregate_aptsources_list(d, apt_sources_list, apt_sources_out)
}
addtask apt_config_prepare before do_bootstrap after do_unpack
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb
index d7fcdbf..80e7f40 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap-target.bb
@@ -8,7 +8,6 @@
Description = "Minimal target Debian root file system"
DEPLOY_ISAR_BOOTSTRAP = "${DEPLOY_DIR_BOOTSTRAP}/${DISTRO}-${DISTRO_ARCH}"
-ISAR_BOOTSTRAP_LOCK = "${DEPLOY_DIR_BOOTSTRAP}/${DISTRO}-${DISTRO_ARCH}.lock"
require isar-bootstrap.inc
@@ -22,19 +21,18 @@ do_apt_config_prepare[vardeps] += "\
DEPLOY_ISAR_BOOTSTRAP \
"
python do_apt_config_prepare() {
- if not os.path.islink(d.getVar("DEPLOY_ISAR_BOOTSTRAP", True)):
- apt_preferences_out = d.getVar("APTPREFS", True)
- apt_preferences_list = (
- d.getVar("DISTRO_APT_PREFERENCES", True) or ""
- ).split()
- aggregate_files(d, apt_preferences_list, apt_preferences_out)
-
- apt_sources_out = d.getVar("APTSRCS", True)
- apt_sources_init_out = d.getVar("APTSRCS_INIT", True)
- apt_sources_list = (d.getVar("DISTRO_APT_SOURCES", True) or "").split()
-
- aggregate_files(d, apt_sources_list, apt_sources_init_out)
- aggregate_aptsources_list(d, apt_sources_list, apt_sources_out)
+ apt_preferences_out = d.getVar("APTPREFS", True)
+ apt_preferences_list = (
+ d.getVar("DISTRO_APT_PREFERENCES", True) or ""
+ ).split()
+ aggregate_files(d, apt_preferences_list, apt_preferences_out)
+
+ apt_sources_out = d.getVar("APTSRCS", True)
+ apt_sources_init_out = d.getVar("APTSRCS_INIT", True)
+ apt_sources_list = (d.getVar("DISTRO_APT_SOURCES", True) or "").split()
+
+ aggregate_files(d, apt_sources_list, apt_sources_init_out)
+ aggregate_aptsources_list(d, apt_sources_list, apt_sources_out)
}
addtask apt_config_prepare before do_bootstrap after do_unpack
@@ -45,4 +43,3 @@ do_bootstrap() {
isar_bootstrap
}
addtask bootstrap before do_build after do_generate_keyrings
-
diff --git a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
index aea89a9..36cefd2 100644
--- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
+++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc
@@ -212,14 +212,11 @@ do_generate_keyrings() {
}
addtask generate_keyrings before do_build after do_unpack
-
-
def get_host_release():
import platform
rel = platform.release()
return rel
-
do_bootstrap[vardeps] += "DISTRO_APT_PREMIRRORS"
do_bootstrap[dirs] = "${DEPLOY_DIR_BOOTSTRAP}"
@@ -246,7 +243,6 @@ isar_bootstrap() {
E="${@bb.utils.export_proxies(d)}"
export IS_HOST debootstrap_args E
sudo -E -s <<'EOSUDO'
- ( flock 9
set -e
if [ ! -e "${DEPLOY_ISAR_BOOTSTRAP}" ]; then
rm -rf "${ROOTFSDIR}"
@@ -340,7 +336,6 @@ isar_bootstrap() {
# Finalize debootstrap by setting the link in deploy
ln -Tfsr "${ROOTFSDIR}" "${DEPLOY_ISAR_BOOTSTRAP}"
fi
- ) 9>'${ISAR_BOOTSTRAP_LOCK}'
EOSUDO
}
--
2.16.4
next prev parent reply other threads:[~2019-08-26 6:26 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-26 6:26 [PATCH 00/26] Tons of fixes and cleanups Jan Kiszka
2019-08-26 6:26 ` [PATCH 01/26] isar-bootstrap: Consider DISTRO_BOOTSTRAP_KEYS for gnupg installation Jan Kiszka
2019-08-26 6:26 ` [PATCH 02/26] isar-bootstrap: Fix keyring generation Jan Kiszka
2019-09-27 12:03 ` Baurzhan Ismagulov
2019-08-26 6:26 ` [PATCH 03/26] isar-bootstrap: Install DISTRO_BOOTSTRAP_KEYS Jan Kiszka
2019-08-26 6:26 ` [PATCH 04/26] Rework STAMP layout and cleaning Jan Kiszka
2019-08-26 8:30 ` Claudius Heine
2019-08-26 8:38 ` Jan Kiszka
2019-08-26 6:26 ` [PATCH 05/26] dpkg: Fix shared-locking of build task Jan Kiszka
2019-08-26 6:38 ` Cedric Hombourger
2019-08-26 8:30 ` Claudius Heine
2019-08-26 8:38 ` Jan Kiszka
2019-08-26 6:26 ` [PATCH 06/26] dpkg-base: Free do_build task Jan Kiszka
2019-08-26 6:26 ` [PATCH 07/26] base: Clean up build task Jan Kiszka
2019-08-26 8:30 ` Henning Schild
2019-08-26 8:40 ` Jan Kiszka
2019-08-26 6:26 ` [PATCH 08/26] isar-events: Do not start cleanup early Jan Kiszka
2019-08-26 6:26 ` [PATCH 09/26] meta-isar: Move bananapi to buster, remove bogus example Jan Kiszka
2019-09-04 6:53 ` [PATCH v2 " Jan Kiszka
2019-08-26 6:26 ` [PATCH 10/26] bitbake.conf: Reorder PV definition Jan Kiszka
2019-08-26 6:26 ` [PATCH 11/26] example-module: Fix build with mipsel target Jan Kiszka
2019-08-26 6:26 ` [PATCH 12/26] buildchroot: Ignore ISAR_CROSS_COMPILE for i386 on stretch Jan Kiszka
2019-08-26 6:26 ` [PATCH 13/26] buildchroot: Fix downgrades when installing dependencies Jan Kiszka
2019-08-26 6:26 ` [PATCH 14/26] buildchroot: Properly deploy the build result Jan Kiszka
2019-08-26 6:26 ` [PATCH 15/26] sdk: Use clean-package-cache rather than open-coded cleanup Jan Kiszka
2019-08-26 6:26 ` [PATCH 16/26] sdk: Deploy earlier Jan Kiszka
2019-08-26 6:26 ` [PATCH 17/26] Remove unneeded PF tweakings Jan Kiszka
2019-08-26 6:26 ` [PATCH 18/26] image: Stop changing PF, tune WORKDIR and STAMP directly Jan Kiszka
2019-08-26 8:35 ` Henning Schild
2019-08-26 8:40 ` Jan Kiszka
2019-08-26 6:26 ` [PATCH 19/26] image: Make WORKDIR and STAMPs IMAGE_TYPE-specific Jan Kiszka
2019-08-26 6:26 ` [PATCH 20/26] Adjust STAMP variables to use PN, rather than PF Jan Kiszka
2019-08-26 6:26 ` [PATCH 21/26] Align WORKDIR structure with OE Jan Kiszka
2019-08-26 6:26 ` Jan Kiszka [this message]
2019-09-21 8:28 ` [PATCH 22/26] isar-bootstrap: Clean up and fix rebuild Jan Kiszka
2019-08-26 6:26 ` [PATCH 23/26] gitlab-ci: Keep logs as artifacts on failure Jan Kiszka
2019-08-26 6:26 ` [PATCH 24/26] Detect false sharing of recipes Jan Kiszka
2019-08-26 6:26 ` [PATCH 25/26] dpkg-base: Move do_deploy_deb before do_build Jan Kiszka
2019-08-28 7:32 ` Claudius Heine
2019-10-01 11:49 ` Baurzhan Ismagulov
2019-08-26 6:26 ` [PATCH 26/26] base-apt: Move do_cache_config " Jan Kiszka
2019-08-26 21:29 ` [PATCH 27/26] wic-img: Use private tmp dir Jan Kiszka
2019-08-27 15:00 ` [PATCH v2 " Jan Kiszka
2019-10-01 14:43 ` [PATCH 00/26] Tons of fixes and cleanups 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=2be0f134cdc2a6167b4c6722a7cc9e9977f35c70.1566800787.git.jan.kiszka@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