Blame 0101-Do-not-attempt-to-run-source-services-when-local-pac.patch

81188a4
From f09b87050618cd39229491b2aa153cc488c1922a Mon Sep 17 00:00:00 2001
81188a4
From: Neal Gompa <ngompa13@gmail.com>
81188a4
Date: Thu, 30 May 2019 22:20:13 -0400
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
---
81188a4
 osc/commandline.py | 4 ++--
81188a4
 1 file changed, 2 insertions(+), 2 deletions(-)
81188a4
81188a4
diff --git a/osc/commandline.py b/osc/commandline.py
81188a4
index 0e3e695..da908da 100644
81188a4
--- a/osc/commandline.py
81188a4
+++ b/osc/commandline.py
81188a4
@@ -6318,7 +6318,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
81188a4
         args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project, False, opts.vm_type, opts.multibuild_package)
81188a4
 
81188a4
         # check for source services
81188a4
-        if not opts.offline and not opts.noservice:
81188a4
+        if not opts.offline and not opts.noservice and not opts.local_package:
81188a4
             p = Package('.')
81188a4
             r = p.run_source_services(verbose=True)
81188a4
             if r:
81188a4
@@ -6326,7 +6326,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
81188a4
                 sys.exit(1)
81188a4
         else:
81188a4
             msg = ('WARNING: source services from package or project will not'
81188a4
-                   'be executed. This may not be the same build as on server!')
81188a4
+                   ' be executed. This may not be the same build as on server!')
81188a4
             print(msg)
81188a4
 
81188a4
         if not opts.local_package:
81188a4
-- 
81188a4
2.21.0
81188a4