Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1279496

Summary: rpmconf crashes with FileNotFoundError
Product: [Fedora] Fedora Reporter: Martin Kosek <mkosek>
Component: rpmconfAssignee: Miroslav Suchý <msuchy>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: msuchy, xjakub
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-22 13:25:20 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 Martin Kosek 2015-11-09 15:11:54 UTC
Description of problem:
When config file links to non-existing file, rpmconf crashes:

$ sudo rpmconf -a
Traceback (most recent call last):
  File "/sbin/rpmconf", line 63, in <module>
    main()
  File "/sbin/rpmconf", line 60, in main
    rconf.run()
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 90, in run
    self._handle_package(pkg_hdr)
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 264, in _handle_package
    tmp.format(conf_file, "rpmnew"))
  File "/usr/lib/python3.4/site-packages/rpmconf/rpmconf.py", line 273, in _handle_rpmnew
    if filecmp.cmp(conf_file, other_file):
  File "/usr/lib64/python3.4/filecmp.py", line 51, in cmp
    s1 = _sig(os.stat(f1))
FileNotFoundError: [Errno 2] No such file or directory: '/etc/mock/default.cfg'

$ ll /etc/mock/default.cfg
lrwxrwxrwx. 1 root root 20 Oct 14  2014 /etc/mock/default.cfg -> fedora-20-x86_64.cfg

$ ll /etc/fedora-20-x86_64.cfg
ls: cannot access /etc/fedora-20-x86_64.cfg: No such file or directory

Version-Release number of selected component (if applicable):
rpmconf-1.0.12-1.fc23.noarch

How reproducible:
Always

Steps to Reproduce:
1. Run rpmconf -a in above scenario
2.
3.

Actual results:
rpmconf crashes with Python traceback

Expected results:
rpmconf does not crash

Additional info:

Comment 1 Miroslav Suchý 2015-11-22 13:25:20 UTC

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