mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-27 18:26:15 +01:00
Don't run source services when building outside of an OSC package working copy
When building a package from a directory that is not a checked-out OBS working, the error message: "Error: "<directory>" is not an osc package working copy." is generated. This occurs when build.main() attempts to run source services which is probably not a good idea as these are part of the core.Package infrastructure which cannot be initialized for such packages. It is probably best to disable the source services in this case. See Issue#936. Suggested-by: Marcus Huewe <suse-tux@gmx.de> Signed-off-by: Egbert Eich <eich@suse.com>
This commit is contained in:
parent
e5dda8337c
commit
b61b79cf85
@ -790,6 +790,9 @@ def main(apiurl, opts, argv):
|
||||
if opts.noinit:
|
||||
buildargs.append('--noinit')
|
||||
|
||||
if not is_package_dir('.'):
|
||||
opts.noservice = True
|
||||
|
||||
# check for source services
|
||||
if not opts.offline and not opts.noservice:
|
||||
p = osc.core.Package(os.curdir)
|
||||
|
Loading…
Reference in New Issue
Block a user