Bug 977007

Summary: /var/lib/mock/<build-root>/results/available_pkgs lists packages from yum repositories configured for the host system
Product: [Fedora] Fedora EPEL Reporter: Dan Ham <dhamilton2007>
Component: mockAssignee: Miroslav Suchý <msuchy>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el6CC: mebrown, msuchy, sergio-s-freire, williams
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-08-20 10:52:23 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:
Bug Depends On: 1163028    
Bug Blocks:    

Description Dan Ham 2013-06-22 14:52:13 UTC
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
1.1.32
(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 18:38:22 UTC
*** Bug 996495 has been marked as a duplicate of this bug. ***

Comment 2 Miroslav Suchý 2015-08-20 10:52:23 UTC
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.