From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: bitbake-devel <bitbake-devel@lists.openembedded.org>
Subject: [PATCH v2] bitbake/cooker: Ensure matchFile returns full pathnames
Date: Thu, 24 May 2012 13:56:34 +0100 [thread overview]
Message-ID: <1337864194.8248.110.camel@ted> (raw)
In-Reply-To: <1337853722.8248.105.camel@ted>
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 adds a second pass at ensuring we only return absolute paths.
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..bafd832 100644
--- a/bitbake/lib/bb/cooker.py
+++ b/bitbake/lib/bb/cooker.py
@@ -985,12 +985,12 @@ class BBCooker:
"""
Find the .bb files which match the expression in 'buildfile'.
"""
-
if bf.startswith("/") or bf.startswith("../"):
bf = os.path.abspath(bf)
filelist, masked = self.collect_bbfiles()
try:
os.stat(bf)
+ bf = os.path.abspath(bf)
return [bf]
except OSError:
regexp = re.compile(bf)
prev parent reply other threads:[~2012-05-24 13:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-24 10:02 [PATCH] bitbake/cooker: Ensure matchFile returns full pathnames Richard Purdie
2012-05-24 12:56 ` Richard Purdie [this message]
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=1337864194.8248.110.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.