Bug 1726712 - Versionlock plugin not allowing upgrades from previous
Summary: Versionlock plugin not allowing upgrades from previous
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.0
Hardware: All
OS: Linux
Target Milestone: rc
: 8.0
Assignee: Marek Blaha
QA Contact: Luca Berton
Depends On:
TreeView+ depends on / blocked
Reported: 2019-07-03 14:03 UTC by Daniel Henninger
Modified: 2023-03-07 12:39 UTC (History)
6 users (show)

Fixed In Version: dnf-plugins-core-4.0.12-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2020-04-28 16:47:49 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-29469 0 None None None 2023-03-07 12:39:51 UTC
Red Hat Product Errata RHBA-2020:1823 0 None None None 2020-04-28 16:48:03 UTC

Description Daniel Henninger 2019-07-03 14:03:54 UTC
Description of problem:
Versionlock in yum used to allow us to upgrade a previous version of the package.  For example, if we had puppet agent 6.4.2 installed, and versionlocked at 6.4.2, we could then update the versionlock to 6.5.0 and then yum upgrade puppet-agent and that would work.  dnf, on the other hand, appears to lose all knowledge that there is or ever was puppet-agent 6.4.2.  Basically it claims there is nothing to upgrade.  It would let me install puppet agent 6.5.0, but it treats it like there is nothing to upgrade and just layers things on top.  Strangely, I can work around this by manually adding BOTH 6.4.2 and 6.5.0 locks to versionlock.list, but that's not particularly sustainable.

Please note that I use the puppet yum module to handle versionlocks, which adds entries to versionlock.list rather than using the dnf commands.  However, I believe that is considered a perfectly legit means of maintaining that file.

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

How reproducible:
I can easily reproduce with the steps below

Steps to Reproduce:
1. add to /etc/dnf/plugins/versionlock.list: puppet-agent-0:6.4.2-1.el8.x86_64
2. install puppet-agent 6.4.2
3. replace the line from step 1 with: puppet-agent-0:6.5.0-1.el8.x86_64
4. dnf upgrade puppet-agent-6.5.0

Actual results:
Package puppet-agent available, but not installed.
No match for argument: puppet-agent-6.5.0
Error: No packages marked for upgrade.

Expected results:
Resolving Dependencies
--> Running transaction check
---> Package puppet-agent.x86_64 0:6.4.2-1.el7 will be updated
---> Package puppet-agent.x86_64 0:6.5.0-1.el7 will be an update
--> Finished Dependency Resolution

Dependencies Resolved

 Package              Arch           Version              Repository       Size
 puppet-agent         x86_64         6.5.0-1.el7          puppet6          22 M

Transaction Summary
Upgrade  1 Package

Total download size: 22 M
Is this ok [y/d/N]:

Additional info:
I don't know that this isn't intended behavior, but it worked very cleanly with yum in RHEL 7 and make for some easy ways to handle puppet-led upgrades.  And of course -- if you go to reproduce the expected behavior on RHEL7, make sure to replace el8 with el7 in your lock.  =)

Comment 2 Marek Blaha 2019-10-07 15:29:14 UTC
I don't think this behaviour is intended.
PR https://github.com/rpm-software-management/dnf-plugins-core/pull/364 fixes it and enables upgrading installed package to the locked version.

Comment 4 antal.nemes 2019-11-20 14:36:26 UTC
Encountered the same issue. 
I can confirm that https://github.com/rpm-software-management/dnf-plugins-core/pull/364 indeed fixes this issue (I applied the patch manually).

Comment 9 errata-xmlrpc 2020-04-28 16:47:49 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, and where to find the updated
files, follow the link below.

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


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