Skip to content

Commit

Permalink
Merge branch 'fix_local_build_outside_wc_dir' of https://github.com/l…
Browse files Browse the repository at this point in the history
…ethliel/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.)
  • Loading branch information
marcus-h committed Dec 9, 2019
2 parents 7621e79 + ade9bab commit e8bf1e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion osc/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -1295,7 +1295,8 @@ def __str__(self):
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:])
Expand Down
2 changes: 1 addition & 1 deletion osc/commandline.py
Original file line number Diff line number Diff line change
Expand Up @@ -6442,7 +6442,7 @@ def do_build(self, subcmd, opts, *args):
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:
Expand Down

0 comments on commit e8bf1e2

Please sign in to comment.