Bug 996690 - RFE: support flag to exclude packages during install
RFE: support flag to exclude packages during install
Product: Fedora
Classification: Fedora
Component: mock (Show other bugs)
Unspecified Linux
low Severity low
: ---
: ---
Assigned To: Clark Williams
Fedora Extras Quality Assurance
Depends On: 1165273
  Show dependency treegraph
Reported: 2013-08-13 13:29 EDT by Sergio Freire
Modified: 2014-12-11 23:07 EST (History)
6 users (show)

See Also:
Fixed In Version: mock-1.2.3-1.fc21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1165273 (view as bug list)
Last Closed: 2014-12-11 23:07:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to add -x/--exclude to mock command line (2.12 KB, patch)
2014-11-18 17:09 EST, Clark Williams
no flags Details | Diff

  None (edit)
Description Sergio Freire 2013-08-13 13:29:40 EDT
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):

How reproducible:

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 12:29:15 EST
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 17:09:36 EST
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 07:17:48 EST
mock-1.2.3-1.fc21 has been submitted as an update for Fedora 21.
Comment 4 Fedora Update System 2014-12-04 19:46:34 EST
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:
then log in and leave karma (feedback).
Comment 5 Fedora Update System 2014-12-11 23:07:16 EST
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.

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