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

dnf distro-sync says a pkg isn't installed even when it is

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • rhel-10.0.beta
    • rhel-8.4.0
    • dnf
    • dnf-4.19.0-1.el10
    • None
    • None
    • rhel-sst-cs-software-management
    • ssg_core_services
    • 18
    • 20
    • None
    • False
    • No
    • None
    • Release Note Not Required
    • Unspecified
    • Unspecified
    • None

      Description of problem:
      On RHEL 8.4 “dnf distro-sync” returns misleading information - that a package isn’t installed even though it is.

      Version-Release number of selected component (if applicable):
      dnf-4.4.2-11.el8.noarch

      How reproducible:
      Install any package from some repository, disable the repository and run dnf distro-sync <package>.

      Steps to Reproduce:
      1. Enable a repository that contains a package not available in other enabled repositories, for example CentOS Extras repository:

      1. cat >/etc/yum.repos.d/extras.repo <<EOF
        [extras]
        name=CentOS Extras $releasever - \$basearch
        baseurl=http://mirror.centos.org/centos/\$releasever/extras/\$basearch/os/
        enabled=1
        gpgcheck=0
        EOF

      2. Install a package which is available only in the newly enabled repository, for example cpaste from CentOS Extras:

      1. yum install -y --disablerepo "*" --enablerepo extras cpaste

      3. Disable the repository from step 1

      1. dnf config-manager --set-disabled extras

      4. Run dnf distro-sync with the newly installed package:

      1. yum distro-sync cpaste

      Actual results:

      1. yum distro-sync cpaste

      No package cpaste installed.
      Error: No packages marked for distribution synchronization.

      Expected results:
      Just the error is printed, the sentence “No package cpaste installed” isn’t correct. Because:

      1. rpm -q cpaste
        cpaste-1.0.0-3.el8.x86_64

      ...the cpaste is installed

      Additional info:

              rhn-support-ppisar Petr Pisar
              ahosek@redhat.com Adam Hosek
              packaging-team-maint packaging-team-maint
              Tomas Bajer Tomas Bajer
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated: