1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-12 16:56:15 +01:00

Merge pull request #1167 from OlegGirko/extra-pkgs-from-file

Add "--extra-pkgs-from" ("-X") option to osc build
This commit is contained in:
Daniel Mach 2022-10-13 12:52:12 +02:00 committed by GitHub
commit ca744aa7d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -868,6 +868,12 @@ def main(apiurl, opts, argv):
elif opts.extra_pkgs != ['']:
extra_pkgs = opts.extra_pkgs
if opts.extra_pkgs_from:
for filename in opts.extra_pkgs_from:
with open(filename, encoding="utf-8") as f:
for line in f:
extra_pkgs.append(line.rstrip('\n'))
if xp:
extra_pkgs += xp

View File

@ -6290,6 +6290,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help=HELP_MULTIBUILD_ONE)
@cmdln.option('-x', '--extra-pkgs', metavar='PAC', action='append',
help='Add this package when installing the build-root')
@cmdln.option('-X', '--extra-pkgs-from', metavar='FILE', action='append',
help='Add packages listed in this file when installing the build-root')
@cmdln.option('--root', metavar='ROOT',
help='Build in specified directory')
@cmdln.option('-j', '--jobs', metavar='N',