Bug 1290900

Summary: %python_provide macro uses arch (%{?_isa}) on noarch sub-package
Product: [Fedora] Fedora Reporter: Dave Olsthoorn <dave>
Component: python-rpm-macrosAssignee: Orion Poplawski <orion>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: bkabrda, dmalcolm, ivazqueznet, jonathansteffan, mstuchli, ncoghlan, orion, pviktori, rkuska, suraia, swt, tomspur
Target Milestone: ---   
Target Release: ---   
Hardware: noarch   
OS: Linux   
Whiteboard:
Fixed In Version: python-rpm-macros-3-6.fc24 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-15 04:02:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Olsthoorn 2015-12-11 20:29:18 UTC
Description of problem:
the %python_provide macro uses the arch on it's obsoletes and provides. this results in failed koji builds http://koji.fedoraproject.org/koji/taskinfo?taskID=12156455

Version-Release number of selected component (if applicable):
python-devel-2.7.10-11.fc24.x86_64

How reproducible:
run rpmbuild --eval '%python_provide python2-%{name}'

Actual results:
Provides: python-%{name}(x86-64) = %{version}-%{release}
Provides: python-%{name} = %{version}-%{release}
Obsoletes: python-%{name}(x86-64) < %{version}-%{release}
Obsoletes: python-%{name} < %{version}-%{release}

Expected results:
Provides: python-%{name} = %{version}-%{release}
Obsoletes: python-%{name} < %{version}-%{release}

Comment 1 Michael Kuhn 2016-01-14 21:42:24 UTC
I am hitting the same problem here: http://koji.fedoraproject.org/koji/taskinfo?taskID=12551169

It works fine if the complete package is noarch but if some subpackages are not noarch, the build fails.

Comment 2 Orion Poplawski 2016-01-14 21:57:50 UTC
I'm curious how this changed - the macro.python file and thus the %python_provide macro should be unchanged.

It's hard for me to find the actual error message in the koji build.

Comment 3 Orion Poplawski 2016-01-14 21:58:54 UTC
Found it.

Comment 4 Michael Kuhn 2016-01-14 22:24:06 UTC
It has not really changed I think. My guess would be that the following commit introduced the problem: https://pkgs.fedoraproject.org/cgit/rpms/python.git/commit/?id=3b6fac0339bab69ca5fbf2881568f0565ab0e252

Comment 5 Orion Poplawski 2016-01-14 22:34:44 UTC
Yup.  I think I have a fix...

Comment 6 Orion Poplawski 2016-01-14 23:19:41 UTC
Should be fixed with this.  Building now.

Comment 7 Orion Poplawski 2016-01-15 04:02:03 UTC
Problem with -5, should be fixed in -6.

Comment 8 Michael Kuhn 2016-01-15 08:33:00 UTC
My package builds fine now. Thanks for the quick fix! :-)