wafsamba: Avoid NameError when printing error about missing system deps.
authorJelmer Vernooij <jelmer@samba.org>
Tue, 3 Apr 2012 14:12:54 +0000 (16:12 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Tue, 3 Apr 2012 15:46:42 +0000 (17:46 +0200)
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Apr  3 17:46:42 CEST 2012 on sn-devel-104

buildtools/wafsamba/samba_bundled.py

index a29bfa3a1bd2fe142c9ab9bf4af53aeaab1a539f..e13da9f61249a2167c6410cf00eaf7f7293f674e 100644 (file)
@@ -84,11 +84,12 @@ def LIB_MUST_BE_BUNDLED(conf, libname):
 
 @conf
 def CHECK_PREREQUISITES(conf, prereqs):
+    missing = []
     for syslib in TO_LIST(prereqs):
         f = 'FOUND_SYSTEMLIB_%s' % syslib
         if not f in conf.env:
-            return False
-    return True
+            missing.append(syslib)
+    return syslib
 
 
 @runonce
@@ -109,9 +110,10 @@ def CHECK_BUNDLED_SYSTEM_PKG(conf, libname, minversion='0.0.0',
     # system version is found. That prevents possible use of mixed library
     # versions
     if onlyif:
-        if not conf.CHECK_PREREQUISITES(onlyif):
+        missing = conf.CHECK_PREREQUISITES(onlyif)
+        if missing:
             if not conf.LIB_MAY_BE_BUNDLED(libname):
-                Logs.error('ERROR: Use of system library %s depends on missing system library %s' % (libname, onlyif))
+                Logs.error('ERROR: Use of system library %s depends on missing system library/libraries %r' % (libname, missing))
                 sys.exit(1)
             conf.env[found] = False
             return False
@@ -169,9 +171,10 @@ def CHECK_BUNDLED_SYSTEM(conf, libname, minversion='0.0.0',
     # system version is found. That prevents possible use of mixed library
     # versions
     if onlyif:
-        if not conf.CHECK_PREREQUISITES(onlyif):
+        missing = conf.CHECK_PREREQUISITES(onlyif)
+        if missing:
             if not conf.LIB_MAY_BE_BUNDLED(libname):
-                Logs.error('ERROR: Use of system library %s depends on missing system library %s' % (libname, syslib))
+                Logs.error('ERROR: Use of system library %s depends on missing system library/libraries %r' % (libname, missing))
                 sys.exit(1)
             conf.env[found] = False
             return False