Bug 1199432 - dnf package spec should contain wildcard in release part
Summary: dnf package spec should contain wildcard in release part
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 29
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-06 09:34 UTC by Joachim Backes
Modified: 2018-09-24 14:55 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-24 14:55:59 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1173349 0 unspecified CLOSED wildcard doesn't work properly when downgrade 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1234763 0 medium CLOSED wildcard in dnf update/downgrade should match installed packages only 2021-02-22 00:41:40 UTC

Internal Links: 1173349 1234763

Description Joachim Backes 2015-03-06 09:34:12 UTC
Description of problem:

I had 3 kernels installed:

pm -q kernel
kernel-4.0.0-0.rc1.git3.1.fc22.x86_64
kernel-4.0.0-0.rc2.git0.1.fc22.x86_64
kernel-4.0.0-0.rc2.git1.1.fc22.x86_64

I try to delete kernel #1 and kernel#2 by 

sudo dnf erase kernel-*3.1* kernel-*0.1*

Error message:

Using metadata from Wed Mar  4 13:36:47 2015
No match for argument: kernel-*3.1*
No match for argument: kernel-*0.1*
Error: No packages marked for removal.

Trying the same with yum:



sudo yum erase kernel-*3.1* kernel-*0.1*
Resolving Dependencies
--> Running transaction check
---> Package kernel.x86_64 0:4.0.0-0.rc1.git3.1.fc22 will be erased
---> Package kernel.x86_64 0:4.0.0-0.rc2.git0.1.fc22 will be erased
---> Package kernel-core.x86_64 0:4.0.0-0.rc1.git3.1.fc22 will be erased
---> Package kernel-core.x86_64 0:4.0.0-0.rc2.git0.1.fc22 will be erased
---> Package kernel-devel.x86_64 0:4.0.0-0.rc1.git3.1.fc22 will be erased
---> Package kernel-devel.x86_64 0:4.0.0-0.rc2.git0.1.fc22 will be erased
---> Package kernel-modules.x86_64 0:4.0.0-0.rc1.git3.1.fc22 will be erased
---> Package kernel-modules.x86_64 0:4.0.0-0.rc2.git0.1.fc22 will be erased
--> Finished Dependency Resolution

Dependencies Resolved

dnf-0.6.4-2.fc22.noarch
How reproducible:
did not try

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
 /etc/dnf/dnf.conf:

[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=true

Comment 1 Radek Holy 2015-03-06 13:08:19 UTC
Hello, thank you for the report. It seems that DNF doesn't work with wildcards in version specifications at all. The question is whether we have a good reason for that. Moreover if "dnf list" is apparently an exception.

Bug 1019170 and bug 1083679 indicate that it should be work IIUIC. If so, we should fix it including the documentation.

Comment 2 Germano Massullo 2015-06-29 14:34:37 UTC
I am on a Fedora 22 machine. I need to remove all debuginfo packages of Fedora 20.
I runned command
# dnf remove *debuginfo*.fc20.x86_64
But DNF said that no matching packages have been found.
I also tried other variants like
#dnf remove *\-debuginfo\-*.fc20.x86_64
# dnf remove '*debuginfo*.fc20.x86_64'
# dnf remove '*debuginfo*'.fc20.x86_64

but the result is the same


# rpm -qa | grep debuginfo
libXxf86vm-debuginfo-1.1.3-2.fc20.x86_64
strigi-debuginfo-0.7.8-2.fc20.x86_64
libX11-debuginfo-1.6.2-2.fc21.x86_64
qimageblitz-debuginfo-0.0.6-6.fc20.x86_64
gstreamer-debuginfo-0.10.36-6.fc20.x86_64
libxslt-debuginfo-1.1.28-5.fc20.x86_64
ilmbase-debuginfo-1.0.3-7.fc20.x86_64
freetype-debuginfo-2.5.0-5.fc20.x86_64
systemd-debuginfo-208-28.fc20.x86_64
libxml2-debuginfo-2.9.1-7.fc21.x86_64
libmng-debuginfo-1.0.10-12.fc20.x86_64
liblastfm-debuginfo-1.0.8-3.fc21.x86_64
libmtp-debuginfo-1.1.8-1.fc21.x86_64
OpenEXR-debuginfo-1.7.1-6.fc20.x86_64
libXrandr-debuginfo-1.4.1-2.fc20.x86_64
kdepimlibs-debuginfo-4.12.4-1.fc20.x86_64
v4l-utils-debuginfo-1.6.2-1.fc21.x86_64
libmygpo-qt-debuginfo-1.0.8-2.fc21.x86_64
xcb-util-image-debuginfo-0.3.9-3.fc20.x86_64
qca2-debuginfo-2.0.3-6.fc20.x86_64
libjpeg-turbo-debuginfo-1.3.1-2.fc20.x86_64
libXinerama-debuginfo-1.1.3-2.fc20.x86_64
herqq-debuginfo-1.0.0-6.fc20.x86_64
libpng-debuginfo-1.6.6-3.fc20.x86_64
kdelibs-debuginfo-4.14.6-2.fc21.x86_64
libXcursor-debuginfo-1.1.14-2.fc20.x86_64
phonon-backend-gstreamer-debuginfo-4.7.1-1.fc20.x86_64
gamin-debuginfo-0.1.10-15.fc20.x86_64
mesa-debuginfo-10.4.3-1.20150124.fc21.x86_64
libXxf86misc-debuginfo-1.0.3-7.fc20.x86_64
giflib-debuginfo-4.1.6-9.fc20.x86_64
libXScrnSaver-debuginfo-1.2.2-6.fc20.x86_64
gstreamer-plugins-base-debuginfo-0.10.36-6.fc20.x86_64
dbusmenu-qt-debuginfo-0.9.2-5.fc20.x86_64
qt-mobility-debuginfo-1.2.2-0.12.20140317git169da60c.fc20.x86_64
jasper-debuginfo-1.900.1-25.fc20.x86_64
nepomuk-core-debuginfo-4.12.4-1.fc20.x86_64
libXt-debuginfo-1.1.4-7.fc20.x86_64
libXcomposite-debuginfo-0.4.4-4.fc20.x86_64
libXpm-debuginfo-3.5.11-3.fc21.x86_64
kdegames-debuginfo-4.9.5-1.fc18.x86_64
zlib-debuginfo-1.2.8-3.fc20.x86_64
libsndfile-debuginfo-1.0.25-8.fc20.x86_64
libXau-debuginfo-1.0.8-4.fc21.x86_64
xcb-util-keysyms-debuginfo-0.3.9-3.fc20.x86_64
libwebp-debuginfo-0.3.1-3.fc20.x86_64
libSM-debuginfo-1.2.2-2.fc21.x86_64
libxcb-debuginfo-1.9.1-3.fc20.x86_64
gdk-pixbuf2-debuginfo-2.31.1-1.fc21.x86_64
openal-soft-debuginfo-1.15.1-3.fc20.x86_64
qjson-debuginfo-0.8.1-7.fc21.x86_64
kactivities-debuginfo-4.13.3-6.fc20.x86_64
libXrender-debuginfo-0.9.8-2.fc20.x86_64
exiv2-debuginfo-0.23-5.fc20.x86_64
libXft-debuginfo-2.3.2-2.fc21.x86_64
qt-debuginfo-4.8.6-25.fc21.x86_64
prison-debuginfo-1.0-7.fc20.x86_64
libgpod-debuginfo-0.8.3-7.fc21.x86_64
libXtst-debuginfo-1.2.2-2.fc20.x86_64
libxkbfile-debuginfo-1.0.8-4.fc20.x86_64
glibc-debuginfo-2.20-8.fc21.x86_64
e2fsprogs-debuginfo-1.42.8-3.fc20.x86_64
libssh-debuginfo-0.6.3-1.fc20.x86_64
glib2-debuginfo-2.42.2-1.fc21.x86_64
dbus-debuginfo-1.6.12-9.fc20.x86_64
acl-debuginfo-2.2.52-4.fc20.x86_64
libtiff-debuginfo-4.0.3-15.fc20.x86_64
libqzeitgeist-debuginfo-0.8.0-10.fc20.x86_64
attica-debuginfo-0.4.2-2.fc20.x86_64
mlt-debuginfo-0.9.2-3.fc21.x86_64
darktable-debuginfo-1.6.7-1.fc22.x86_64
gcc-debuginfo-4.9.2-6.fc21.x86_64
libXfixes-debuginfo-5.0.1-2.fc20.x86_64
openssl-debuginfo-1.0.1k-6.fc21.x86_64
libXvMC-debuginfo-1.0.8-2.fc20.x86_64
libutempter-debuginfo-1.1.6-3.fc20.x86_64
libXv-debuginfo-1.0.9-2.fc20.x86_64
enchant-debuginfo-1.6.0-7.fc20.x86_64
polkit-qt-debuginfo-0.112.0-1.fc20.x86_64
gcc-base-debuginfo-4.9.2-6.fc21.x86_64
amarok-debuginfo-2.8.0-11.fc21.x86_64
cln-debuginfo-1.3.3-1.fc20.x86_64
libraw1394-debuginfo-2.1.0-2.fc20.x86_64
tidy-debuginfo-0.99.0-29.20091203.fc20.x86_64
glibc-debuginfo-common-2.20-8.fc21.x86_64
bzip2-debuginfo-1.0.6-9.fc20.x86_64
curl-debuginfo-7.37.0-13.fc21.x86_64
attr-debuginfo-2.4.47-3.fc20.x86_64
pulseaudio-debuginfo-5.0-7.fc20.x86_64
alsa-lib-debuginfo-1.0.27.2-2.fc20.x86_64
mariadb-debuginfo-10.0.17-1.fc21.x86_64
taglib-extras-debuginfo-1.0.1-6.fc20.x86_64
samba-debuginfo-4.1.6-1.fc20.x86_64
colord-kde-debuginfo-0.4.0-1.20150519git.fc22.x86_64
kde-baseapps-debuginfo-4.12.5-2.fc20.x86_64
pciutils-debuginfo-3.2.1-2.fc20.x86_64
mesa-libGLU-debuginfo-9.0.0-7.fc21.x86_64
lcms2-debuginfo-2.6-1.fc20.x86_64
loudmouth-debuginfo-1.4.3-15.fc21.x86_64
libXdamage-debuginfo-1.1.4-4.fc20.x86_64
wayland-debuginfo-1.2.0-3.fc20.x86_64
unetbootin-debuginfo-603-1.fc20.x86_64
xz-debuginfo-5.1.2-12alpha.fc20.x86_64
kdenlive-debuginfo-0.9.10-1.fc21.x86_64
pcre-debuginfo-8.33-6.fc20.x86_64
libXext-debuginfo-1.3.3-2.fc21.x86_64
gpsd-debuginfo-3.9-4.fc20.x86_64
soprano-debuginfo-2.9.4-5.fc21.x86_64
libICE-debuginfo-1.0.9-2.fc21.x86_64
openslp-debuginfo-1.2.1-20.fc20.x86_64
krb5-debuginfo-1.11.5-11.fc20.x86_64
sqlite-debuginfo-3.8.6-2.fc20.x86_64
taglib-debuginfo-1.9.1-7.fc21.x86_64
libqalculate-debuginfo-0.9.7-8.fc20.x86_64
libgcrypt-debuginfo-1.5.3-2.fc20.x86_64
pam-debuginfo-1.1.8-1.fc20.x86_64
fontconfig-debuginfo-2.11.0-1.fc20.x86_64
boinc-client-debuginfo-7.2.42-1.gitdd0d630.fc20.x86_64
libXdmcp-debuginfo-1.1.1-5.fc20.x86_64
qtwebkit-debuginfo-2.3.4-1.fc21.x86_64
libXi-debuginfo-1.7.2-2.fc20.x86_64
phonon-debuginfo-4.7.2-1.fc20.1.x86_64

Comment 3 Kamil Páral 2015-07-07 12:57:35 UTC
I've hit this bug at least twice as well. I wanted to use globs for version/release and it didn't work. Unfortunately I don't fully remember my use cases. I think one of them was that I tried to remove a particular kernel (similar to comment 0). Since kernel packages are spit into several rpms and you want to remove all of them at once, it seems obvious to run something like `sudo dnf remove kernel*4.0.5*`. But it doesn't work at the moment. And I was quite confused by that fact, I spent some time figuring out what I was doing wrong.

Comment 4 Honza Silhan 2015-07-21 09:42:21 UTC
We should document that in version could be a glob pattern and support globs in release part.

Comment 5 Scott Dodson 2015-08-31 15:24:17 UTC
Another use case

Comment 6 Germano Massullo 2015-09-04 08:25:25 UTC
[20:37] <rdieter_work> I suspect it doesn't work with the .x86_64 arch suffix

I confirm with the following tests

WORKING TEST
# dnf remove kf5-*-devel

NOT WORKING TEST
# dnf remove kf5-*-devel-*.fc22.x86_64
# dnf remove kf5-*-devel.fc22.x86_64

Comment 7 Pysis868 2015-12-15 02:15:48 UTC
Just to throw my bag of cents in here: I agree that the wildcard mechanism needs some work.  A lot of the following tests I would expect to work don't, and oddly only the one at the end does indeed work.

My Console I/O:
[user@localhost ~]$ rpm -qa "*initial-setup*"
gnome-initial-setup-3.18.0-1.fc23.x86_64

[user@localhost ~]$ sudo dnf remove gnome-inital-setup
No match for argument: gnome-inital-setup
Error: No packages marked for removal.
[user@localhost ~]$ sudo dnf remove gnome-inital-setup*
No match for argument: gnome-inital-setup*
Error: No packages marked for removal.
[user@localhost ~]$ sudo dnf remove gnome-inital-setup-*
No match for argument: gnome-inital-setup-*
Error: No packages marked for removal.

[user@localhost ~]$ sudo dnf remove "gnome-inital-setup"
No match for argument: gnome-inital-setup
Error: No packages marked for removal.
[user@localhost ~]$ sudo dnf remove "gnome-inital-setup*"
No match for argument: gnome-inital-setup*
Error: No packages marked for removal.
[user@localhost ~]$ sudo dnf remove "gnome-inital-setup-*"
No match for argument: gnome-inital-setup-*
Error: No packages marked for removal.

[user@localhost ~]$ sudo yum remove "gnome-inital-setup" 2>&1 |tail -n +6
No match for argument: gnome-inital-setup
Error: No packages marked for removal.
[user@localhost ~]$ sudo yum remove "gnome-inital-setup*" 2>&1 |tail -n +6
No match for argument: gnome-inital-setup*
Error: No packages marked for removal.
[user@localhost ~]$ sudo yum remove "gnome-inital-setup-*" 2>&1 |tail -n +6
No match for argument: gnome-inital-setup-*
Error: No packages marked for removal.

[user@localhost ~]$ sudo dnf remove "initial-setup"
No match for argument: initial-setup
[user@localhost ~]$ sudo dnf remove "*initial-setup*"
Dependencies resolved.
[...]
Remove  1 Package

Installed size: 2.1 M
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Erasing     : gnome-initial-setup-3.18.0-1.fc23.x86_64                                                                    1/1
  Verifying   : gnome-initial-setup-3.18.0-1.fc23.x86_64                                                                    1/1

Removed:
  gnome-initial-setup.x86_64 3.18.0-1.fc23

Complete!

Comment 8 bob53181 2015-12-17 03:09:06 UTC
Pysis, in most of the commands (9 of them) you have a typo - could you replace 'gnome-inital-setup' with 'gnome-initial-setup' (in all 9 of them) and then post the outputs again?

Comment 9 Fedora Admin XMLRPC Client 2016-07-08 09:31:08 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 10 Fedora End Of Life 2016-07-19 12:56:19 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 11 Jan Kurik 2016-07-26 05:00:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 25 development cycle.
Changing version to '25'.

Comment 12 Jaroslav Mracek 2017-05-18 09:02:48 UTC
The problem was solved in dnf-2.4.0-1 that was released into rawhide and Fedora 26.

Comment 13 Adam Miller 2017-08-17 16:54:10 UTC
This issue appears to have shown back up in dnf-2.6.3-1.fc26.noarch

Comment 14 Jaroslav Mracek 2017-08-29 14:47:40 UTC
I create patch that should solve the problem (https://github.com/rpm-software-management/libdnf/pull/314).

Comment 15 Fedora End Of Life 2018-05-03 08:18:55 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 16 Jan Kurik 2018-08-14 11:14:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 29 development cycle.
Changing version to '29'.

Comment 17 Jaroslav Mracek 2018-09-24 14:55:59 UTC
The problem was fixed in dnf-2.7.5


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