Bug 1234763 - wildcard in dnf update/downgrade should match installed packages only
wildcard in dnf update/downgrade should match installed packages only
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
22
Unspecified Unspecified
medium Severity unspecified
: ---
: ---
Assigned To: packaging-team-maint
Fedora Extras Quality Assurance
: Reopened
: 1234921 1236408 1243060 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-06-23 04:16 EDT by Davide Repetto
Modified: 2015-09-09 19:19 EDT (History)
11 users (show)

See Also:
Fixed In Version: 0.1.11-1.fc22
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-09-09 19:19:11 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Davide Repetto 2015-06-23 04:16:37 EDT
Description of problem:
=======================
I'm supposing that a command with wild cards such as "dnf upgrade dnf\* rpm\* grub\*" should match only packages that are within the scope of the command.
Eg. it should not match packages that are not installed, since there is no point in trying to upgrade packages that are not there to begin with.
At least that is what yum did and what logic would suggest.
Also I suspect that generally matching out of scope has the potential for unwanted side effects.

The current version of dnf however is quite greedy in its matchings and will match any package in the repos.


Version-Release number of selected component:
=============================================
dnf-1.0.1-2.fc22.noarch


How reproducible:
=================
Consistently

Steps to Reproduce:
===================
1. dnf upgrade dnf\* rpm\* grub\*

Actual results:
===============
[root@cp-acer ~]# dnf upgrade dnf\* rpm\* grub\*
Last metadata expiration check performed 0:25:37 ago on Tue Jun 23 09:34:53 2015.
Package dnf-automatic not installed, cannot update it.
Package rpmdepsize not installed, cannot update it.
Package rpm-apidocs not installed, cannot update it.
Package rpm-cron not installed, cannot update it.
Package rpmlint-scl-config not installed, cannot update it.
Package rpm-devel not installed, cannot update it.
Package rpmrebuild not installed, cannot update it.
Package rpm-compare-req not installed, cannot update it.
Package rpmreaper not installed, cannot update it.
Package rpm-ostree-toolbox not installed, cannot update it.
Package rpmfusion-packager not installed, cannot update it.
Package rpmorphan not installed, cannot update it.
Package rpm-sign not installed, cannot update it.
Package rpmlint not installed, cannot update it.
Package rpmgrill not installed, cannot update it.
Package rpm-ostree not installed, cannot update it.
Package rpm-plugin-syslog not installed, cannot update it.
Package grub2-efi-modules not installed, cannot update it.
Package grub2-efi not installed, cannot update it.
Package grub-customizer not installed, cannot update it.
Package grub2-starfield-theme not installed, cannot update it.
Dependencies resolved.
Nothing to do.
Complete!


Expected results:
[root@cp-acer ~]# dnf upgrade dnf\* rpm\* grub\*
Last metadata expiration check performed 0:25:37 ago on Tue Jun 23 09:34:53 2015.
Dependencies resolved.
Nothing to do.
Complete!
Comment 1 Honza Silhan 2015-06-23 04:24:21 EDT
Thanks for the report. It makes sense to match only installed packages in upgrade command by wildcard.
Comment 2 Honza Silhan 2015-06-29 08:43:19 EDT
*** Bug 1236408 has been marked as a duplicate of this bug. ***
Comment 3 Honza Silhan 2015-06-29 08:43:34 EDT
*** Bug 1234921 has been marked as a duplicate of this bug. ***
Comment 4 Honza Silhan 2015-06-29 08:44:51 EDT
+ We should document the semantic of wildcard for different commands.
Comment 5 Honza Silhan 2015-07-15 05:28:10 EDT
*** Bug 1243060 has been marked as a duplicate of this bug. ***
Comment 6 Honza Silhan 2015-07-29 07:34:51 EDT
This should be fixed by asalih.
Comment 7 Fedora Update System 2015-07-31 09:30:42 EDT
dnf-1.0.2-3.fc22, hawkey-0.5.9-3.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/dnf-1.0.2-3.fc22,hawkey-0.5.9-3.fc22
Comment 8 Fedora Update System 2015-08-10 22:08:56 EDT
dnf-1.0.2-3.fc22, hawkey-0.5.9-3.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Jan ONDREJ 2015-08-11 02:21:10 EDT
Don't work for me.

[root@work ~]# rpm -q dnf hawkey
dnf-1.0.2-3.fc22.noarch
hawkey-0.5.9-3.fc22.x86_64
[root@work ~]# 

[root@work ~]# dnf downgrade php\*
google-earth                                     55 kB/s | 4.8 kB     00:00    
Fedora 22 - x86_64                               49 MB/s |  41 MB     00:00    
RPM Fusion for Fedora 22 - Free - Updates       8.6 MB/s |  29 kB     00:00    
Adobe Systems Incorporated                       18 kB/s | 1.8 kB     00:00    
RPM Fusion for Fedora 22 - Nonfree - Updates    5.5 MB/s |  15 kB     00:00    
RPM Fusion for Fedora 22 - Free                  41 MB/s | 551 kB     00:00    
SALstar.sk 22 - x86_64 - Base                   2.8 MB/s |  19 kB     00:00    
Fedora 22 - x86_64 - Updates                     56 MB/s |  14 MB     00:00    
Fedora 22 - x86_64 - Updates [UPJS]              56 MB/s |  14 MB     00:00    
google-chrome                                    43 kB/s | 3.7 kB     00:00    
RPM Fusion for Fedora 22 - Nonfree               32 MB/s | 170 kB     00:00    
Last metadata expiration check performed 0:00:00 ago on Tue Aug 11 08:16:33 2015
.
No match for available package: php-5.6.8-1.fc22.x86_64
No match for available package: php-Analog-1.0.0-5.git9ab4c9e.fc21.noarch
No match for available package: php-Assetic-1.2.1-1.fc22.noarch
No match for available package: php-EasyRdf-0.8.0-5.fc22.noarch
No match for available package: php-EasyRdf-doc-0.8.0-5.fc22.noarch
...

This should downgrade php packages, not php-versioned packages. Worked well with yum, fails with dnf.

May be this fixed only update, not downgrade, but has been marked as duplicate for my downgrade bug too:
https://bugzilla.redhat.com/show_bug.cgi?id=1234921
Comment 10 Jan ONDREJ 2015-08-15 01:19:15 EDT
Somethings changed with dnf-1.1.0, but still don't work:

[root@work ~]# rpm -q php
php-5.6.11-2.fc22.x86_64
dnf-1.1.0-2.fc22.noarch
hawkey-0.6.0-1.fc22.x86_64
[root@work ~]# dnf downgrade php\*
Last metadata expiration check performed 0:00:00 ago on Sat Aug 15 07:16:10 2015.
Error: Nothing to do.

Why nothing to do? There are php packages installed and they have downgrades availabe.
Same problem if I try to downgrade dnf\* .
Comment 11 Fedora Update System 2015-09-08 08:39:04 EDT
dnf-1.1.1-2.fc22 dnf-plugins-core-0.1.11-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744
Comment 12 Fedora Update System 2015-09-08 08:39:05 EDT
dnf-1.1.1-2.fc22 dnf-plugins-core-0.1.11-1.fc22 has been submitted as an update to Fedora 22. https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744
Comment 13 Stuart D Gathman 2015-09-08 12:44:55 EDT
I haven't tried downgrade, but upgrade has been working as expected since the update.
Comment 14 Jan ONDREJ 2015-09-08 12:57:35 EDT
I can confirm, that wildcard downgrade with dnf-1.1.1-1.fc22.noarch works as expected. I can't test release 2 of this package, but I think it will work too. Thanks for fix.
Comment 15 Fedora Update System 2015-09-08 17:26:23 EDT
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update dnf-plugins-core dnf'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-14744
Comment 16 Fedora Update System 2015-09-09 19:18:44 EDT
dnf-1.1.1-2.fc22, dnf-plugins-core-0.1.11-1.fc22 has been pushed to the Fedora 22 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.