Bug 1264462 - resolvedep using repoquery doesn't use yum.conf from chroot
resolvedep using repoquery doesn't use yum.conf from chroot
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-09-18 10:01 EDT by Paul Howarth
Modified: 2016-01-03 18:26 EST (History)
6 users (show)

See Also:
Fixed In Version: mock-1.2.14-1.fc23 mock-1.2.14-1.el6 mock-1.2.14-1.fc22 mock-1.2.14-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-27 13:20:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Paul Howarth 2015-09-18 10:01:26 EDT
On Fedora 22, with yum-deprecated installed, the "resolvedep" implementation within mock uses "repoquery" rather than "yum resolvedep". Unlike yum, repoquery does not appear to look for the yum.conf file in the mock chroot by default, and uses the system version of yum.conf instead. This has prevented me from using (for instance) the ccache plugin for some of my local builds on, where the chroot yum.conf does not resemble the system one.

I have been able to work around this my making the following change:

--- /usr/lib/python3.4/site-packages/mockbuild/package_manager.py.orig	2015-09-16 16:57:22.000000000 +0100
+++ /usr/lib/python3.4/site-packages/mockbuild/package_manager.py	2015-09-18 14:13:38.423565122 +0100
@@ -165,7 +165,7 @@
         self.builddep_command = [config['yum_builddep_command']]
         self._check_command()
         if os.path.exists('/usr/bin/yum-deprecated'):
-            self.resolvedep_command = ['repoquery', '--resolve', '--requires']
+            self.resolvedep_command = ['repoquery', '--resolve', '--requires', '--config', self.buildroot.make_chroot_path('etc', 'yum', 'yum.conf')]
 
     @traceLog()
     def _write_plugin_conf(self, name):

This is with mock-1.2.13-2.fc22.
Comment 1 Miroslav Suchý 2015-09-18 12:17:54 EDT
Hmm AFAIK repoquery was used for ages in mock, this is problem of yum (yum-utils) as we pass --installroot to every yum/dnf command. However I can confirm this is happening. Since Yum is being obsoleted and such big change will probably not be fixed there, I agree we can workaround it.
For dnf there were some problems with --installroot and they are tracked under bug 1163028. And it should be without major problem now.

Therefore I concur that we can put such workaround into our code.

Committed as:
 6a8bbe5 (HEAD -> devel) directly tell yum which yum.conf he should use [RHBZ#1264462]
Comment 2 Fedora Update System 2015-11-24 18:31:39 EST
mock-1.2.14-1.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-6d1cc55330
Comment 3 Fedora Update System 2015-11-24 18:32:09 EST
mock-1.2.14-1.fc21 has been submitted as an update to Fedora 21. https://bodhi.fedoraproject.org/updates/FEDORA-2015-b4d491366d
Comment 4 Fedora Update System 2015-11-24 18:32:12 EST
mock-1.2.14-1.el6 has been submitted as an update to Fedora EPEL 6. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-fd9c932e3a
Comment 5 Fedora Update System 2015-11-24 18:32:43 EST
mock-1.2.14-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-3ef940024e
Comment 6 Fedora Update System 2015-11-25 19:51:02 EST
mock-1.2.14-1.el6 has been pushed to the Fedora EPEL 6 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=epel-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-fd9c932e3a
Comment 7 Fedora Update System 2015-11-25 19:53:06 EST
mock-1.2.14-1.el7 has been pushed to the Fedora EPEL 7 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=epel-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2015-a295f19cae
Comment 8 Fedora Update System 2015-11-25 20:21:49 EST
mock-1.2.14-1.fc21 has been pushed to the Fedora 21 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 'dnf --enablerepo=updates-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-b4d491366d
Comment 9 Fedora Update System 2015-11-25 21:25:23 EST
mock-1.2.14-1.fc22 has been pushed to the Fedora 22 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 'dnf --enablerepo=updates-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-3ef940024e
Comment 10 Fedora Update System 2015-11-25 21:54:21 EST
mock-1.2.14-1.fc23 has been pushed to the Fedora 23 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 'dnf --enablerepo=updates-testing update mock'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-6d1cc55330
Comment 11 Fedora Update System 2015-11-27 13:20:25 EST
mock-1.2.14-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
Comment 12 Fedora Update System 2016-01-03 15:26:12 EST
mock-1.2.14-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.
Comment 13 Fedora Update System 2016-01-03 16:20:01 EST
mock-1.2.14-1.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.
Comment 14 Fedora Update System 2016-01-03 18:25:58 EST
mock-1.2.14-1.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

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