Bug 996690

Summary: RFE: support flag to exclude packages during install
Product: [Fedora] Fedora Reporter: Sergio Freire <sergio-s-freire>
Component: mockAssignee: Clark Williams <williams>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: rawhideCC: jdisnard, mebrown, msimacek, msuchy, praiskup, williams
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: mock-1.2.3-1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1165273 (view as bug list) Environment:
Last Closed: 2014-12-12 04:07:16 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: 1165273    
Bug Blocks:    
Attachments:
Description Flags
Patch to add -x/--exclude to mock command line none

Description Sergio Freire 2013-08-13 17:29:40 UTC
Description of problem:
We are unable to specify packages to exclude during installation of a package using mock with the "--install" parameter.

Version-Release number of selected component (if applicable):
1.1.32

How reproducible:
always


Additional info:
It would be of great interest supporting the "-x" yum option that allows us to exclude packages whenever installing a package.
 This is very important since otherwise we don't have a way to exclude packages from being installed through dependencies whenever issuing "mock -r ... --install xpto".

Comment 1 Miroslav Suchý 2014-11-18 17:29:15 UTC
The install phase is handled by rpmbuild. Once it is implemented in rpmbuild, we can do that in mock. Waiting for bug 1165273.

Comment 2 Clark Williams 2014-11-18 22:09:36 UTC
Created attachment 958787 [details]
Patch to add -x/--exclude to mock command line

This patch adds the -x/--excludes command line arguments to mock, with the same meaning as on yum/dnf, meaning that the package or package-glob specified is to be excluded from installation in the chroot. 

It allows a syntax like this:

    mock -r fedora-20-x86_64 -x foo -x bar -x baz --rebuild example.src.rpm

Which would populate a chroot and exclude the packages foo, bar, and baz from installation in the chroot. 

The intent is for this to work with both yum and dnf. Comments welcome.

Comment 3 Fedora Update System 2014-12-04 12:17:48 UTC
mock-1.2.3-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.3-1.fc21

Comment 4 Fedora Update System 2014-12-05 00:46:34 UTC
Package mock-1.2.3-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing mock-1.2.3-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-16285/mock-1.2.3-1.fc21
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-12-12 04:07:16 UTC
mock-1.2.3-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.