1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-05 07:03:38 +02: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:
2022-10-13 12:52:12 +02:00
committed by GitHub
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',