From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: [PATCH] bitbake/cooker: Ensure matchFile returns full pathnames
Date: Thu, 24 May 2012 11:02:02 +0100 [thread overview]
Message-ID: <1337853722.8248.105.camel@ted> (raw)
We should always be passing full pathnames around within bitbake. If
a file was referenced as a relative path to the current working
directory, it might not get passed through the abspath call and
hence the cwd would not get added as a prefix.
This change attempts to put everything through abspath and ignores
failures. Any failure cases would mean the file simply wouldn't exist
and then would get covered by the catchall code below.
[YOCTO #1465]
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
diff --git a/bitbake/lib/bb/cooker.py b/bitbake/lib/bb/cooker.py
index 8ad4922..e036efb 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -985,9 +985,10 @@ class BBCooker:
"""
Find the .bb files which match the expression in 'buildfile'.
"""
-
- if bf.startswith("/") or bf.startswith("../"):
+ try:
bf = os.path.abspath(bf)
+ except:
+ pass
filelist, masked = self.collect_bbfiles()
try:
os.stat(bf)
next reply other threads:[~2012-05-24 10:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 10:02 Richard Purdie [this message]
2012-05-24 12:56 ` [PATCH v2] bitbake/cooker: Ensure matchFile returns full pathnames Richard Purdie
-- strict thread matches above, loose matches on Subject: below --
2012-05-24 10:01 [PATCH] " Richard Purdie
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=1337853722.8248.105.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@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.