1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-28 10:46:15 +01:00

Merge branch 'fix_local_build_outside_wc_dir' of https://github.com/lethliel/osc

Only call store_write_last_buildroot, if os.curdir is a package wc.
(Actually, the guard around store_read_last_buildroot is not needed
at the moment.)
This commit is contained in:
Marcus Huewe 2019-12-09 14:22:31 +01:00
commit e8bf1e2fca
2 changed files with 3 additions and 2 deletions

View File

@ -1295,7 +1295,8 @@ def main(apiurl, opts, argv):
cmd = [ change_personality[bi.buildarch] ] + cmd
# record our settings for later builds
osc.core.store_write_last_buildroot(os.curdir, repo, arch, vm_type)
if is_package_dir(os.curdir):
osc.core.store_write_last_buildroot(os.curdir, repo, arch, vm_type)
try:
rc = run_external(cmd[0], *cmd[1:])

View File

@ -6442,7 +6442,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
if project == opts.alternative_project:
opts.alternative_project = None
if len(args) == 0:
if len(args) == 0 and is_package_dir(os.curdir):
# build env not specified, just read from last build attempt
lastbuildroot = store_read_last_buildroot(os.curdir)
if lastbuildroot: