diff --git a/0101-Do-not-attempt-to-run-source-services-when-local-pac.patch b/0101-Do-not-attempt-to-run-source-services-when-local-pac.patch new file mode 100644 index 0000000..a3a0d9d --- /dev/null +++ b/0101-Do-not-attempt-to-run-source-services-when-local-pac.patch @@ -0,0 +1,44 @@ +From f09b87050618cd39229491b2aa153cc488c1922a Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Thu, 30 May 2019 22:20:13 -0400 +Subject: [PATCH] Do not attempt to run source services when --local-package is + set + +Since c39c3b8cae826723c23e5115e5c051438d7aa8ba, osc has accidentally refused +to permit local builds for package sources that are not from a working copy, +even when --local-package is passed in. This is because it attempts to +instantiate a Package() object, which fails because there's no osc working +copy to instantiate from. + +Since any build passing --local-package probably can't run source services +anyway, let's restore the capability to build with it by having it skip +any attempt to run them automatically when the option is passed. +--- + osc/commandline.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/osc/commandline.py b/osc/commandline.py +index 0e3e695..da908da 100644 +--- a/osc/commandline.py ++++ b/osc/commandline.py +@@ -6318,7 +6318,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. + args = self.parse_repoarchdescr(args, opts.noinit or opts.offline, opts.alternative_project, False, opts.vm_type, opts.multibuild_package) + + # check for source services +- if not opts.offline and not opts.noservice: ++ if not opts.offline and not opts.noservice and not opts.local_package: + p = Package('.') + r = p.run_source_services(verbose=True) + if r: +@@ -6326,7 +6326,7 @@ Please submit there instead, or use --nodevelproject to force direct submission. + sys.exit(1) + else: + msg = ('WARNING: source services from package or project will not' +- 'be executed. This may not be the same build as on server!') ++ ' be executed. This may not be the same build as on server!') + print(msg) + + if not opts.local_package: +-- +2.21.0 + diff --git a/osc.spec b/osc.spec index ff4e6a5..a8010dd 100644 --- a/osc.spec +++ b/osc.spec @@ -25,7 +25,7 @@ %endif # Real release number -%global rel 1 +%global rel 2 Name: osc Summary: Open Build Service Commander @@ -46,6 +46,12 @@ Patch0007: 0007-Random-drive-by-typo-fixes-for-osc-command-line-mess.patch Patch0008: 0008-support-different-token-operations-runservice-releas.patch Patch0009: 0009-cast-bytes-object-to-string-during-os.path.join.patch +# Proposed fixes +## Fix osc build --local-package runs +## From: https://github.com/openSUSE/osc/pull/573 +Patch0101: 0101-Do-not-attempt-to-run-source-services-when-local-pac.patch + + BuildArch: noarch %if %{with python3} @@ -133,6 +139,9 @@ EOM %dir %{osc_plugin_dir} %changelog +* Thu May 30 2019 Neal Gompa - 0.165.1-255.1.2 +- Add patch proposed upstream to fix local builds + * Thu May 30 2019 Neal Gompa - 0.165.1-255.1.1 - Update to 0.165.1 - Backport fixes from upstream for Python 3