1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-27 02:16:12 +01:00

- fixed #487400: --disable-debuginfo will create no debuginfo packages and --debuginfo will create them. Both override the debuginfo element from the buildinfo

This commit is contained in:
Marcus Hüwe 2009-03-31 11:45:30 +00:00
parent b910253bed
commit 9ff9a1f151
2 changed files with 8 additions and 3 deletions

View File

@ -351,7 +351,7 @@ def main(opts, argv):
bi_file.flush()
bi = Buildinfo(bi_file.name, apiurl)
if bi.debuginfo:
if bi.debuginfo and not (opts.debuginfo or opts.disable_debuginfo):
buildargs.append('--debug')
buildargs = ' '.join(set(buildargs))

View File

@ -1893,12 +1893,14 @@ Please submit there instead, or use --nodevelproject to force direct submission.
help='Run build as root. The default is to build as '
'unprivileged user. Note that a line "# norootforbuild" '
'in the spec file will invalidate this option.')
@cmdln.option('', '--local-package', action='store_true',
@cmdln.option('--local-package', action='store_true',
help='build a package which does not exist on the server')
@cmdln.option('', '--alternative-project', metavar='PROJECT',
@cmdln.option('--alternative-project', metavar='PROJECT',
help='specify the build target project')
@cmdln.option('-d', '--debuginfo', action='store_true',
help='also build debuginfo sub-packages')
@cmdln.option('--disable-debuginfo', action='store_true',
help='disable build of debuginfo packages')
@cmdln.option('-b', '--baselibs', action='store_true',
help='Create -32bit/-64bit/-x86 rpms for other architectures')
def do_build(self, subcmd, opts, *args):
@ -1950,6 +1952,9 @@ Please submit there instead, or use --nodevelproject to force direct submission.
sys.stderr.write('See http://download.opensuse.org/repositories/openSUSE:/Tools/\n')
return 1
if opts.debuginfo and opts.disable_debuginfo:
raise oscerr.WrongOptions('osc: --debuginfo and --disable-debuginfo are mutual exclusive')
if len(args) > 3:
raise oscerr.WrongArgs('Too many arguments')