diff bin/runtreepkg.py @ 191:94fb3f3ab58b

When building a subset of tracks, make sure new packages are added to pbuilder even if the tracks that depend on them are not being built. To achieve this, the information which tracks are to be built is now stored as the do_build flag in the individual tracks and not by passing only a subset of the tracks ot the PackagerGroup. Otherwise the PackagerGroup would not determine the dependencies correctly.
author Bernhard Herzog <bh@intevation.de>
date Wed, 30 Jul 2008 19:23:10 +0000
parents e83db4482aab
children 1fcdffbeb9de
line wrap: on
line diff
--- a/bin/runtreepkg.py	Wed Jul 30 19:00:31 2008 +0000
+++ b/bin/runtreepkg.py	Wed Jul 30 19:23:10 2008 +0000
@@ -49,14 +49,16 @@
     treepkg_opts, packager_opts = read_config(options.config_file)
 
     if args:
-        packager_opts = [opts for opts in packager_opts if opts["name"] in args]
-        # check whether we got all of the names in args:
-        for opts in packager_opts:
-            name = opts["name"]
-            if name in args:
-                args.remove(name)
-        for name in args:
-            print >>sys.stderr, "No package tracks found named %r" % name
+        selected_tracks = set(args)
+    else:
+        selected_tracks = set(opts["name"] for opts in packager_opts)
+
+    for opts in packager_opts:
+        name = opts["name"]
+        opts["do_build"] = name in selected_tracks
+        selected_tracks.discard(name)
+    for name in selected_tracks:
+        print >>sys.stderr, "No package track found named %r" % name
 
     if packager_opts:
         group = PackagerGroup([create_package_track(**opts)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)