diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-07-17 12:24:41 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-07-17 12:24:41 +0000 |
commit | 5335dc3383f43a037c548158b3cd6bc385eb5770 (patch) | |
tree | cb0a918e0ec1b8c3f188f726bdb219f7367a0967 | |
parent | 36e54d749e487a4105744e72d3346e777200ed4c (diff) | |
download | mgarepo-5335dc3383f43a037c548158b3cd6bc385eb5770.tar mgarepo-5335dc3383f43a037c548158b3cd6bc385eb5770.tar.gz mgarepo-5335dc3383f43a037c548158b3cd6bc385eb5770.tar.bz2 mgarepo-5335dc3383f43a037c548158b3cd6bc385eb5770.tar.xz mgarepo-5335dc3383f43a037c548158b3cd6bc385eb5770.zip |
Allow using the format <DISTRO>/<PACKAGE> for submit groups
It will expand <DISTRO>/<PACKAGE> for each package name of the group (using
the same <DISTRO> of course.)
We must allow it as the option -d (which would be used for --distro) would
be confused with --define, so we'd better use the standard format that is
available for all other commands.
-rw-r--r-- | BRANCH | 2 | ||||
-rw-r--r-- | RepSys/commands/submit.py | 9 |
2 files changed, 10 insertions, 1 deletions
@@ -21,6 +21,8 @@ Notes - No support for using the <distro>/<package> format. The -d command line option should be used. + (actually it turned out to be really needed, as we can't use -d [I plan + to use -d for --define]) TODO diff --git a/RepSys/commands/submit.py b/RepSys/commands/submit.py index 79129f1..c4a0c05 100644 --- a/RepSys/commands/submit.py +++ b/RepSys/commands/submit.py @@ -102,12 +102,19 @@ def parse_options(): def expand_group(group): name, rev = layout.split_url_revision(group) + distro = None + if "/" in name: + distro, name = name.rsplit("/", 1) found = config.get("submit-groups", name) packages = [group] if found: packages = found.split() if rev: - packages = [("%s@%s" % package) for package in packages] + packages = [("%s@%s" % (package, rev)) + for package in packages] + if distro: + packages = ["%s/%s" % (distro, package) + for package in packages] return packages def list_targets(option, opt, val, parser): |