Bug 1187136

Summary: RFE: --update should take optional package arguments
Product: [Fedora] Fedora Reporter: Vít Ondruch <vondruch>
Component: mockAssignee: Michael Simacek <msimacek>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: jdisnard, mebrown, msimacek, msuchy, praiskup, williams
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: mock-1.2.6-1.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-09 05:29:11 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:

Description Vít Ondruch 2015-01-29 12:01:00 UTC
Description of problem:

$ mock -r fedora-rawhide-i386 --update /var/lib/mock/fedora-rawhide-i386/result/rubygem-sprockets-rails-2.2.4-1.fc22.noarch.rpm 
INFO: mock.py version 1.2.4 starting (python version = 2.7.8)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
Start: chroot init
INFO: LVM plugin enabled. Allocated pool data: None%. Allocated metadata: None%.
INFO: calling preinit hooks
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled ccache
Mock Version: 1.2.4
INFO: Mock Version: 1.2.4
Finish: chroot init
Dependencies resolved.
Nothing to do.
Finish: run

$ mock -r fedora-rawhide-i386 --pm-cmd update /var/lib/mock/fedora-rawhide-i386/result/rubygem-sprockets-rails-2.2.4-1.fc22.noarch.rpm 
INFO: mock.py version 1.2.4 starting (python version = 2.7.8)...
Start: init plugins
INFO: selinux enabled
Finish: init plugins
Start: run
INFO: Running /usr/bin/dnf update /var/lib/mock/fedora-rawhide-i386/result/rubygem-sprockets-rails-2.2.4-1.fc22.noarch.rpm
Start: chroot init
INFO: LVM plugin enabled. Allocated pool data: None%. Allocated metadata: None%.
INFO: calling preinit hooks
INFO: enabled yum cache
Start: cleaning yum metadata
Finish: cleaning yum metadata
INFO: enabled ccache
Mock Version: 1.2.4
INFO: Mock Version: 1.2.4
Finish: chroot init
Dependencies resolved.
================================================================================
 Package                     Arch       Version          Repository        Size
================================================================================
Upgrading:
 rubygem-sprockets-rails     noarch     2.2.4-1.fc22     @commandline      15 k

Transaction Summary
================================================================================
Upgrade  1 Package

Total size: 15 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Upgrading   : rubygem-sprockets-rails-2.2.4-1.fc22.noarch                 1/2 
  Cleanup     : rubygem-sprockets-rails-2.1.3-1.fc21.noarch                 2/2 
  Verifying   : rubygem-sprockets-rails-2.2.4-1.fc22.noarch                 1/2 
  Verifying   : rubygem-sprockets-rails-2.1.3-1.fc21.noarch                 2/2 

Upgraded:
  rubygem-sprockets-rails.noarch 2.2.4-1.fc22                                   

Complete!
Finish: run
 



Version-Release number of selected component (if applicable):
$ rpm -q mock
mock-1.2.4-1.fc21.noarch


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
"--update" does nothing while "--pm-cmd update" updates the package as expected

Expected results:
"--update" behaves identically to "--pm-cmd update"


Additional info:
This is done with DNF enabled

Comment 1 Michael Simacek 2015-01-29 13:23:06 UTC
It's not a bug, just a missing feature. --update doesn't take arguments, that's all (note the invocation in the manpage). But it would be nice if it would. I'll implement it.

Comment 2 Vít Ondruch 2015-01-29 14:05:11 UTC
Ah ... may be some complaint about unrecognized argument would be helpful ...

The thing is that "dnf install" does not do "update" if I am not mistaken and hence I am trying to use update instead of --install I used with yum.

Comment 3 Michael Simacek 2015-01-29 14:32:56 UTC
(In reply to Vít Ondruch from comment #2)
> Ah ... may be some complaint about unrecognized argument would be helpful ...

This would be a pain to do with optparse as we'd need to check it manually everywhere. I'll investigate whether we can migrate to argparse, which has checks for positional arguments built-in.

> The thing is that "dnf install" does not do "update" if I am not mistaken
> and hence I am trying to use update instead of --install I used with yum.

You should report a bug in dnf if you think this should be changed.

Comment 4 Fedora Update System 2015-02-03 04:42:08 UTC
mock-1.2.6-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.el6

Comment 5 Fedora Update System 2015-02-03 04:42:59 UTC
mock-1.2.6-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.el7

Comment 6 Fedora Update System 2015-02-03 04:43:19 UTC
mock-1.2.6-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc20

Comment 7 Fedora Update System 2015-02-03 04:43:58 UTC
mock-1.2.6-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/mock-1.2.6-1.fc21

Comment 8 Fedora Update System 2015-02-03 19:32:02 UTC
Package mock-1.2.6-1.el7:
* should fix your issue,
* was pushed to the Fedora EPEL 7 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing mock-1.2.6-1.el7'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0617/mock-1.2.6-1.el7
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2015-02-09 05:29:11 UTC
mock-1.2.6-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2015-02-15 02:55:24 UTC
mock-1.2.6-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2015-02-20 00:32:50 UTC
mock-1.2.6-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2015-02-20 00:33:29 UTC
mock-1.2.6-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.