Mercurial > treepkg
changeset 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 | eaadf5350a1a |
files | bin/runtreepkg.py treepkg/packager.py |
diffstat | 2 files changed, 14 insertions(+), 9 deletions(-) [+] |
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)
--- a/treepkg/packager.py Wed Jul 30 19:00:31 2008 +0000 +++ b/treepkg/packager.py Wed Jul 30 19:23:10 2008 +0000 @@ -306,7 +306,7 @@ def __init__(self, name, base_dir, svn_url, root_cmd, pbuilderrc, deb_email, deb_fullname, packager_class="treepkg.packager", debrevision_prefix="treepkg", handle_dependencies=False, - signing_key_id=""): + signing_key_id="", do_build=True): self.name = name self.base_dir = base_dir self.svn_url = svn_url @@ -316,6 +316,7 @@ self.deb_fullname = deb_fullname self.debrevision_prefix = debrevision_prefix self.signing_key_id = signing_key_id + self.do_build = do_build self.handle_dependencies = handle_dependencies self.dependencies = None self.pkg_dir_template = "%(revision)d-%(increment)d" @@ -442,6 +443,8 @@ If do_svn_update is true -- the default -- update the working copy to the the revision specified with the revision parameter or if revision is None, the latest revision in the repository.""" + if not self.do_build: + return None if do_svn_update: self.update_checkout(revision=revision) current_revision = self.last_changed_revision()