From: vijai kumar <vijaikumar.kanagarajan@gmail.com>
To: isar-users <isar-users@googlegroups.com>
Subject: Re: [PATCH v2] Replace ISARROOT with more relevant variables
Date: Mon, 27 Apr 2020 03:22:04 -0700 (PDT) [thread overview]
Message-ID: <da423fa8-a417-45c6-8b47-86acff472e8e@googlegroups.com> (raw)
In-Reply-To: <20200427091154.5855-1-Vijaikumar_Kanagarajan@mentor.com>
[-- Attachment #1.1: Type: text/plain, Size: 8100 bytes --]
Somewhere somehow the additional "From:" field from git send email is
stripped.
All my configurations are right and I tested with some dummy mailing list
as well, this info is not there.
But, while sending I do see that the git-send email clearly says
From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>.
I believe I would have to manually enter this information in message body
still I figure it out.
Will send a v3.
Thanks,
Vijai Kumar K
On Monday, April 27, 2020 at 2:42:16 PM UTC+5:30, vijai kumar wrote:
>
> 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 <Vijaikumar_Kanagarajan@mentor.com>
> ---
> isar-init-build-env | 1 +
> meta/classes/image-sdk-extension.bbclass | 2 +-
> meta/classes/wic-img.bbclass | 31 ++++++++++++------------
> scripts/ci_build.sh | 12 +++++----
> scripts/isar-buildenv-internal | 7 ++++--
> 5 files changed, 30 insertions(+), 23 deletions(-)
>
> 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 adc403b..d15aba9 100755
> --- a/scripts/ci_build.sh
> +++ b/scripts/ci_build.sh
> @@ -138,8 +138,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
>
> @@ -187,9 +187,11 @@ if [ -z "$FAST_BUILD" ]; then
> bitbake $BB_ARGS $TARGETS_SET
> 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}/classes/dpkg-base.bbclass"
> "${LAYERDIR_core}/classes/dpkg-base.bbclass.ci-backup"
> +echo -e "do_fetch_append() {\n\n}" >>
> "${LAYERDIR_core}/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}/classes/dpkg-base.bbclass.ci-backup"
> "${LAYERDIR_core}/classes/dpkg-base.bbclass"
> 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
> --
> 2.17.1
>
>
[-- Attachment #1.2: Type: text/html, Size: 10309 bytes --]
next prev parent reply other threads:[~2020-04-27 10:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-28 19:35 [PATCH] Introduce SCRIPTSDIR variable Vijai Kumar K
2020-01-28 21:43 ` Henning Schild
2020-01-29 6:22 ` Vijai Kumar K
2020-02-18 6:05 ` vijai kumar
2020-04-05 16:49 ` Baurzhan Ismagulov
2020-04-06 8:30 ` vijai kumar
2020-04-23 14:56 ` vijai kumar
2020-04-27 9:11 ` [PATCH v2] Replace ISARROOT with more relevant variables Vijai Kumar K
2020-04-27 10:22 ` vijai kumar [this message]
2020-04-27 10:28 ` [PATCH v3] " Vijai Kumar K
2020-05-26 2:54 ` vijai kumar
2020-05-26 7:51 ` Baurzhan Ismagulov
2020-05-28 5:28 ` vijai kumar
2020-09-16 19:11 ` Baurzhan Ismagulov
2020-09-17 2:45 ` vijai kumar
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=da423fa8-a417-45c6-8b47-86acff472e8e@googlegroups.com \
--to=vijaikumar.kanagarajan@gmail.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