From c780b2894c75d7766632f36db9214129e1380c75 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 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: -- cgit 1.2.3-korg