giscanner: Don't run pkg-config when there's no packages specified
authorJasper St. Pierre <jstpierre@mecheye.net>
Tue, 27 Mar 2012 16:18:54 +0000 (13:18 -0300)
committerJohan Dahlin <jdahlin@litl.com>
Mon, 9 Apr 2012 15:01:17 +0000 (12:01 -0300)
This prevents a simple error from pkg-config, "Must specify package names
on command line"

https://bugzilla.gnome.org/show_bug.cgi?id=673668

giscanner/scannermain.py

index bcacd0f610179ef46f0cb6d661470e803b32fb4f..794cede3941033fefb9a1aba7ab87fe9f9feb3a1 100755 (executable)
@@ -405,9 +405,10 @@ def scanner_main(args):
 
     packages = set(options.packages)
     packages.update(transformer.get_pkgconfig_packages())
-    exit_code = process_packages(options, packages)
-    if exit_code:
-        return exit_code
+    if packages:
+        exit_code = process_packages(options, packages)
+        if exit_code:
+            return exit_code
 
     ss = create_source_scanner(options, args)