mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-13 17:16:23 +01:00
Ignore "--alternative-project <prj>" if it is equal to the wc's project
Without this change, using "--alternative-project <prj>" in combination with "--multibuild-package <flavor>" yields to unexpected results (from a user's point of view). Note that this may break existing (artificial) workflows (e.g., using --alternative-project to ignore the package meta's debuginfo flag), but these workflows should be rare and there are options to achieve the same. Fixes: #376 ("osc build -M something does not work with --alternative-project")
This commit is contained in:
parent
5b3a0edc2e
commit
9c4f0d5d30
@ -6170,6 +6170,14 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
||||
if len(args) > 3:
|
||||
raise oscerr.WrongArgs('Too many arguments')
|
||||
|
||||
project = None
|
||||
try:
|
||||
project = store_read_project(os.curdir)
|
||||
except oscerr.NoWorkingCopy:
|
||||
pass
|
||||
if project == opts.alternative_project:
|
||||
opts.alternative_project = None
|
||||
|
||||
args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project, False, opts.vm_type, opts.multibuild_package)
|
||||
|
||||
# check for source services
|
||||
|
Loading…
Reference in New Issue
Block a user