* [PATCH] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap
@ 2021-01-27 22:52 Dorinda
2021-01-27 23:47 ` [OE-core] " Tomasz Dziendzielski
0 siblings, 1 reply; 3+ messages in thread
From: Dorinda @ 2021-01-27 22:52 UTC (permalink / raw)
To: openembedded-core; +Cc: dorindabassey
added a sanity check for when PSEUDO_IGNORE_PATHS and ${S} overlap to avoid random failures generated.
[YOCTO #14193]
Signed-off-by: Dorinda Bassey <dorindabassey@gmail.com>
---
meta/classes/sanity.bbclass | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index c6842ff549..34215ebfb2 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -710,6 +710,14 @@ def check_sanity_version_change(status, d):
if i and workdir.startswith(i):
status.addresult("You are building in a path included in PSEUDO_IGNORE_PATHS " + str(i) + " please locate the build outside this path.\n")
+ # Check if PSEUDO_IGNORE_PATHS and ${S} overlap
+ pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS', expand=True).split(",")
+ sourcefile = d.getVar('S')
+ for i in pseudoignorepaths:
+ if i and sourcefile:
+ if sourcefile.startswith(i) or i.startswith(sourcefile):
+ status.addresult("a path included in PSEUDO_IGNORE_PATHS " + str(i) + " and ${S} (source files) path " + str(sourcefile) + " are overlapping each other, please set ${S} in your recipe to point to a different directory. \n")
+
# Some third-party software apparently relies on chmod etc. being suid root (!!)
import stat
suid_check_bins = "chown chmod mknod".split()
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap
2021-01-27 22:52 [PATCH] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap Dorinda
@ 2021-01-27 23:47 ` Tomasz Dziendzielski
2021-01-28 13:58 ` Dorinda
0 siblings, 1 reply; 3+ messages in thread
From: Tomasz Dziendzielski @ 2021-01-27 23:47 UTC (permalink / raw)
To: Dorinda; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 826 bytes --]
>+ # Check if PSEUDO_IGNORE_PATHS and ${S} overlap
>+ pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS',
expand=True).split(",")
>+ sourcefile = d.getVar('S')
>+ for i in pseudoignorepaths:
>+ if i and sourcefile:
>+ if sourcefile.startswith(i) or i.startswith(sourcefile):
>+ status.addresult("a path included in PSEUDO_IGNORE_PATHS
" + str(i) + " and ${S} (source files) path " + str(sourcefile) + " are
overlapping each other, please set ${S} in your recipe to point to a
different directory. \n")
Isn't ${S} added to PSEUDO_IGNORE_PATHS almost every time in
meta/classes/base.bbclass?
if os.path.normpath(d.getVar("WORKDIR")) !=
os.path.normpath(d.getVar("S")):
d.appendVar("PSEUDO_IGNORE_PATHS", ",${S}")
Best regards,
Tomasz Dziendzielski
[-- Attachment #2: Type: text/html, Size: 1123 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [OE-core] [PATCH] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap
2021-01-27 23:47 ` [OE-core] " Tomasz Dziendzielski
@ 2021-01-28 13:58 ` Dorinda
0 siblings, 0 replies; 3+ messages in thread
From: Dorinda @ 2021-01-28 13:58 UTC (permalink / raw)
To: Tomasz Dziendzielski; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 1177 bytes --]
Hmm, thanks for spotting this, I think that was an oversight on my part.
IMHO i think this patch should apply to cases where {WORKDIR} = {S}. so
i'll make some changes to the patch soon.
Thanks,
Dorinda.
On Wed, Jan 27, 2021 at 6:44 PM Tomasz Dziendzielski <
tomasz.dziendzielski@gmail.com> wrote:
> >+ # Check if PSEUDO_IGNORE_PATHS and ${S} overlap
> >+ pseudoignorepaths = d.getVar('PSEUDO_IGNORE_PATHS',
> expand=True).split(",")
> >+ sourcefile = d.getVar('S')
> >+ for i in pseudoignorepaths:
> >+ if i and sourcefile:
> >+ if sourcefile.startswith(i) or i.startswith(sourcefile):
> >+ status.addresult("a path included in PSEUDO_IGNORE_PATHS
> " + str(i) + " and ${S} (source files) path " + str(sourcefile) + " are
> overlapping each other, please set ${S} in your recipe to point to a
> different directory. \n")
>
> Isn't ${S} added to PSEUDO_IGNORE_PATHS almost every time in
> meta/classes/base.bbclass?
> if os.path.normpath(d.getVar("WORKDIR")) !=
> os.path.normpath(d.getVar("S")):
> d.appendVar("PSEUDO_IGNORE_PATHS", ",${S}")
>
> Best regards,
> Tomasz Dziendzielski
>
[-- Attachment #2: Type: text/html, Size: 1767 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-01-28 13:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-27 22:52 [PATCH] sanity.bbclass: check if PSEUDO_IGNORE_PATHS and ${S} overlap Dorinda
2021-01-27 23:47 ` [OE-core] " Tomasz Dziendzielski
2021-01-28 13:58 ` Dorinda
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.