1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 01:06:17 +02:00

read debug packages from server side project configuration

=> avoids unresolvable errors when distro is not providing the
    extra/debug package
This commit is contained in:
Adrian Schröter 2019-12-03 15:05:48 +01:00
parent d5c313cc08
commit a628ea8cca
4 changed files with 24 additions and 9 deletions

2
NEWS
View File

@ -1,6 +1,8 @@
0.167
- osc shell/chroot/wipe is now handled via build script (working for chroot and KVM only atm)
- osc build --vm-type=qemu support for cross architecture builds
- osc build is reading debug packages from prjconf now
(extra-pkgs definition is therefore by default empty)
0.166.2
- Don't enforce password reuse (boo#1156501)

View File

@ -797,8 +797,18 @@ def main(apiurl, opts, argv):
if not os.path.isfile(bc_filename):
raise oscerr.WrongOptions('--offline is not possible, no local buildconfig file')
else:
print('Getting buildinfo from server and store to %s' % bi_filename)
print('Getting buildconfig from server and store to %s' % bc_filename)
bc = get_buildconfig(apiurl, prj, repo)
if not bc_file:
bc_file = open(bc_filename, 'w')
bc_file.write(decode_it(bc))
bc_file.flush()
if os.path.exists('/usr/lib/build/queryconfig') and not opts.nodebugpackages:
debug_pkgs = decode_it(return_external('/usr/lib/build/queryconfig', '--dist', bc_filename, 'substitute', 'obs:cli_debug_packages'))
if len(debug_pkgs) > 0:
extra_pkgs += debug_pkgs.strip().split(" ")
print('Getting buildinfo from server and store to %s' % bi_filename)
bi_text = decode_it(get_buildinfo(apiurl,
prj,
pac,
@ -814,12 +824,10 @@ def main(apiurl, opts, argv):
kiwipath = None
if build_type == 'kiwi':
kiwipath = get_kiwipath_from_buildinfo(apiurl, bi_filename, prj, repo)
print('Getting buildconfig from server and store to %s' % bc_filename)
bc = get_buildconfig(apiurl, prj, repo, kiwipath)
if not bc_file:
bc_file = open(bc_filename, 'w')
bc_file.write(decode_it(bc))
bc_file.flush()
bc = get_buildconfig(apiurl, prj, repo, kiwipath)
bc_file.seek(0)
bc_file.write(decode_it(bc))
bc_file.flush()
except HTTPError as e:
if e.code == 404:
# check what caused the 404

View File

@ -6263,6 +6263,8 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='Do not run build checks on the resulting packages.')
@cmdln.option('--no-verify', '--noverify', action='store_true',
help='Skip signature verification (via pgp keys) of packages used for build. (Global config in oscrc: no_verify)')
@cmdln.option('--nodebugpackages', '--no-debug-packages', action='store_true',
help='Skip installation of additional debug packages for CLI builds')
@cmdln.option('--noservice', '--no-service', action='store_true',
help='Skip run of local source services as specified in _service file.')
@cmdln.option('-p', '--prefer-pkgs', metavar='DIR', action='append',

View File

@ -278,8 +278,11 @@ apiurl = %(apiurl)s
# extra packages to install when building packages locally (osc build)
# this corresponds to osc build's -x option and can be overridden with that
# -x '' can also be given on the command line to override this setting, or
# you can have an empty setting here.
#extra-pkgs = vim gdb strace
# you can have an empty setting here. This global setting may leads to
# dependency problems when the base distro is not providing the package.
# => using server side definition via cli_debug_packages substitute rule is
# recommended therefore.
#extra-pkgs =
# build platform is used if the platform argument is omitted to osc build
#build_repository = %(build_repository)s