From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6729358150130991104 X-Received: by 2002:a2e:f19:: with SMTP id 25mr9413943ljp.149.1566800795089; Sun, 25 Aug 2019 23:26:35 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:b4ef:: with SMTP id s15ls1727054ljm.14.gmail; Sun, 25 Aug 2019 23:26:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy+deSy2zv9Nk69DC4I2+0UK94mIaNOKutWWBtIZzeFkUbKw0bFwXPWUBkTCNTFokqcbyAY X-Received: by 2002:a2e:85c6:: with SMTP id h6mr226647ljj.186.1566800794492; Sun, 25 Aug 2019 23:26:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566800794; cv=none; d=google.com; s=arc-20160816; b=Onw3+bJSydqHrTVbiC1vs6D3tY4luti44jBb8htiSi1TCouUwXpY3f44ZLm246PcwF Md4zU6bzjGtyZ/VxWTMv45QHW8sr4Y3G8lhrYZ79wLZZNLfF4wqvNAmO686TLC87z4JE sEZwwt61mdaH+3pEd7NtT5MtQnGlJx0GJ5z4a17+LE5w6/ruvE5N63YmfsAhoG0VEXRK fgK6AaEuyCuzm3iWY6kG1uzNvp26MdN9xOBvxUlaTWNvMzY+iZCO1nteDnYRVmSaxgjT 9kn1lbPJx+bT6mdZDe41RrgU/sQaocpLUeeGW8ErvX+GwrSRU8iSDY7yJjsn0mYHHkcJ Z+dA== 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=ipsBb0AOEhu3/EdauSfu7gYk/ZQtpYH8cUQA1D8hq2o=; b=GivGNw1wQgZJoc2NcGfO1PPaSY3ZaapIdMzOgcDdNJDf+TmDIQtgtOvWVS64Z1IHvc gH0kfjFKGeQ1eKbUeANjKlnqcK7J+2gGkzJ2mD9xziQNQNyFCzHBvJWp2OqFBAIww/SJ M66zRadxhaHDcgv7GtOJunMowzy0hfxMPkYNVMDJ7Lu/Rt61RxqRSxaqpz1zc7B0wt4c zcLk3j+5/IiA/E/XWnl1rEOKc5z3G+eOwjU98ivzaV3+WHwDt2qiXzkXRsSW23cV3X86 GyE8vtaEY/3UmQh2repfmnmmraxPo06OW5fmu2QsoZYNza2U62T/g/uKm78UG1tjBTXO KOXA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 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 david.siemens.de (david.siemens.de. [192.35.17.14]) by gmr-mx.google.com with ESMTPS id b8si462370lfp.3.2019.08.25.23.26.34 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Aug 2019 23:26:34 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) client-ip=192.35.17.14; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.14 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by david.siemens.de (8.15.2/8.15.2) with ESMTPS id x7Q6QXHY029800 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 26 Aug 2019 08:26:33 +0200 Received: from md1f2u6c.ad001.siemens.net ([139.22.35.99]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id x7Q6QRHG015165 for ; Mon, 26 Aug 2019 08:26:32 +0200 From: Jan Kiszka To: isar-users Subject: [PATCH 22/26] isar-bootstrap: Clean up and fix rebuild Date: Mon, 26 Aug 2019 08:26:23 +0200 Message-Id: <2be0f134cdc2a6167b4c6722a7cc9e9977f35c70.1566800787.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: References: In-Reply-To: References: X-TUID: wkUqfgepghUc From: Jan Kiszka 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 --- .../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