Bug 1187136 - RFE: --update should take optional package arguments
Summary: RFE: --update should take optional package arguments
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: mock
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Simacek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-01-29 12:01 UTC by Vít Ondruch
Modified: 2015-02-20 00:33 UTC (History)
6 users (show)

Fixed In Version: mock-1.2.6-1.el6
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-09 05:29:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

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.


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