From 371a10047b697b7ec1daca1bd8ca83db100cc144 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Sun, 20 May 2007 16:24:25 +0000 Subject: BBHandler.py: Raise ParseError for filenames with multiple underscores instead of infinitely looping (1.6, 1.8, trunk) --- ChangeLog | 1 + lib/bb/parse/parse_py/BBHandler.py | 2 ++ 2 files changed, 3 insertions(+) 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: -- cgit 1.2.3-korg