Bug 977007 - /var/lib/mock/<build-root>/results/available_pkgs lists packages from yum repositories configured for the host system
/var/lib/mock/<build-root>/results/available_pkgs lists packages from yum rep...
Product: Fedora EPEL
Classification: Fedora
Component: mock (Show other bugs)
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Suchý
Fedora Extras Quality Assurance
: 996495 (view as bug list)
Depends On: 1163028
  Show dependency treegraph
Reported: 2013-06-22 10:52 EDT by Dan Ham
Modified: 2015-08-20 06:52 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-08-20 06:52:23 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Dan Ham 2013-06-22 10:52:13 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):
mock --version
(Taken from the EPEL RHEL 6 repository)

How reproducible:
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

Actual results:
The available_pkgs file includes packages available to the host system 

Expected results:
The available_pkgs file should only include packages that have been configured for the target/chroot distro

Additional info:
Workaround: When using mock, temporarily disabling the yum repositories (set enabled=0 in *.repo files) for the host system stops this from occurring
Comment 1 Miroslav Suchý 2014-11-18 13:38:22 EST
*** Bug 996495 has been marked as a duplicate of this bug. ***
Comment 2 Miroslav Suchý 2015-08-20 06:52:23 EDT
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.

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