Bug 1402631

Summary: dnf-automatic ignores versionlock
Product: [Fedora] Fedora Reporter: Edgar Hoch <edgar.hoch>
Component: dnfAssignee: rpm-software-management
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 24CC: agross, mluscon, packaging-team-maint, rpm-software-management, vmukhame
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-12-08 09:49:24 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:

Description Edgar Hoch 2016-12-08 01:55:17 UTC
Description of problem:

dnf upgrade run by dnf-automatic timer behaves different as on command line:

Packages locked by "dnf versionlock add packagename" are upgraded by dnf automatic but should not!

I blocked rpcbind by versionlock (reason: see bug 1401561).

# dnf versionlock list
rpcbind-0:0.2.3-10.rc1.fc24.*

# dnf list --showduplicates rpcbind
Available Packages
rpcbind.x86_64                                        0.2.3-10.rc1.fc24                                         fedora

I have checked "dnf upgrade", it doesn't list rpcbind as package for upgrade.

But at the next day, after dnf-automatic was run, rpcbind was upgraded, and I have to downgrade it again manually. Next day the same behaviour again:

# grep rpcbind /var/log/dnf.rpm.log
Dec 06 02:16:33 INFO Downgraded: rpcbind-0.2.3-10.rc1.fc24.x86_64
Dec 06 02:16:33 INFO Erased: rpcbind-0.2.3-12.rc2.fc24.x86_64
Dec 06 05:12:28 INFO Upgraded: rpcbind-0.2.3-12.rc2.fc24.x86_64
Dec 06 05:12:29 INFO Cleanup: rpcbind-0.2.3-10.rc1.fc24.x86_64
Dec 07 09:57:11 INFO Downgraded: rpcbind-0.2.3-10.rc1.fc24.x86_64
Dec 07 09:57:11 INFO Erased: rpcbind-0.2.3-12.rc2.fc24.x86_64
Dec 08 01:52:52 INFO Upgraded: rpcbind-0.2.3-12.rc2.fc24.x86_64
Dec 08 01:53:57 INFO Cleanup: rpcbind-0.2.3-10.rc1.fc24.x86_64


Version-Release number of selected component (if applicable):
dnf-1.1.10-2.fc24.noarch

How reproducible:
Always

Steps to Reproduce:
1. Downgrade a package
2. dnf versionlock a package
3. Check that dnf upgrade doesn't list the versionlocked package
4. Configure dnf-automatic to run
5. Wait until dnf-automatic was run
6. Check if the versionlocked package remains downgraded or was upgraded

Actual results:
dnf versionlocked package is upgraded by dnf-automatic

Expected results:
dnf versionlocked package is not upgraded by dnf-automatic

Comment 1 Igor Gnatenko 2016-12-08 09:49:24 UTC

*** This bug has been marked as a duplicate of bug 1372307 ***

Comment 2 Edgar Hoch 2016-12-08 11:08:53 UTC
Sorry, I saw bug 1372307 but didn't identify it as duplicates previously.

Will the patch backported to Fedora 24 and 25?

Comment 3 Alexander Groß 2017-02-12 11:49:21 UTC
@Edgar Hoch, it seems Fedora 26 will be the first release that will receive the patch for the plugins. In the meantime, you can test dnf 2 using the Copr repository. Here is more information: https://fedoraproject.org/wiki/Changes/DNF-2.0 (where is also stated that dnf 1 will only receive security updates)