From patchwork Thu May 24 12:56:34 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [bitbake-devel, v2] bitbake/cooker: Ensure matchFile returns full pathnames Date: Thu, 24 May 2012 12:56:34 -0000 From: Richard Purdie X-Patchwork-Id: 28607 Message-Id: <1337864194.8248.110.camel@ted> To: bitbake-devel 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 --- 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)