From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Peter Kjellerstedt <peter.kjellerstedt@axis.com>,
openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCHv2 3/4] bitbake.conf: Canonicalize paths in PSEUDO_IGNORE_PATHS
Date: Thu, 26 Nov 2020 14:47:08 +0000 [thread overview]
Message-ID: <4ddd2873ff90af2675c690fd44ab8881ff609a70.camel@linuxfoundation.org> (raw)
In-Reply-To: <9b62c1babb6a53472329d57fa6ec2ac8ed70a3f8.1606312002.git.pkj@axis.com>
On Wed, 2020-11-25 at 14:48 +0100, Peter Kjellerstedt wrote:
> Introduce PSEUDO_IGNORE_REAL_PATHS and make it contain the canonicalized
> paths from PSEUDO_IGNORE_PATHS, obtained by passing the latter to
> oe.path.to_real_paths(). This is needed since pseudo's
> pseudo_client_ignore_path_chroot() will compare the ignored paths to
> paths that have been canonicalized.
>
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
> meta/conf/bitbake.conf | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
This looks like a good way to fix this, except I have a strong dislike
of "REAL" variables.
> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
> index 9742fe4fe2..4862095a1b 100644
> --- a/meta/conf/bitbake.conf
> +++ b/meta/conf/bitbake.conf
> @@ -685,15 +685,16 @@ SRC_URI = ""
> PSEUDO_LOCALSTATEDIR ?= "${WORKDIR}/pseudo/"
> PSEUDO_PASSWD ?= "${STAGING_DIR_TARGET}:${PSEUDO_SYSROOT}"
> PSEUDO_SYSROOT = "${COMPONENTS_DIR}/${BUILD_ARCH}/pseudo-native"
> +PSEUDO_IGNORE_REAL_PATHS = "${@','.join(os.path.realpath(path) for path in (d.getVar('PSEUDO_IGNORE_PATHS') or '').split(','))}"
> PSEUDO_IGNORE_PATHS = "/usr/,/etc/,/lib,/dev/,${T},${WORKDIR}/recipe-sysroot,${SSTATE_DIR},${STAMPS_DIR},${WORKDIR}/pkgdata-sysroot,${TMPDIR}/sstate-control,${DEPLOY_DIR},${WORKDIR}/deploy-,${TMPDIR}/buildstats,${WORKDIR}/sstate-build-package_,${WORKDIR}/sstate-install-package_,${WORKDIR}/sstate-build-image_complete,${TMPDIR}/sysroots-components,${BUILDHISTORY_DIR},${TMPDIR}/pkgdata,${TOPDIR}/cache,${COREBASE}/scripts,${@','.join(d.getVar('BBLAYERS').split())},${CCACHE_DIR}"
>
> export PSEUDO_DISABLED = "1"
> #export PSEUDO_PREFIX = "${STAGING_DIR_NATIVE}${prefix_native}"
> #export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}"
> #export PSEUDO_LIBDIR = "${STAGING_DIR_NATIVE}$PSEUDOBINDIR/../lib/pseudo/lib
> -FAKEROOTBASEENV = "PSEUDO_BINDIR=${PSEUDO_SYSROOT}${bindir_native} PSEUDO_LIBDIR=${PSEUDO_SYSROOT}${prefix_native}/lib/pseudo/lib PSEUDO_PREFIX=${PSEUDO_SYSROOT}${prefix_native} PSEUDO_IGNORE_PATHS=${PSEUDO_IGNORE_PATHS} PSEUDO_DISABLED=1"
> +FAKEROOTBASEENV = "PSEUDO_BINDIR=${PSEUDO_SYSROOT}${bindir_native} PSEUDO_LIBDIR=${PSEUDO_SYSROOT}${prefix_native}/lib/pseudo/lib PSEUDO_PREFIX=${PSEUDO_SYSROOT}${prefix_native} PSEUDO_IGNORE_PATHS=${PSEUDO_IGNORE_REAL_PATHS} PSEUDO_DISABLED=1"
> FAKEROOTCMD = "${PSEUDO_SYSROOT}${bindir_native}/pseudo"
> -FAKEROOTENV = "PSEUDO_PREFIX=${PSEUDO_SYSROOT}${prefix_native} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR} PSEUDO_PASSWD=${PSEUDO_PASSWD} PSEUDO_NOSYMLINKEXP=1 PSEUDO_IGNORE_PATHS=${PSEUDO_IGNORE_PATHS} PSEUDO_DISABLED=0"
> +FAKEROOTENV = "PSEUDO_PREFIX=${PSEUDO_SYSROOT}${prefix_native} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR} PSEUDO_PASSWD=${PSEUDO_PASSWD} PSEUDO_NOSYMLINKEXP=1 PSEUDO_IGNORE_PATHS=${PSEUDO_IGNORE_REAL_PATHS} PSEUDO_DISABLED=0"
>
I'm wondering if we create a function in lib/oe/utils.py and then use
something like:
PSEUDO_IGNORE_PATHS=${@oe.utils.realpath("PSEUDO_IGNORE_REAL_PATHS")}
?
Cheers,
Richard
next prev parent reply other threads:[~2020-11-26 14:47 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-25 13:48 [PATCHv2 0/4] Support symbolic links in paths in PSEUDO_IGNORE_PATHS Peter Kjellerstedt
2020-11-25 13:48 ` [PATCHv2 1/4] pseudo: Simplify pseudo_client_ignore_path_chroot() Peter Kjellerstedt
2020-11-30 11:47 ` [OE-core] " Richard Purdie
2020-12-01 1:20 ` Peter Kjellerstedt
2020-11-25 13:48 ` [PATCHv2 2/4] bitbake.conf: Add all layers (from BBLAYERS) to PSEUDO_IGNORE_PATHS Peter Kjellerstedt
2020-11-25 13:48 ` [PATCHv2 3/4] bitbake.conf: Canonicalize paths in PSEUDO_IGNORE_PATHS Peter Kjellerstedt
2020-11-26 14:47 ` Richard Purdie [this message]
2020-11-26 20:38 ` [OE-core] " Peter Kjellerstedt
2020-11-26 23:41 ` Richard Purdie
2020-11-30 17:44 ` Peter Kjellerstedt
2020-12-01 7:58 ` Richard Purdie
2020-11-25 13:48 ` [PATCHv2 4/4] wic: Pass canonicalized " Peter Kjellerstedt
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=4ddd2873ff90af2675c690fd44ab8881ff609a70.camel@linuxfoundation.org \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=peter.kjellerstedt@axis.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