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 1654529

Summary: dnf versionlock will accept NEVRA forms for additions which it then cannot match when deleting
Product: [Fedora] Fedora Reporter: David H. Gutteridge <dhgutteridge>
Component: dnf-plugins-coreAssignee: rpm-software-management
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 29CC: dmach, mblaha, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dnf-plugins-core-4.0.4-1.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-21 02:57:02 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.