From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6739560601010307072 X-Received: by 2002:ac2:5483:: with SMTP id t3mr15007623lfk.39.1569176236032; Sun, 22 Sep 2019 11:17:16 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac2:51de:: with SMTP id u30ls1186243lfm.14.gmail; Sun, 22 Sep 2019 11:17:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqyku4Rc7j8HM/ZdmZzcNSYF8ev1OMDi72ipGGoB0jwxbgb2Y6T8rC6o1GIvv29zXPzew6JM X-Received: by 2002:ac2:5965:: with SMTP id h5mr14432482lfp.129.1569176235267; Sun, 22 Sep 2019 11:17:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569176235; cv=none; d=google.com; s=arc-20160816; b=QPXPxioa0GXlm8YfJtd26UkKGTmqu+PaMvzwrLQB4iavbR/GTubt1ezSHcf2/I/tkA 0/A50kVUdKoWYLVQ3s5f30PS7CowGNops89z1nKMSKWLeIjP5/Z4Kz4V2Xtg3QhRFMH3 uAxCB10NAjGVVZL7UsbOckWj4/0Y4bUZ8TNHTWdywTvGbvsUmFvLaEUc9CCe0fN+FAjv wua6cqxHgAxmqFAKrU0x7HlUoKgu15uzIcUtFkMgrfYMTou+lMec0SkrXOwhXgojWs66 DbPO88nDUbI7ZHWS2jczyJinJuZ6MYdxEh25vYOMlVmkyDyi52cRcXHj6IMu8DkzRwwE WYcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:references:in-reply-to:message-id:date :subject:to:from; bh=HthVFbxOU49CRKWseOjme0RnBazENKw/Xx7bIjTPz9E=; b=dJKeC40pOA+G4yRw4ok863icN/LttdGtd7sBVC78+8Rem6gvOdj/1UEMxjTusK9LTB 5GFyv6FZ9lQR7RvaktF+eG+onKHbzC70inv9bf2yv8UehKjD16D9KV9e+pvGu0mweAjn aAi7jsE8NeSdsWUh5R+yevCSPODqYTTHCajDSa1cXfY68MNlpn/JfA+TfLt0TnmcmsMJ EzEmHq1Y7qHdzDYHAtOOFAid5K7Bx1hzABOCi3X+BVA9D7L/Gdz9XJpPfHic04Fjtshw 6vcsVOSAcNmR981YnhnB4z52Nr8WZsBcnbLbX/i198jWmOjS7pZwxkg+HllvkAX9kZel SgAw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from gecko.sbs.de (gecko.sbs.de. [194.138.37.40]) by gmr-mx.google.com with ESMTPS id h6si574808lfc.3.2019.09.22.11.17.15 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 22 Sep 2019 11:17:15 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) client-ip=194.138.37.40; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.40 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail1.sbs.de (mail1.sbs.de [192.129.41.35]) by gecko.sbs.de (8.15.2/8.15.2) with ESMTPS id x8MIHE3T027415 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Sun, 22 Sep 2019 20:17:14 +0200 Received: from md1f2u6c.ad001.siemens.net ([139.22.37.1]) by mail1.sbs.de (8.15.2/8.15.2) with ESMTP id x8MIHB8w005761 for ; Sun, 22 Sep 2019 20:17:13 +0200 From: Jan Kiszka To: isar-users Subject: [PATCH v5 10/27] isar-bootstrap: Clean up and fix rebuild Date: Sun, 22 Sep 2019 20:16:54 +0200 Message-Id: <0d55de07266f5efe88f0cb9862fa8c50b9f22c09.1569176231.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: References: In-Reply-To: References: X-TUID: k6e4fP+k173q From: Jan Kiszka There is no reason for using a lock anymore. All bootstraps for the same distro/arch are detected by bitbake as identical targets in multiconfig scenarios and are not run multiple times. The assumed original reason for the lock, the bogus sharing of isar-bootstrap-host between Debian and Raspbian, is fixed now. In addition, 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 --- .../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 d8abaf3..c985383 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_${DISTRO}-${DISTRO_ARCH}" -ISAR_BOOTSTRAP_LOCK = "${DEPLOY_DIR_BOOTSTRAP}/${HOST_DISTRO}-host_${DISTRO}-${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 a2bd4a8..9ef5b76 100644 --- a/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc +++ b/meta/recipes-core/isar-bootstrap/isar-bootstrap.inc @@ -210,14 +210,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}" @@ -244,7 +241,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}" @@ -338,7 +334,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