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