All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Richard Purdie" <richard.purdie@linuxfoundation.org>
To: Dorinda <dorindabassey@gmail.com>,
	 openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] sanity.bbclass: verify that user isn't building in PSEUDO_IGNORE_PATHS
Date: Mon, 25 Jan 2021 23:54:42 +0000	[thread overview]
Message-ID: <77ad8e184576449791b56fe9c6e0fc872cc98a42.camel@linuxfoundation.org> (raw)
In-Reply-To: <20210125230811.21862-1-dorindabassey@gmail.com>

On Tue, 2021-01-26 at 00:08 +0100, Dorinda wrote:
> If a user builds in a path in PSEUDO_IGNORE_PATHS, random failures are generated. Hence this patch adds a sanity check in sanity.bbclass to ensure that a user isn't building in PSEUDO_IGNORE_PATHS.
> 
> [YOCTO #14179]
> 
> Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
> ---
>  meta/classes/sanity.bbclass | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
> index 2040b48595..14271c1ca9 100644
> --- a/meta/classes/sanity.bbclass
> +++ b/meta/classes/sanity.bbclass
> @@ -703,6 +703,13 @@ def check_sanity_version_change(status, d):
>      if (tmpdirmode & stat.S_ISUID):
>          status.addresult("TMPDIR is setuid, please don't build in a setuid directory")
>  
> 
> 
> 
> +    # Check that a user isn't building in a path in PSEUDO_IGNORE_PATHS
> +    pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",")
> +    workdir = d.getVar('WORKDIR', expand=True)
> +    for i in pseudoignorepaths:
> +        if i and workdir.startswith(i):
> +            status.addresult("You are building in a path in PSEUDO_IGNORE_PATHS: " + str(i) + " please don't build in this directory: " + str(workdir) + "\n")
> 

To ensure the user fully understands this, should this be something
like:


status.addresult("You are building in a path included in
PSEUDO_IGNORE_PATHS " + str(i) + " which will not work, please locate
the build outside this path.\n")

as we then tell the user what to do (and don't repeat effectively the
same information twice).

Cheers,

Richard


  reply	other threads:[~2021-01-25 23:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-25 23:08 [PATCH] sanity.bbclass: verify that user isn't building in PSEUDO_IGNORE_PATHS Dorinda
2021-01-25 23:54 ` Richard Purdie [this message]
2021-01-27  9:46   ` [OE-core] " Chen Qi
2021-01-27  9:49     ` Richard Purdie
2021-01-28  8:43       ` Chen Qi
2021-01-29  8:49       ` Chen Qi
2021-01-26  0:53 Dorinda
2021-01-26  9:20 ` [OE-core] " Quentin Schulz

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=77ad8e184576449791b56fe9c6e0fc872cc98a42.camel@linuxfoundation.org \
    --to=richard.purdie@linuxfoundation.org \
    --cc=dorindabassey@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.