Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1234763 - wildcard in dnf update/downgrade should match installed packages only
Summary: wildcard in dnf update/downgrade should match installed packages only
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 22
Hardware: Unspecified
OS: Unspecified
medium
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1234921 1236408 1243060 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-23 08:16 UTC by Davide Repetto
Modified: 2015-09-09 23:19 UTC (History)
11 users (show)

Fixed In Version: 0.1.11-1.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-09 23:19:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1199432 0 unspecified CLOSED dnf package spec should contain wildcard in release part 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1243501 0 unspecified CLOSED `dnf downgrade' treats installed packages as not installed 2021-02-22 00:41:40 UTC

Internal Links: 1199432 1243501

Description Davide Repetto 2015-06-23 08:16:37 UTC
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 08:24:21 UTC
Thanks for the report. It makes sense to match only installed packages in upgrade command by wildcard.

Comment 2 Honza Silhan 2015-06-29 12:43:19 UTC
*** Bug 1236408 has been marked as a duplicate of this bug. ***

Comment 3 Honza Silhan 2015-06-29 12:43:34 UTC
*** Bug 1234921 has been marked as a duplicate of this bug. ***

Comment 4 Honza Silhan 2015-06-29 12:44:51 UTC
+ We should document the semantic of wildcard for different commands.

Comment 5 Honza Silhan 2015-07-15 09:28:10 UTC
*** Bug 1243060 has been marked as a duplicate of this bug. ***

Comment 6 Honza Silhan 2015-07-29 11:34:51 UTC
This should be fixed by asalih.

Comment 7 Fedora Update System 2015-07-31 13:30:42 UTC
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-11 02:08:56 UTC
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 06:21:10 UTC
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 05:19:15 UTC
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 12:39:04 UTC
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 12:39:05 UTC
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 16:44:55 UTC
I haven't tried downgrade, but upgrade has been working as expected since the update.

Comment 14 Jan ONDREJ 2015-09-08 16:57:35 UTC
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 21:26:23 UTC
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 23:18:44 UTC
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.