Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-115194

dnf versionlock resulted in "trying to remove protected package"

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • None
    • rhel-9.6
    • dnf-plugins-core
    • No
    • Moderate
    • rhel-swm
    • 0
    • Dev ack
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      When a customer versionlocks a single package such as systemd, the other packages are not included. When an update is performed dnf reports that it was trying to remove systemd instead of correctly reporting that it was excluded due to versionlocking.

      Steps to reproduce

      1. Verify there is an available update for systemd
      2. yum versionlock add systemd
      3. yum update

      Expected results

      I would want to see the normal dependency errors indicating the package is either excluded or version locked.

      [root@r9 ~]# yum update --exclude=systemd |& grep Problem
       Problem 1: package systemd-container-252-51.el9_6.2.x86_64 from rhel-9-for-x86_64-baseos-rpms requires systemd(x86-64) = 252-51.el9_6.2, but none of the providers can be installed
       Problem 2: package systemd-udev-252-51.el9_6.2.x86_64 from rhel-9-for-x86_64-baseos-rpms requires systemd(x86-64) = 252-51.el9_6.2, but none of the providers can be installed
       Problem 3: package systemd-pam-252-51.el9_6.2.x86_64 from rhel-9-for-x86_64-baseos-rpms requires systemd = 252-51.el9_6.2, but none of the providers can be installed
       Problem 4: systemd-libs-252-51.el9_6.1.i686 from rhel-9-for-x86_64-baseos-rpms  does not belong to a distupgrade repository
       Problem 5: package systemd-252-51.el9_6.1.x86_64 from @System requires systemd-rpm-macros = 252-51.el9_6.1, but none of the providers can be installed 

      Actual results

       

      [root@r9 ~]# rpm -q systemd
      systemd-252-51.el9_6.1.x86_64
      
      [root@r9 ~]# yum versionlock add systemd
      Adding versionlock on: systemd-0:252-51.el9_6.1.*
      
      [root@r9 ~]# yum update
      Error:
       Problem: The operation would result in removing the following protected packages: systemd
      (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) 

      Additional Note:

      This issue is not present in RHEL 10. RHEL 10 reports back with can't update sytemd-<blah> because systemd is excluded. 

       

              rh-ee-egoode Evan Goode
              rhn-support-jcastran John Castranio
              packaging-team-maint packaging-team-maint
              Software Management QE Software Management QE
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: