summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2007-05-20 16:24:25 +0000
committerRichard Purdie <rpurdie@linux.intel.com>2007-05-20 16:24:25 +0000
commitc780b2894c75d7766632f36db9214129e1380c75 (patch)
tree819ce7e58a88bffb601aa07fa8eee217b67e29f8
parentdeeb549d54d4ef6f3ece515be1ecb8f20d3b358f (diff)
downloadbitbake-c780b2894c75d7766632f36db9214129e1380c75.tar.gz
BBHandler.py: Raise ParseError for filenames with multiple underscores instead of infinitely looping (1.6, 1.8, trunk)
-rw-r--r--ChangeLog1
-rw-r--r--lib/bb/parse/parse_py/BBHandler.py2
2 files changed, 3 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 202bf0bc2..c84a0f6a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
Changes in BitBake 1.6.7:
- Make sure __inherit_cache is updated before calling include() (from Michael Krelin)
+ - Raise ParseError for filenames with multiple underscores instead of infinitely looping
Changes in BitBake 1.6.5:
- Update the MANIFEST file
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index e6239031a..ed4d2d900 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/lib/bb/parse/parse_py/BBHandler.py
@@ -367,6 +367,8 @@ def vars_from_file(mypkg, d):
myfile = os.path.splitext(os.path.basename(mypkg))
parts = myfile[0].split('_')
__pkgsplit_cache__[mypkg] = parts
+ if len(parts) > 3:
+ raise ParseError("Unable to generate default variables from the filename: %s (too many underscores)" % mypkg)
exp = 3 - len(parts)
tmplist = []
while exp != 0: