878f880
From 7d4ec5b35be12b0dcc741cf050adf864b1b60735 Mon Sep 17 00:00:00 2001
81188a4
From: Neal Gompa <ngompa13@gmail.com>
878f880
Date: Fri, 27 Dec 2019 11:35:17 -0500
81188a4
Subject: [PATCH] Do not attempt to run source services when --local-package is
81188a4
 set
81188a4
81188a4
Since c39c3b8cae826723c23e5115e5c051438d7aa8ba, osc has accidentally refused
81188a4
to permit local builds for package sources that are not from a working copy,
81188a4
even when --local-package is passed in. This is because it attempts to
81188a4
instantiate a Package() object, which fails because there's no osc working
81188a4
copy to instantiate from.
81188a4
81188a4
Since any build passing --local-package probably can't run source services
81188a4
anyway, let's restore the capability to build with it by having it skip
81188a4
any attempt to run them automatically when the option is passed.
81188a4
---
878f880
 osc/build.py | 2 +-
878f880
 1 file changed, 1 insertion(+), 1 deletion(-)
81188a4
878f880
diff --git a/osc/build.py b/osc/build.py
878f880
index 46bd61f0..8f66f82b 100644
878f880
--- a/osc/build.py
878f880
+++ b/osc/build.py
878f880
@@ -727,7 +727,7 @@ def main(apiurl, opts, argv):
878f880
         buildargs.append('--noinit')
81188a4
 
878f880
     # check for source services
878f880
-    if not opts.offline and not opts.noservice:
878f880
+    if not opts.offline and not opts.noservice and not opts.local_package:
878f880
         p = osc.core.Package(os.curdir)
878f880
         r = p.run_source_services(verbose=True)
878f880
         if r:
81188a4
-- 
878f880
2.23.0
81188a4