Bug 622170

Summary: Latest architecture patches broke noarch builds
Product: [Fedora] Fedora Reporter: Shad L. Lords <slords>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 5CC: dcantrell, herrold, jdieter, mebrown, oliva, williams
Target Milestone: ---   
Target Release: ---   
Hardware: noarch   
OS: Linux   
Whiteboard:
Fixed In Version: mock-1.1.10-1.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-23 21:58:48 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Shad L. Lords 2010-08-07 21:48:31 UTC
Description of problem:

noarch packages built by plague no longer work after installing mock with "added logic to detect invalid architecture combinations (BZ# 607144)" patch applied.

Version-Release number of selected component (if applicable):

1.0.9

How reproducible:

always

Steps to Reproduce:
1. try to build a noarch package using updated mock
  
Actual results:

Mock returns: "ERROR: Cannot build target noarch on arch x86_64"

Expected results:

Package builds as it used to prior to upgrading mock

Additional info:

Comment 1 Clark Williams 2010-08-09 18:20:13 UTC
Shad, 

Got an SRPM that I can use to test with? I'd prefer to use one that you tried and had fail...

Comment 2 Alexandre Oliva 2010-08-13 17:56:30 UTC
Hi, Clark!  A patch along these lines fixes it for me, although youmay want to add noarch to more legal_arches, or maybe test it separately, accepting it regardless of legal_arches.

--- /usr/sbin/mock.broken-noarch	2010-08-03 17:04:48.000000000 -0400
+++ /usr/sbin/mock	2010-08-13 13:37:00.000000000 -0400
@@ -370,8 +370,8 @@
 
 legal_arches = {
     'i386'   : ('i386', 'i686'),
-    'i686'   : ('i386', 'i686'),
-    'x86_64' : ('i386', 'i686', 'x86_64'),
+    'i686'   : ('i386', 'i686', 'noarch'),
+    'x86_64' : ('i386', 'i686', 'x86_64', 'noarch'),
     'ppc'    : ('ppc'),
     'ppc64'  : ('ppc', 'ppc64'),
     'sparc'  : ('sparc'),

Comment 3 Clark Williams 2010-08-13 18:23:26 UTC
Hi Alex!

I got a patch from Paul Howarth that fixes is for all arches:

diff --git a/py/mock.py b/py/mock.py
index f585002..975ef42 100755
--- a/py/mock.py
+++ b/py/mock.py
@@ -383,7 +383,7 @@ decorate(traceLog())
 def check_arch_combination(target_arch):
     host_arch = os.uname()[-1]
     try:
-        if target_arch not in legal_arches[host_arch]:
+        if target_arch not in legal_arches[host_arch] + ('noarch',):
             raise mock.exception.InvalidArchitecture(
                 "Cannot build target %s on arch %s" % (target_arch, host_arch))
     except KeyError:

I'm working on a 1.1.4 release that will have this and a few other fixes in it.

Comment 4 Fedora Update System 2010-08-19 17:20:40 UTC
mock-1.1.4-1.fc14 has been submitted as an update for Fedora 14.
http://admin.fedoraproject.org/updates/mock-1.1.4-1.fc14

Comment 5 Fedora Update System 2010-08-19 17:21:46 UTC
mock-1.1.4-1.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/mock-1.1.4-1.fc13

Comment 6 Fedora Update System 2010-08-19 17:32:32 UTC
mock-1.0.11-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/mock-1.0.11-1.fc12

Comment 7 Fedora Update System 2010-08-19 17:33:52 UTC
mock-1.0.11-1.el5 has been submitted as an update for Fedora EPEL 5.
http://admin.fedoraproject.org/updates/mock-1.0.11-1.el5

Comment 8 Fedora Update System 2010-08-19 21:59:54 UTC
mock-1.0.11-1.el5 has been pushed to the Fedora EPEL 5 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update mock'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/mock-1.0.11-1.el5

Comment 9 Fedora Update System 2010-08-23 21:57:17 UTC
mock-1.1.4-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2010-08-24 01:27:58 UTC
mock-1.1.4-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2010-08-26 01:02:42 UTC
mock-1.0.11-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2010-09-20 14:42:43 UTC
mock-1.0.12-1.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/mock-1.0.12-1.fc12

Comment 13 Fedora Update System 2010-09-20 14:44:17 UTC
mock-1.0.12-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.12-1.el5

Comment 14 Fedora Update System 2010-10-20 15:44:28 UTC
mock-1.0.13-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.13-1.el5

Comment 15 Fedora Update System 2010-10-20 15:46:48 UTC
mock-1.0.13-1.fc12 has been submitted as an update for Fedora 12.
https://admin.fedoraproject.org/updates/mock-1.0.13-1.fc12

Comment 16 Fedora Update System 2010-12-14 16:14:41 UTC
mock-1.0.14-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.14-1.el5

Comment 17 Fedora Update System 2011-01-18 20:04:53 UTC
mock-1.0.15-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.15-1.el5

Comment 18 Fedora Update System 2011-02-20 02:27:04 UTC
mock-1.1.9-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc13

Comment 19 Fedora Update System 2011-02-20 02:30:06 UTC
mock-1.0.16-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.16-1.el5

Comment 20 Fedora Update System 2011-02-20 02:32:57 UTC
mock-1.1.9-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.9-1.el6

Comment 21 Fedora Update System 2011-02-20 02:35:49 UTC
mock-1.1.9-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.9-1.fc14

Comment 22 Fedora Update System 2011-03-03 08:25:47 UTC
mock-1.1.9-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2011-03-03 08:34:29 UTC
mock-1.1.9-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 24 Fedora Update System 2011-05-13 20:34:51 UTC
mock-1.1.10-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc15

Comment 25 Fedora Update System 2011-05-13 20:39:19 UTC
mock-1.1.10-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc14

Comment 26 Fedora Update System 2011-05-13 20:43:35 UTC
mock-1.0.17-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/mock-1.0.17-1.el5

Comment 27 Fedora Update System 2011-05-13 20:47:53 UTC
mock-1.1.10-1.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.fc13

Comment 28 Fedora Update System 2011-05-13 20:52:16 UTC
mock-1.1.10-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.1.10-1.el6

Comment 29 Fedora Update System 2011-05-19 04:36:12 UTC
mock-1.1.10-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 30 Fedora Update System 2011-05-25 02:43:32 UTC
mock-1.1.10-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 31 Fedora Update System 2011-05-25 03:17:46 UTC
mock-1.1.10-1.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 32 Fedora Update System 2011-06-02 19:07:41 UTC
mock-1.0.17-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 33 Fedora Update System 2011-06-02 19:17:32 UTC
mock-1.1.10-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.