From patchwork Thu Sep 17 00:31:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijai Kumar K X-Patchwork-Id: 58 Return-Path: Delivered-To: ilbers.mnt@gmail.com Received: by 2002:a4a:eb04:0:0:0:0:0 with SMTP id f4csp261107ooj; Thu, 17 Sep 2020 01:31:51 -0700 (PDT) X-Received: by 2002:a05:620a:21d9:: with SMTP id h25mr27293316qka.477.1600331511325; Thu, 17 Sep 2020 01:31:51 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1600331511; cv=pass; d=google.com; s=arc-20160816; b=DFLU1/z/szEddZebp6OmNgcqGJiR+sqdpGYkntLhnts7zuot0ACluk62xjH/3WuLrN hAyHBB/nDg3k6nUHGzCy6L2GDNSnlQa4kvgoiE9pxQy/1BygMdbppxn9iLaL5BisNnUD H186lVdP16oaQpyvAK0PrtM7hGQeSC+dLZx+0QhtOlVSUY/ho5grZsTUuh7A6UjI1yGB PG++6ccCaIqkoUwVpQTZV2GhO+wDgy/P6lIuclr+Kwj2jTOHu/LUziihwfIhVEJkWoJ6 lzNV3yKRQdHy3g/D+57qm7YoM8CfFyZuyAIXBWaV+nA4W1KAuSpzyzrftEIvj3zGLVcQ efOQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr:sender:dkim-signature; bh=UyMQnPKBtaJLNQw+0Ec6eeQbuAOlVg6S27zfDl0e9kM=; b=KgKu2lt/xXAk9VFoAXF4WB0CGyqZOL5EnpQujVsy7K7A2NTHLHI9Z0BFo0VXH0jZ55 rLU5hMU3UvwfvqS6kCvkYncayDa6fjDb26FXCbPJm77GLj41Qw2mVvtRPjSo5xSDckb0 lwNpwplYim2Oo06lP+KPW5srqQty0qb0dTqlBVg5VukBpJ4ZS0/9Pz7AQB3OHCwLVQuZ lOPyZdpsuXs+9chHaEi+QCqPVKKptIZg4Q+gYwwnql6xjlBWi+DBaIXyyZtqancGCgz7 xWdAGLFSpP2i3WqeeBJLcVqZHFKQfMYJfMMPixeUL5aZIm9nZedclaz3xYYmxXbjZK9t C/bA== ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=jK5gTAph; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb5v5rt5qkgqe6ai6b6a@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB5V5RT5QKGQE6AI6B6A@googlegroups.com Received: from mail-sor-f55.google.com (mail-sor-f55.google.com. [209.85.220.55]) by mx.google.com with SMTPS id o42sor9997840qvf.37.2020.09.17.01.31.50 (Google Transport Security); Thu, 17 Sep 2020 01:31:51 -0700 (PDT) Received-SPF: pass (google.com: domain of isar-users+bncbcwp7lf37ukrb5v5rt5qkgqe6ai6b6a@googlegroups.com designates 209.85.220.55 as permitted sender) client-ip=209.85.220.55; Authentication-Results: mx.google.com; dkim=pass header.i=@googlegroups.com header.s=20161025 header.b=jK5gTAph; arc=pass (i=2 spf=pass spfdomain=mentor.com); spf=pass (google.com: domain of isar-users+bncbcwp7lf37ukrb5v5rt5qkgqe6ai6b6a@googlegroups.com designates 209.85.220.55 as permitted sender) smtp.mailfrom=isar-users+bncBCWP7LF37UKRB5V5RT5QKGQE6AI6B6A@googlegroups.com ARC-Seal: i=2; a=rsa-sha256; t=1600331510; cv=pass; d=google.com; s=arc-20160816; b=gfnJLmFk5hpErFSYluU8Um5pdjijc2fHGD0p9urU9Kfr+aYE4maF32CqW+mstIg6cD yEVNTOoY7kb7pXhtt2IUrTdOaAZrifriJLT4Ssg4JM5/mIRBqLrmMNbenDN2I7x8HZES dSRK1uR6vUBenh1k2NN7/OvCg+YW0EEbq4fhFxijOA5h55Xj4aHmLffOWqWCcDqEM3i8 EuAPB/VdqGj6ndqKPQne5B8LvmpgNLt1EjwtfjNigOZZDd5/QkCjZmYQ9CreODyh6pWQ HfLgV2o7Yk+UoH2bzNqJbJrGf+dHTPEF1Pd8c2SuVi26zIHiX0Xhi5NSVlP0Fa38dQ7G tByQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr:sender:dkim-signature; bh=UyMQnPKBtaJLNQw+0Ec6eeQbuAOlVg6S27zfDl0e9kM=; b=JegY/EMrgaPp0DsI3LFbS/mf+/ZWiw9HCYrKdX980jutOFd54ww7+8cnnbPOvXSvnT EnfOVWo4f1vqq8MD3JM5UHagKxoLGSjtU+sgPp4E7XuoZMzZPVkR1upjI9rvyG3/kxVV Za6mL7Ncu8qQfpx60xujOtdACyKHUjvXv+YWrYgILf2RiZ2oZ+Pl2f6bk15b1JURxDb0 pteInKTInkRKrbfPjuXcrFywqfdxPeKTHuEvLFtl7U5FVvsHJwXKcWohOTgTVDq5hrEU mfDwbU8hCE3fvUkv7YlTp+OLiFSzzdp88aPtVke5YnWKEHANRM1DW+0Yni0wrGlFnCMO OPsA== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:ironport-sdr:ironport-sdr:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=UyMQnPKBtaJLNQw+0Ec6eeQbuAOlVg6S27zfDl0e9kM=; b=jK5gTApheoPtRKk6/N6AIp9MTVtTb7IWD1kxRo6QNFm9xzL5FLgD6LLNA25f229cQA R+3/aYOvwH8jmoMECnj7O6vQmpas0Xl8Ot2Vwv5Kmqhpj/2lanu7vrplJ1fLw2g7hgbh TXgpixeQTwf8FHN4DrIcPymF3QXCoJ6i3xmUIzwMP2kowLKRpcyTvlmEnpaFMCJk1AKG fZ9MV2JFv9hgZxU2SRaP0b73lNcCJG4OE3gdC1Ym1r6WrqjV+25oNE1Zsh6+4oKvObIu syjQVnY5/SSWc3kCyiUf4w9ISTQrZLrDo16FMiT3rH/9qANuT9kDtz+p41JGEOF1R6WQ Y44g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:ironport-sdr:ironport-sdr:from:to:cc :subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=UyMQnPKBtaJLNQw+0Ec6eeQbuAOlVg6S27zfDl0e9kM=; b=hlIUnEhyGVLbtDdq1OOBGeeNlcOF1ReIQrL/d/M/yZxsZRhAshcxJYH1EBu0CsWie/ qAvmLrlOHRK0pe8Tvh/ChaBJWLDiS9iOoWQ5QDtrOYTC4whJ8eYjjy7USsy/thopzbcU bGX4bvHy0MirLRu542GLtxc0VkTNgEDxwE7gRsAbuQ7fyzMLdlDre4iCS2eBOKl3avS9 OgzT/C4ua5n05VlF1TS69XSp8HfaeCPrB+QxqN0ZQARiNVsVZ3pH8YdX88p9JJP+Q7CV +7mcFq2jylPhVwnul8koJtzrn76zogzxRFUDaOEdrT6SP7UOaNBHIFAuu5qkmgcAdZDd R2nA== Sender: isar-users@googlegroups.com X-Gm-Message-State: AOAM531M6HTCydcGdfKaNOK/2AoICZhYnI7zVkqSlstnGK1g9aJ+C0di 2lcHFq39BEFq6J2Bhl3YwoQ= X-Google-Smtp-Source: ABdhPJz6qTckirxpHEGcUpwJemh5kw0L3NmMiDE/pyygLVfpc8hsHh7OPYzP3l7sFAHvEMf7amJhjQ== X-Received: by 2002:a0c:b251:: with SMTP id k17mr11179590qve.53.1600331510351; Thu, 17 Sep 2020 01:31:50 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ad4:48c2:: with SMTP id v2ls364929qvx.4.gmail; Thu, 17 Sep 2020 01:31:49 -0700 (PDT) X-Received: by 2002:ad4:4f24:: with SMTP id fc4mr11041781qvb.35.1600331509836; Thu, 17 Sep 2020 01:31:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600331509; cv=none; d=google.com; s=arc-20160816; b=sj5SUk0oaywTr2an+jr8f/yzzuwp0+xN88RyCQLawxA4hrXhmnZUOfWNyFFLr4Tn2l i3zMRRkor0xOF0JEfLKXOTYXiLStcpc5+7sKx9O/DmARxhcFOWmOhIdyYGNFt1fOSblf NIEp1EepMExSI+suh9BC8ScFAi4XxKFhb7T6MzzLumrh3z/C8DQd/AjWyyrtnZBs2RT+ ntLHwVh1z+vzF7R3BvJXz47aJIZgM10jd3Hp1peZS3XF/KLDAPfxKSFF8kw217k/0As9 dWLn9Ii536rcCRcJoo0AOATo43PR+ABzlvSAlgv9KK/D15jW6mpt2qlCi2HmXeNaA0+H WNWg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:message-id:date:subject:cc:to:from:ironport-sdr :ironport-sdr; bh=67BajhkcWR9mwMYvK86qlkiOUKabkvaNMk2QcQT/TFQ=; b=FMaH7LXQwnxWNJC9SkbwzJtNQ1Mwl32WmWhI1iNCidt6ayIseHk0bRaMQL24kQWVIl 7M+R6gAyRVKoZbHBk17AcojWG/iI44QWx6eesDUKrCkL/DH2VKnSgYLNOLc/kdgCl8gf ILJRENrWuqdlrk3tflncY4PZ2NmVr7owURARVmlebDs0fGzCyy/eTATJZvlGmyVVb282 CTGqVaQA7ZEtE1EudTkDp62kyYJCuGZezGD8bWm42au34ezabT5aA2iqveE1s7WZ51ui h/SMd9kWRPAlepZcUJuF/uUwoBNS+tHk64D8mPk5Pv4zW0ewzaOwiQkqlSAK5gOyPI1z jGag== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id k6si1245364qkg.1.2020.09.17.01.31.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Sep 2020 01:31:49 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; IronPort-SDR: e1vhXLfDLiC0Hz+vcY2HbZh50inLPgDJUlSCTpQl+0cLza1ayjseutIKHnE1fBk91gA8xmdb+u V2FRyfdKVQhIQ/6BbpfJoDeDmFVtfop+KJLtYTofPmYZR7o+D5L5M0eV54e/2WFiCmgL4hNxSk mUFk3I3VS4iQwbmetSkI3f+YT+rfkQD8/bfhrWpm9YEt1DPCvYfEGkl171U284ycVnCejkCOPC YLVQ0QdYHF9JjHV9f9RmzKZ7fe46+++DloWkJE5wT/6inQYt4V8yEEebIoblKOot53S7JzD0JC XgM= X-IronPort-AV: E=Sophos;i="5.76,436,1592899200"; d="scan'208";a="53023607" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa2.mentor.iphmx.com with ESMTP; 17 Sep 2020 00:31:48 -0800 IronPort-SDR: Eh1SCRs0oDW/KPkcVMB43PlXO0ZLnyjqRlOM8Ip7ufmf4G2ZjQDAX4ru3UeyvL9AKYTffM/L5h Jq/bqTCQN3XwgxUaAcRyVdx8HKQL/FDQj4vDIZw3e0lRuihkM1BlY++ndmMJVPK29qtppb/abK rjnDHguBHZrTZZRBJMvtzwTyEtuSxW5ImMaB9V9FkuogGnqw9r+9AdYzmmPsscWCK8ED7f2cYL EaQXOKvvr+hzNrhAU49Jqb7KrkevC2POrN7DKKFJdDNY3bnJElvMzB4Y5pmvzJihKH6oZZquNl 324= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v4] Replace ISARROOT with more relevant variables Date: Thu, 17 Sep 2020 14:01:23 +0530 Message-ID: <20200917083123.9983-1-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-ClientProxiedBy: SVR-ORW-MBX-07.mgc.mentorg.com (147.34.90.207) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-Original-Sender: vijaikumar_kanagarajan@mentor.com X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: =?utf-8?q?1678069215167928771?= X-GMAIL-MSGID: =?utf-8?q?1678069215167928771?= When switching between two ISAR workspaces in the same shell session, the ISARROOT setting of the previous workspace would be picked up for the new workspace resulting in an incorrect configuration. The user had to manually unset ISARROOT to avoid any issues. As like OEROOT in OE, let us unset ISARROOT at the end of the initialization script. This helps us to avoid the above issue and also preserves support for passing ISARROOT from a caller script as in OE. ISARROOT is used mostly to derive the location of bitbake, scripts, testsuite, meta and meta-isar directories. Layers like meta, meta-isar already have their paths in LAYERDIR_core and LAYERDIR_isar which can be used. For other directories introduce dedicated variables BITBAKEDIR, SCRIPTSDIR and TESTSUITEDIR. Signed-off-by: Vijai Kumar K --- Hi Baurzhan, I have rebased against the latest next branch. Once merged. I will rebase and send the WIC series. I have also added an entry in RECIPE-API-CHANGELOG to notify that ISARROOT is no longer available in bitbake environment. Thanks, Vijai Kumar K Changes in v4: - Rebase against latest next - Added a entry in RECIPE-API-CHANGELOG. Changes in v3: - Send patch using proper send. Changes in v2: - Approach using dedicated variables for each commonly used directories. RECIPE-API-CHANGELOG.md | 6 +++++ isar-init-build-env | 1 + meta/classes/image-sdk-extension.bbclass | 2 +- meta/classes/wic-img.bbclass | 31 ++++++++++++------------ scripts/ci_build.sh | 17 +++++++------ scripts/isar-buildenv-internal | 7 ++++-- 6 files changed, 38 insertions(+), 26 deletions(-) diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md index 1839770..ac9d8d6 100644 --- a/RECIPE-API-CHANGELOG.md +++ b/RECIPE-API-CHANGELOG.md @@ -246,3 +246,9 @@ by setting DEBIAN_BUILD_DEPENDS. ${S} can now be used for checking out sources without being linked implicitly with ${D} which needs to be filled explicitly in do_install as before. + +### Remove ISARROOT from bitbake environment + +ISARROOT variable is now removed from the bitbake environment. It is unset +after the initial setup. It is replaced with dedicated variables like +BITBAKEDIR, SCRIPTSDIR and TESTSUITEDIR. diff --git a/isar-init-build-env b/isar-init-build-env index b08bb59..85fb82f 100755 --- a/isar-init-build-env +++ b/isar-init-build-env @@ -55,5 +55,6 @@ export ISARROOT unset ISARROOT return 1 } +unset ISARROOT [ -z "$BUILDDIR" ] || cd "$BUILDDIR" diff --git a/meta/classes/image-sdk-extension.bbclass b/meta/classes/image-sdk-extension.bbclass index b9f2cf4..b91fdd6 100644 --- a/meta/classes/image-sdk-extension.bbclass +++ b/meta/classes/image-sdk-extension.bbclass @@ -19,7 +19,7 @@ do_populate_sdk() { sudo rm -f ${SDKCHROOT_DIR}/chroot-setup.sh ${SDKCHROOT_DIR}/configscript.sh # Copy mount_chroot.sh for convenience - sudo cp ${ISARROOT}/scripts/mount_chroot.sh ${SDKCHROOT_DIR} + sudo cp ${SCRIPTSDIR}/mount_chroot.sh ${SDKCHROOT_DIR} # Create SDK archive cd -P ${SDKCHROOT_DIR}/.. diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass index afab394..1bb1021 100644 --- a/meta/classes/wic-img.bbclass +++ b/meta/classes/wic-img.bbclass @@ -86,7 +86,7 @@ STAGING_DATADIR ?= "/usr/lib/" STAGING_LIBDIR ?= "/usr/lib/" STAGING_DIR ?= "${TMPDIR}" IMAGE_BASENAME ?= "${PN}-${DISTRO}" -FAKEROOTCMD ?= "${ISARROOT}/scripts/wic_fakeroot" +FAKEROOTCMD ?= "${SCRIPTSDIR}/wic_fakeroot" RECIPE_SYSROOT_NATIVE ?= "/" BUILDCHROOT_DIR = "${BUILDCHROOT_TARGET_DIR}" @@ -132,7 +132,7 @@ do_wic_image() { buildchroot_do_mounts sudo -s <<'EOSUDO' ( flock 9 - for dir in ${BBLAYERS} ${STAGING_DIR} ${ISARROOT}/scripts ${ISARROOT}/bitbake; do + for dir in ${BBLAYERS} ${STAGING_DIR} ${SCRIPTSDIR} ${BITBAKEDIR}; do mkdir -p ${BUILDCHROOT_DIR}/$dir if ! mountpoint ${BUILDCHROOT_DIR}/$dir >/dev/null 2>&1; then mount --bind --make-private $dir ${BUILDCHROOT_DIR}/$dir @@ -149,25 +149,26 @@ EOSUDO sudo -E chroot ${BUILDCHROOT_DIR} \ sh -c ' \ - ISARROOT="$1" - WKS_FULL_PATH="$2" - STAGING_DIR="$3" - MACHINE="$4" - WICTMP="$5" - IMAGE_FULLNAME="$6" - IMAGE_BASENAME="$7" - shift 7 - - export PATH="$ISARROOT/bitbake/bin:$PATH" - "$ISARROOT"/scripts/wic create "$WKS_FULL_PATH" \ + BITBAKEDIR="$1" + SCRIPTSDIR="$2" + WKS_FULL_PATH="$3" + STAGING_DIR="$4" + MACHINE="$5" + WICTMP="$6" + IMAGE_FULLNAME="$7" + IMAGE_BASENAME="$8" + shift 8 + + export PATH="$BITBAKEDIR/bin:$PATH" + "$SCRIPTSDIR"/wic create "$WKS_FULL_PATH" \ --vars "$STAGING_DIR/$MACHINE/imgdata/" \ -o "/$WICTMP/${IMAGE_FULLNAME}.wic/" \ --bmap \ -e "$IMAGE_BASENAME" $@' \ - my_script "${ISARROOT}" "${WKS_FULL_PATH}" "${STAGING_DIR}" \ + my_script "${BITBAKEDIR}" "${SCRIPTSDIR}" "${WKS_FULL_PATH}" "${STAGING_DIR}" \ "${MACHINE}" "${WICTMP}" "${IMAGE_FULLNAME}" "${IMAGE_BASENAME}" \ ${WIC_CREATE_EXTRA_ARGS} - sudo chown -R $(stat -c "%U" ${ISARROOT}) ${ISARROOT}/meta ${ISARROOT}/meta-isar ${ISARROOT}/scripts || true + sudo chown -R $(stat -c "%U" ${LAYERDIR_core}) ${LAYERDIR_core} ${LAYERDIR_isar} ${SCRIPTSDIR} || true WIC_DIRECT=$(ls -t -1 ${BUILDCHROOT_DIR}/$WICTMP/${IMAGE_FULLNAME}.wic/*.direct | head -1) sudo chown -R $(id -u):$(id -g) ${BUILDCHROOT_DIR}/${WICTMP} mv -f ${WIC_DIRECT} ${WIC_IMAGE_FILE} diff --git a/scripts/ci_build.sh b/scripts/ci_build.sh index af996d1..82136e3 100755 --- a/scripts/ci_build.sh +++ b/scripts/ci_build.sh @@ -144,8 +144,8 @@ if [ -n "$CROSS_BUILD" ]; then fi if [ -n "$REPRO_BUILD" ]; then - ISAR_TESTSUITE_GPG_PUB_KEY_FILE="$ISARROOT/testsuite/base-apt/test_pub.key" - ISAR_TESTSUITE_GPG_PRIV_KEY_FILE="$ISARROOT/testsuite/base-apt/test_priv.key" + ISAR_TESTSUITE_GPG_PUB_KEY_FILE="$TESTSUITEDIR/base-apt/test_pub.key" + ISAR_TESTSUITE_GPG_PRIV_KEY_FILE="$TESTSUITEDIR/base-apt/test_priv.key" export GNUPGHOME=$(mktemp -d) gpg --import $ISAR_TESTSUITE_GPG_PUB_KEY_FILE $ISAR_TESTSUITE_GPG_PRIV_KEY_FILE @@ -206,21 +206,22 @@ if [ -z "$FAST_BUILD" ]; then while [ -e bitbake.sock ]; do sleep 1; done fi -cp -a "${ISARROOT}/meta/classes/dpkg-base.bbclass" "${ISARROOT}/meta/classes/dpkg-base.bbclass.ci-backup" -echo -e "do_fetch_append() {\n\n}" >> "${ISARROOT}/meta/classes/dpkg-base.bbclass" +eval $(bitbake -e | grep "^LAYERDIR_core=") +cp -a "${LAYERDIR_core}/meta/classes/dpkg-base.bbclass" "${LAYERDIR_core}/meta/classes/dpkg-base.bbclass.ci-backup" +echo -e "do_fetch_append() {\n\n}" >> "${LAYERDIR_core}/meta/classes/dpkg-base.bbclass" bitbake $BB_ARGS mc:qemuamd64-stretch:isar-image-base -mv "${ISARROOT}/meta/classes/dpkg-base.bbclass.ci-backup" "${ISARROOT}/meta/classes/dpkg-base.bbclass" +mv "${LAYERDIR_core}/meta/classes/dpkg-base.bbclass.ci-backup" "${LAYERDIR_core}/meta/classes/dpkg-base.bbclass" # Test wic --exclude-path -cp -a "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" +cp -a "${LAYERDIR_core}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" "${LAYERDIR_core}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" mv ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img \ ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img.ci-backup -sed -i -e 's/part \/ /part \/ --exclude-path usr /g' "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" +sed -i -e 's/part \/ /part \/ --exclude-path usr /g' "${LAYERDIR_core}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" bitbake $BB_ARGS mc:qemuamd64-stretch:isar-image-base -mv "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" "${ISARROOT}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" +mv "${LAYERDIR_core}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks.ci-backup" "${LAYERDIR_core}/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks" mv ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img.ci-backup \ ${BUILDDIR}/tmp/deploy/images/qemuamd64/isar-image-base-debian-stretch-qemuamd64.wic.img diff --git a/scripts/isar-buildenv-internal b/scripts/isar-buildenv-internal index 72a91ab..fe1e65f 100755 --- a/scripts/isar-buildenv-internal +++ b/scripts/isar-buildenv-internal @@ -59,8 +59,11 @@ fi unset BDIR export BUILDDIR +export BITBAKEDIR="${ISARROOT}/bitbake" +export SCRIPTSDIR="${ISARROOT}/scripts" +export TESTSUITEDIR="${ISARROOT}/testsuite" -for newpath in "$ISARROOT/bitbake/bin" "$ISARROOT/scripts"; do +for newpath in "$BITBAKEDIR/bin" "$SCRIPTSDIR"; do # Remove any existences of $newpath from $PATH PATH=$(echo $PATH | sed -re "s#(^|:)$newpath(:|$)#\2#g;s#^:##") @@ -74,5 +77,5 @@ export PATH BBPATH="${BUILDDIR}" export BBPATH -BB_ENV_EXTRAWHITE="BUILDDIR ISARROOT http_proxy https_proxy ftp_proxy no_proxy GNUPGHOME" +BB_ENV_EXTRAWHITE="BUILDDIR BITBAKEDIR SCRIPTSDIR TESTSUITEDIR http_proxy https_proxy ftp_proxy no_proxy GNUPGHOME" export BB_ENV_EXTRAWHITE