summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Larson <clarson@kergoth.com>2009-04-08 17:36:52 +0000
committerChris Larson <clarson@kergoth.com>2009-04-08 17:36:52 +0000
commit8f5df854ac53b5d7e7dd2fe2432b781cb195383f (patch)
tree69ac5ce2181179b92446e7dc541b3b284174874a
parent463f0ce17972ec68dbda670353b2f354355fb443 (diff)
downloadbitbake-8f5df854ac53b5d7e7dd2fe2432b781cb195383f.tar.gz
BBMASK: survive a non-existant path and don't keep the dir after globbing.
Signed-off-by: Chris Larson <clarson@mvista.com>
-rw-r--r--lib/bb/cooker.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/bb/cooker.py b/lib/bb/cooker.py
index 6833ec21f..83644b9d5 100644
--- a/lib/bb/cooker.py
+++ b/lib/bb/cooker.py
@@ -691,7 +691,11 @@ class BBCooker:
if dirfiles:
newfiles += dirfiles
continue
- newfiles += glob.glob(f) or [ f ]
+ else:
+ globbed = glob.glob(f)
+ if not globbed and os.path.exists(f):
+ globbed = [f]
+ newfiles += globbed
bbmask = bb.data.getVar('BBMASK', self.configuration.data, 1)
@@ -704,9 +708,8 @@ class BBCooker:
bb.msg.fatal(bb.msg.domain.Collection, "BBMASK is not a valid regular expression.")
finalfiles = []
- for i in xrange( len( newfiles ) ):
- f = newfiles[i]
- if bbmask and bbmask_compiled.search(f):
+ for f in newfiles:
+ if bbmask_compiled.search(f):
bb.msg.debug(1, bb.msg.domain.Collection, "skipping masked file %s" % f)
masked += 1
continue