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

Ignore build descr directory in build-root substitution for local packages

If build-root contains %(package) substitution, --local-package builds
would substitute absolute path there. This is different than the rule used
in osc chroot (uses relative path), causing the chroot to fail by default.

This commit removes the directory part from both build-root substitutions.
This commit is contained in:
Matias Hilden 2016-11-14 13:16:16 +02:00
parent 2befb71663
commit 82dbd10af2
2 changed files with 2 additions and 2 deletions

View File

@ -606,7 +606,7 @@ def main(apiurl, opts, argv):
except oscerr.NoWorkingCopy: except oscerr.NoWorkingCopy:
opts.local_package = True opts.local_package = True
if opts.local_package: if opts.local_package:
pacname = os.path.splitext(build_descr)[0] pacname = os.path.splitext(os.path.basename(build_descr))[0]
apihost = urlsplit(apiurl)[1] apihost = urlsplit(apiurl)[1]
if not build_root: if not build_root:
build_root = config['build-root'] build_root = config['build-root']

View File

@ -6139,7 +6139,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
repository, arch, descr = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project) repository, arch, descr = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project)
project = opts.alternative_project or store_read_project('.') project = opts.alternative_project or store_read_project('.')
if opts.local_package: if opts.local_package:
package = os.path.splitext(descr)[0] package = os.path.splitext(os.path.basename(descr))[0]
else: else:
package = store_read_package('.') package = store_read_package('.')
apihost = urlsplit(self.get_api_url())[1] apihost = urlsplit(self.get_api_url())[1]