builder: make repo a proper optional argument

When the builder is used as an command line binary: have `repo`
be a proper command line argument. It was currently specified
before arch which can be passed multiple times, but so does
repo; hence one of them needs to be optional.
This commit is contained in:
Christian Kellner 2022-01-25 17:34:37 +00:00
parent 9c5f38fc35
commit 2ca0f3b370
2 changed files with 3 additions and 3 deletions

View file

@ -551,10 +551,10 @@ def main():
subpar.add_argument("version", metavar="VERSION", help='The version')
subpar.add_argument("release", metavar="RELEASE", help='The release')
subpar.add_argument("distro", metavar="DISTRO", help='The distribution')
subpar.add_argument("repo", metavar="REPO", help='The repository to use',
type=str, action="append", default=[])
subpar.add_argument("arch", metavar="ARCHITECTURE", help='Request the architecture',
type=str, nargs="+")
subpar.add_argument("--repo", metavar="REPO", help='The repository to use',
type=str, action="append", default=[])
subpar.add_argument("--format", metavar="FORMAT", help='Request the image format [qcow2]',
action="append", type=str, default=[])
subpar.add_argument("--koji", metavar="URL", help='The koji url',

View file

@ -645,8 +645,8 @@ class TestBuilderPlugin(PluginTest):
"33",
"20201015.0",
"fedora-33",
"http://download.localhost/pub/linux/$arch",
"x86_64",
"--repo", "http://download.localhost/pub/linux/$arch",
"--cert", ", ".join(certs),
"--ca", "test/data/example-ca.pem"
]