Bug 1461839 - mock-1.4.2-1 fails to create /etc/mock/default.cfg symlink
Summary: mock-1.4.2-1 fails to create /etc/mock/default.cfg symlink
Keywords:
Status: CLOSED DUPLICATE of bug 1462310
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: All
OS: All
unspecified
high
Target Milestone: ---
Assignee: Clark Williams
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1473040 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-15 12:36 UTC by Nikola Forró
Modified: 2017-07-31 09:58 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-31 09:58:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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 ***


Note You need to log in before you can comment on or make changes to this bug.