providers.py: When a regexp fails to compile for PACKAGES_DYNAMIC, print a more usefu...
authorRichard Purdie <rpurdie@linux.intel.com>
Sat, 19 Jul 2008 17:58:18 +0000 (17:58 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Sat, 19 Jul 2008 17:58:18 +0000 (17:58 +0000)
ChangeLog
lib/bb/providers.py

index 3890e22..9dc17d8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -46,6 +46,7 @@ Changes in BitBake 1.8.x:
        - Make sure expandKeys has been called on the data dictonary before running tasks
        - Correctly add a task override in the form task-TASKNAME.
        - Revert the '-' character fix in class names since it breaks things
+       - When a regexp fails to compile for PACKAGES_DYNAMIC, print a more useful error (#4444)
 
 Changes in BitBake 1.8.10:
        - Psyco is available only for x86 - do not use it on other architectures.
index 0ad5876..1bd1a39 100644 (file)
@@ -296,7 +296,11 @@ def getRuntimeProviders(dataCache, rdepend):
 
     # Only search dynamic packages if we can't find anything in other variables
     for pattern in dataCache.packages_dynamic:
-        regexp = re.compile(pattern)
+        try:
+            regexp = re.compile(pattern)
+       except:
+            bb.msg.error(bb.msg.domain.Provider, "Error parsing re expression: %s" % pattern)
+           raise
         if regexp.match(rdepend):
             rproviders += dataCache.packages_dynamic[pattern]