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 2015407 - rpm -e allows subpackage removal even another package depends on it
Summary: rpm -e allows subpackage removal even another package depends on it
Keywords:
Status: CLOSED ERRATA
Alias: None
Deadline: 2022-01-10
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: rpm
Version: 9.0
Hardware: x86_64
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Michal Domonkos
QA Contact: Tomáš Bajer
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-10-19 06:40 UTC by mxie@redhat.com
Modified: 2022-05-17 16:35 UTC (History)
17 users (show)

Fixed In Version: rpm-4.16.1.3-9.el9
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-17 16:01:23 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-100208 0 None None None 2021-10-19 07:52:38 UTC
Red Hat Product Errata RHBA-2022:4021 0 None None None 2022-05-17 16:01:36 UTC

Description mxie@redhat.com 2021-10-19 06:40:30 UTC
Description of problem:
libguestfs-appliance can be removed without dependency notification on rhel9

Version-Release number of selected component (if applicable):
libguestfs-1.46.0-1.el9.x86_64
libguestfs-appliance-1.46.0-1.el9.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Check the dependence list of latest libguestfs package, libguestfs depends on libguestfs-appliance
# yum deplist libguestfs-1.46.0-1.el9.x86_64
....
package: libguestfs-1:1.46.0-1.el9.x86_64
  dependency: (libguestfs-appliance = 1:1.46.0-1.el9 or libguestfs-noappliance)
   provider: libguestfs-appliance-1:1.46.0-1.el9.x86_64
....

2.Remove libguestfs-appliance with rpm successfully although libguestfs depends on libguestfs-appliance
# rpm -e libguestfs-appliance-1.46.0-1.el9.x86_64


Actual results:
As above description

Expected results:
libguestfs-appliance shouldn't be removed when libguestfs packaged installed on rhel9


Additional info:
Can't reproduce the bug on rhel8.6

# yum deplist libguestfs 
package: libguestfs-1:1.44.0-4.module+el8.6.0+12969+f61072d9.x86_64
  dependency: (libguestfs-appliance = 1:1.44.0-4.module+el8.6.0+12969+f61072d9 or libguestfs-noappliance)
   provider: libguestfs-appliance-1:1.44.0-4.module+el8.6.0+12969+f61072d9.x86_64
.....

# rpm -e libguestfs-appliance-1.44.0-4.module+el8.6.0+12969+f61072d9.x86_64
error: Failed dependencies:
	(libguestfs-appliance = 1:1.44.0-4.module+el8.6.0+12969+f61072d9 or libguestfs-noappliance) is needed by (installed) libguestfs-1:1.44.0-4.module+el8.6.0+12969+f61072d9.x86_64

Comment 1 Richard W.M. Jones 2021-10-19 07:51:58 UTC
I suspect this must be some sort of bug in RPM.  I am able to reproduce it
on RHEL 9 where removing libguestfs-appliance leaves a dangling unsatisfied
dependency.  I am _not_ able to reproduce it on Fedora.

Broken:  rpm-4.16.1.3-7.el9.x86_64
Working: rpm-4.17.0-1.fc36.1.x86_64

Reproduce this by installing libguestfs on RHEL 9.

Note that libguestfs & libguestfs-appliance are both installed:

$ rpm -q libguestfs libguestfs-appliance
libguestfs-1.46.0-1.el9.x86_64
libguestfs-appliance-1.46.0-1.el9.x86_64

Note that libguestfs Requires libguestfs-appliance:

$ rpm -qR libguestfs | grep appliance
(libguestfs-appliance = 1:1.46.0-1.el9 or libguestfs-noappliance)

Note that libguestfs-noappliance is not installed:

$ rpm -q libguestfs-noappliance
package libguestfs-noappliance is not installed

Remove libguestfs-appliance using rpm -e:

$ sudo rpm -e libguestfs-appliance
$ rpm -q libguestfs-appliance 
package libguestfs-appliance is not installed

Comment 2 Panu Matilainen 2021-10-19 11:50:04 UTC
Didn't actually test, but I think this is fixed upstream by https://github.com/rpm-software-management/rpm/commit/aa57fb568c14b33265e1f9e44665b16818a2b539

Comment 3 Richard W.M. Jones 2021-10-19 13:49:34 UTC
Yes that was the commit which stood out to me.  I will bisect this one later,
in meetings all day.

Comment 4 Richard W.M. Jones 2021-10-19 15:38:50 UTC
I can confirm it is commit aa57fb568c14b33265e1f9e44665b16818a2b539 which
fixes the problem for me.

Comment 5 Panu Matilainen 2021-10-20 06:42:38 UTC
Ack, thanks for testing!

Comment 15 errata-xmlrpc 2022-05-17 16:01:23 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 (new packages: rpm), 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/RHBA-2022:4021


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