aboutsummaryrefslogtreecommitdiffstats
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
commit371a10047b697b7ec1daca1bd8ca83db100cc144 (patch)
treeeaf85c6dc54aa88f93fe70acec652acc5e3588cb
parent1a2aa6ac8acbc798fcddfc26281b48dbd935fa88 (diff)
downloadbitbake-371a10047b697b7ec1daca1bd8ca83db100cc144.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 132c0ddf6..6b7e4d4e1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
Changes in Bitbake 1.8.x:
- Make sure __inherit_cache is updated before calling include() (from Michael Krelin)
- Fix bug when target was in ASSUME_PROVIDED (#2236)
+ - Raise ParseError for filenames with multiple underscores instead of infinitely looping
Changes in Bitbake 1.8.2:
- Catch truncated cache file errors
diff --git a/lib/bb/parse/parse_py/BBHandler.py b/lib/bb/parse/parse_py/BBHandler.py
index 19222d292..20fa60355 100644
--- a/lib/bb/parse/parse_py/BBHandler.py
+++ b/lib/bb/parse/parse_py/BBHandler.py
@@ -377,6 +377,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: