From 5335dc3383f43a037c548158b3cd6bc385eb5770 Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Thu, 17 Jul 2008 12:24:41 +0000 Subject: Allow using the format / for submit groups It will expand / for each package name of the group (using the same 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. --- BRANCH | 2 ++ RepSys/commands/submit.py | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/BRANCH b/BRANCH index 1ca2278..366ac76 100644 --- a/BRANCH +++ b/BRANCH @@ -21,6 +21,8 @@ Notes - No support for using the / 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): -- cgit v1.2.1