Bug 1654529 - dnf versionlock will accept NEVRA forms for additions which it then cannot match when deleting
Summary: dnf versionlock will accept NEVRA forms for additions which it then cannot ma...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf-plugins-core
Version: 29
Hardware: All
OS: Linux
unspecified
low
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-29 02:12 UTC by David H. Gutteridge
Modified: 2019-02-21 02:57 UTC (History)
5 users (show)

Fixed In Version: dnf-plugins-core-4.0.4-1.fc29
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-21 02:57:02 UTC


Attachments (Terms of Use)

Description David H. Gutteridge 2018-11-29 02:12:40 UTC
Description of problem:
The dnf versionlock plugin will accept package names to add in NEVRA forms which it is then unable to delete when receiving those same forms. For example:

[disciple@arcusxiii ~]$ sudo dnf versionlock add firefox-0:63.0.3-2.fc29
Last metadata expiration check: 0:12:04 ago on Wed 28 Nov 2018 08:30:29 PM EST.
Adding versionlock on: firefox-0:63.0.3-2.fc29.*
[disciple@arcusxiii ~]$ sudo dnf versionlock delete firefox-0:63.0.3-2.fc29
Last metadata expiration check: 0:12:14 ago on Wed 28 Nov 2018 08:30:29 PM EST.
[disciple@arcusxiii ~]$ sudo dnf versionlock list
Last metadata expiration check: 0:12:22 ago on Wed 28 Nov 2018 08:30:29 PM EST.
firefox-0:63.0.3-2.fc29.*

(This is kind of a contrived example, I originally stumbled across this with a different package, in the form "kopete-0:17.08.3-1.fc27.1", which is a bit more exotic because of the extra ".1" at the end of its release. I ended up using that form as the complete NEVRA to supply, and then was confused when it wouldn't delete with that same form.)

This is conceptually similar to -- but distinct from -- https://bugzilla.redhat.com/show_bug.cgi?id=1643676, as the code path is different. (The matching criteria for deletions is determined quite differently, which I assume is by necessity.)

The fix is trivial, I will submit it as a GitHub pull up request. (The workaround is also trivial, of course, just change the NEVRA form supplied. But this should be fixed, anyway.)


Version-Release number of selected component (if applicable):
dnf-plugins-core 4.0.2

How reproducible:
Always.

Steps to Reproduce:
See above.

Comment 1 David H. Gutteridge 2018-11-29 02:21:34 UTC
Fix submitted as https://github.com/rpm-software-management/dnf-plugins-core/pull/308

(This adds two more possible NEVRA forms, which match accepted versions noted in the main dnf man page's "Specifying Packages" section.)

Comment 2 Fedora Update System 2019-02-18 10:15:32 UTC
libcomps-0.1.10-2.fc29 libdnf-0.26.0-1.fc29 dnf-plugins-core-4.0.4-1.fc29 dnf-plugins-extras-4.0.2-1.fc29 dnf-4.1.0-1.fc29 librepo-1.9.4-1.fc29 createrepo_c-0.12.1-1.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2019-1fccede810

Comment 3 Fedora Update System 2019-02-19 06:27:29 UTC
createrepo_c-0.12.1-1.fc29, dnf-4.1.0-1.fc29, dnf-plugins-core-4.0.4-1.fc29, dnf-plugins-extras-4.0.2-1.fc29, libcomps-0.1.10-2.fc29, libdnf-0.26.0-1.fc29, librepo-1.9.4-1.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-1fccede810

Comment 4 Fedora Update System 2019-02-21 02:57:02 UTC
createrepo_c-0.12.1-1.fc29, dnf-4.1.0-1.fc29, dnf-plugins-core-4.0.4-1.fc29, dnf-plugins-extras-4.0.2-1.fc29, libcomps-0.1.10-2.fc29, libdnf-0.26.0-1.fc29, librepo-1.9.4-1.fc29 has been pushed to the Fedora 29 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.