Red Hat Bugzilla – Bug 977007
/var/lib/mock/<build-root>/results/available_pkgs lists packages from yum repositories configured for the host system
Last modified: 2015-08-20 06:52:34 EDT
Description of problem:
The listing of available packages from the /var/lib/mock/<buildroot>/result/available_pkgs file includes the packages available to the _host_ system as well as those configured to be available to the target/chroot distro.
I am using mock on RHEL6.4 x86_64. My target distro (chroot target) is (for example) RHEL5.8 x86_64. When looking at the available_pkgs list I can see packages for EL6. These are from yum repo's I have configured for the host RHEL 6.4 system. E.g.
cat /var/lib/mock/rhel-58-base-x86_64/result/available_pkgs | grep el6
bash-completion-1:1.3-7.icw.el6.noarch .... icw-rhel-x86_64-server-6
Note that the icw-rhel-x86_64_server-6 repository is _only_ configured for the host RHEL6.4 system and should not be available to the rhel-58-base-x86_64 chroot distro. In other words my /etc/mock/rhel-58-base-x86_64.cfg does _not_ include this repository
Version-Release number of selected component (if applicable):
(Taken from the EPEL RHEL 6 repository)
Always (provided there are yum repositories configured for the host system)
Steps to Reproduce:
1. Build a mock root
mock --root rhel-58-base-x86_64 --init
2. Take a look at the available_pkgs as shown above
The available_pkgs file includes packages available to the host system
The available_pkgs file should only include packages that have been configured for the target/chroot distro
Workaround: When using mock, temporarily disabling the yum repositories (set enabled=0 in *.repo files) for the host system stops this from occurring
*** Bug 996495 has been marked as a duplicate of this bug. ***
I just tried it on Fedora 22 and could not reproduce it.
If this happen in RHEL6 then it is likely bug in yum-utils there.