Bug 1801065

Summary: ImportError: No module named _conf
Product: [Fedora] Fedora EPEL Reporter: Miroslav Suchý <msuchy>
Component: libdnfAssignee: rpm-software-management
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: epel7CC: clime7, code, hobbes1069, jmracek, jrohel, mblaha, pkratoch, riehecky, rpm-software-management, sergio, trpost
Target Milestone: ---Keywords: Reopened, Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-12-06 22:06:11 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 Miroslav Suchý 2020-02-10 07:40:55 UTC
Description of problem:
When you run Mock (from epel-testing) on EL7 you get this traceback

 
mock -r epel-7-x86_64  --no-clean ./clamav-0.102.2-1.fc32.src.rpm 
....
Wrote: /builddir/build/SRPMS/clamav-0.102.2-1.el7.src.rpm
Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python2.7/site-packages/dnf/__init__.py", line 30, in
<module>
    import dnf.base
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 29, in
<module>
    import libdnf.transaction
  File "/usr/lib64/python2.7/site-packages/libdnf/__init__.py", line 3,
in <module>
    from . import conf
  File "/usr/lib64/python2.7/site-packages/libdnf/conf.py", line 17, in
<module>
    _conf = swig_import_helper()
  File "/usr/lib64/python2.7/site-packages/libdnf/conf.py", line 16, in
swig_import_helper
    return importlib.import_module('_conf')
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in
import_module
    __import__(name)
ImportError: No module named _conf

Comment 1 Miroslav Suchý 2020-02-14 14:19:27 UTC
This is configuration problem in mock configs. Closing.

Comment 2 Richard Shaw 2020-02-23 18:13:41 UTC
I'm seeing this on my Fedora 31 box when trying to build for EPEL 7. I just updated mock-core-configs from testing but the error persists. Any recommendations?

Comment 3 clime7 2020-03-09 20:33:03 UTC
The same problem here. Curious about the solution...

Comment 4 clime7 2020-03-09 20:44:34 UTC
config_opts['use_bootstrap_container'] = False

resolves it.

Comment 5 Sergio Basto 2020-03-26 04:46:17 UTC
not set config_opts['package_manager'] = 'dnf' in ~/.config/mock.cfg

Comment 6 Antonio T. sagitter 2020-12-06 11:32:25 UTC
Same error when using "koji build" on epel7-x86_64:

https://koji.fedoraproject.org/koji/taskinfo?taskID=56899704

Comment 7 Ben Beasley 2020-12-06 18:40:27 UTC
I’m seeing this in koji scratch builds for epel-7-x86_64 today too, for any package I care to try.

Comment 8 Ben Beasley 2020-12-06 22:06:11 UTC
Looks fixed in koji to me thanks to the linked releng bug.