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 1707453

Summary: dnf update --allowerasing just removes a package, without installing a new package.
Product: Red Hat Enterprise Linux 8 Reporter: Andrei Stepanov <astepano>
Component: dnfAssignee: Jaroslav Mracek <jmracek>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: high Docs Contact:
Priority: high    
Version: 8.2CC: dmach, emrakova, james.antill
Target Milestone: rcKeywords: Triaged
Target Release: 8.0Flags: pm-rhel: mirror+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: libsolv-0.7.4-2.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:22:06 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:
Bug Depends On: 1681084    
Bug Blocks:    

Description Andrei Stepanov 2019-05-07 14:45:28 UTC
dnf update  --allowerasing just removes package

Here are commands I run:

[root@rhel8-7737 bin]# rpm -q python3-ldb-devel
python3-ldb-devel-1.4.2-2.el8.x86_64


[root@rhel8-7737 bin]# dnf list --showduplicates python3-ldb-devel
Last metadata expiration check: 0:14:21 ago on Tue 07 May 2019 10:21:28 AM EDT.
Installed Packages
python3-ldb-devel.x86_64              1.4.2-2.el8              @rhel-8-buildroot
Available Packages
python3-ldb-devel.x86_64              1.4.2-2.el8              @rhel-8-buildroot
python3-ldb-devel.x86_64              1.4.2-2.el8              rhel-8-buildroot 
python3-ldb-devel.x86_64              1.5.4-1.el8              brew-21544647    


[root@rhel8-7737 bin]# dnf update  --allowerasing python3-ldb-devel
Last metadata expiration check: 0:14:43 ago on Tue 07 May 2019 10:21:28 AM EDT.
Dependencies resolved.
================================================================================
 Package               Arch       Version           Repository             Size
================================================================================
Removing:
 python3-ldb-devel     x86_64     1.4.2-2.el8       @rhel-8-buildroot     354  

Transaction Summary
================================================================================
Remove  1 Package

Freed space: 354  
Is this ok [y/N]: y
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Erasing          : python3-ldb-devel-1.4.2-2.el8.x86_64                   1/1 
  Running scriptlet: python3-ldb-devel-1.4.2-2.el8.x86_64                   1/1 
  Verifying        : python3-ldb-devel-1.4.2-2.el8.x86_64                   1/1 

Removed:
  python3-ldb-devel-1.4.2-2.el8.x86_64                                          

Complete!


[root@rhel8-7737 bin]# rpm -q python3-ldb-devel
package python3-ldb-devel is not installed


I asked DNF to update the package. DNF just removed the current, without updating to the newest.

[root@rhel8-7737 bin]# dnf install python3-ldb-devel-1.5.4-1.el8.x86_64
Last metadata expiration check: 0:17:59 ago on Tue 07 May 2019 10:21:28 AM EDT.
Error: 
 Problem: problem with installed package python-ldb-devel-common-1.4.2-2.el8.x86_64
  - package python3-ldb-devel-1.5.4-1.el8.x86_64 conflicts with python-ldb-devel-common(x86-64) < 1.5.4-1.el8 provided by python-ldb-devel-common-1.4.2-2.el8.x86_64
  - conflicting requests
(try to add '--allowerasing' to command line to replace conflicting packages or '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)


Anyway, DNF should not just remove package for `dnf update` command.

Comment 1 Andrei Stepanov 2019-05-07 14:47:37 UTC
[root@rhel8-7737 bin]# rpm -qa | grep -E 'dnf|rpm'
python3-libdnf-0.22.5-5.el8_0.x86_64
rpm-build-libs-4.14.2-17.el8.x86_64
dnf-plugin-spacewalk-2.8.5-9.module+el8+2754+6a08e8f4.noarch
dnf-data-4.0.9.2-5.el8.noarch
drpm-0.3.0-14.el8.x86_64
libdnf-0.22.5-5.el8_0.x86_64
rpm-plugin-selinux-4.14.2-17.el8.x86_64
python3-rpm-4.14.2-17.el8.x86_64
python3-dnf-4.0.9.2-5.el8.noarch
python3-dnf-plugins-core-4.0.2.2-3.el8.noarch
python3-dnf-plugin-spacewalk-2.8.5-9.module+el8+2754+6a08e8f4.noarch
dnf-plugin-subscription-manager-1.23.8-35.el8.x86_64
dnf-utils-4.0.2.2-3.el8.noarch
rpm-libs-4.14.2-17.el8.x86_64
rpm-plugin-systemd-inhibit-4.14.2-17.el8.x86_64
dnf-4.0.9.2-5.el8.noarch
dnf-plugins-core-4.0.2.2-3.el8.noarch
rpm-4.14.2-17.el8.x86_64

Comment 2 Jaroslav Mracek 2019-05-14 07:39:12 UTC
The issue is fixed in libsolv-0.7.2. The original report - https://bugzilla.redhat.com/show_bug.cgi?id=1446068.

Comment 13 errata-xmlrpc 2019-11-05 22:22:06 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.

https://access.redhat.com/errata/RHSA-2019:3583