Bug 1461839

Summary: mock-1.4.2-1 fails to create /etc/mock/default.cfg symlink
Product: [Fedora] Fedora Reporter: Nikola Forró <nforro>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: rawhideCC: audrey, bitlord0xff, ferdnyc, jdisnard, lyude, mebrown, mpalenik, msimacek, msuchy, praiskup, sjenning, williams, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-31 09:58:18 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 Nikola Forró 2017-06-15 12:36:11 UTC
Description of problem:
mock no longer depends on yum, but in %post scriptlet it tries to run python and import rpmUtils module, which is not available without yum.

Version-Release number of selected component (if applicable):
mock-1.4.2-1.fc27

How reproducible:
always

Steps to Reproduce:
1. install mock on a system without python and yum (for example plain fedora:rawhide Docker image)

Actual results:
Without python and yum:
/var/tmp/rpm-tmp.kuqtfY: line 15: python: command not found
Warning: file /etc/mock/fedora-rawhide-.cfg does not exists.
         unable to update /etc/mock/default.cfg

With python and without yum:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named rpmUtils.arch
Warning: file /etc/mock/fedora-rawhide-.cfg does not exists.
         unable to update /etc/mock/default.cfg

Expected results:
no error and the symlink succesfully created

Comment 1 Seth Jennings 2017-06-29 01:46:37 UTC
Just saw this as well on F26 during mock install:

  Installing       : mock-1.4.2-1.fc26.noarch                                                                                                                                         49/49 
  Running scriptlet: mock-1.4.2-1.fc26.noarch                                                                                                                                         49/49 
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named rpmUtils.arch
Warning: file /etc/mock/fedora-26-.cfg does not exists.
         unable to update /etc/mock/default.cfg

Comment 2 Branko Grubić 2017-07-12 16:55:14 UTC
Just adding myself, since I'm not an expert, does 'uname -m' provide architecture of the running system, or maybe even better  'rpm --eval %_arch'? I know this for x86_64 should work, but not sure for 32bit x86, or other arches like different variants of arm, ppc ...

Comment 3 "FeRD" (Frank Dana) 2017-07-21 12:20:23 UTC
This issue (the failure to link /etc/mock/default.cfg) is ultimately a side-effect of the scriptlet problem from #1473040, which causes it to mis-generate the link target filename.

Suggest marking this report as dup of bug 1473040 (even though it's older).

Comment 4 Zbigniew Jędrzejewski-Szmek 2017-07-24 12:30:04 UTC
*** Bug 1473040 has been marked as a duplicate of this bug. ***

Comment 5 Miroslav Suchý 2017-07-31 09:58:18 UTC

*** This bug has been marked as a duplicate of bug 1462310 ***