Bug 1264462 - resolvedep using repoquery doesn't use yum.conf from chroot
Summary: resolvedep using repoquery doesn't use yum.conf from chroot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Suchý
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-18 14:01 UTC by Paul Howarth
Modified: 2016-01-03 23:26 UTC (History)
6 users (show)

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:
Clone Of:
Environment:
Last Closed: 2015-11-27 18:20:55 UTC
Type: Bug


Attachments (Terms of Use)

Description Paul Howarth 2015-09-18 14:01:26 UTC
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 16:17:54 UTC
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 23:31:39 UTC
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 23:32:09 UTC
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 23:32:12 UTC
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 23:32:43 UTC
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-26 00:51:02 UTC
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-26 00:53:06 UTC
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-26 01:21:49 UTC
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-26 02:25:23 UTC
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-26 02:54:21 UTC
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 18:20:25 UTC
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 20:26:12 UTC
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 21:20:01 UTC
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 23:25:58 UTC
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.