Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1845270

Summary: DNF(yum) versionlock adds duplicates to versionlock.list file
Product: Red Hat Enterprise Linux 8 Reporter: lnarvaez
Component: dnfAssignee: Nicola Sella <nsella>
Status: CLOSED ERRATA QA Contact: Radek Bíba <rbiba>
Severity: low Docs Contact:
Priority: low    
Version: 8.2CC: james.antill, jcastran, nsella, pkratoch
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Red Hat Enerprise Linux 8.2
Last Closed: 2020-11-04 01:53:12 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 lnarvaez 2020-06-08 19:26:46 UTC
Description of problem:

When items are specified to be version locked that already exist in the list, the item will be added again rather than ignored. 

Version-Release number of selected component (if applicable):


How reproducible:  Add item to version lock Multiple times.  Review versionlock list to see it referenced multiple times.  


Steps to Reproduce:
1. # dnf versionlock add vim-common
2. # dnf versionlock add vim-common
3. # cat /etc/dnf/plugins/versionlock.list

Actual results:

# cat /etc/dnf/plugins/versionlock.list 

# Added locks on Fri Jun  5 10:05:31 2020
vim-common-2:8.0.1763-13.el8.*

# Added locks on Mon Jun  8 15:24:15 2020
vim-common-2:8.0.1763-13.el8.*


Expected results:

# cat /etc/dnf/plugins/versionlock.list 

# Added locks on Fri Jun  5 10:05:31 2020
vim-common-2:8.0.1763-13.el8.*
 




Additional info:  This occurs with yum and dnf

Comment 1 Nicola Sella 2020-06-16 12:22:55 UTC
Hello, the bug is fixed upstream [1] version 4.0.13 and it will be available in rhel8.3. There is already a Bugzilla for fedora. [2]
I would close it as NEXTRELEASE if it is OK for you.

[1] https://github.com/rpm-software-management/dnf-plugins-core/commit/886605f463a35a211847b6e2e5e286ecd94fa601
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1782052

Comment 10 errata-xmlrpc 2020-11-04 01:53:12 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (yum bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2020:4510