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.
DescriptionKaushik Sajjan Agarwal
2020-01-22 10:41:10 UTC
Description of problem:
dnf shows different package count for appstream repository than what is specified in the repository metadata
Version-Release number of selected component (if applicable):
RHEL 8 and 8.1 i.e. when I set the release version of the system to 8 or 8.1 via subscription-manager command
How reproducible:
Always
Steps to Reproduce:
1. Register and subscribe an RHEL 8 host with Customer Portal.
2. Execute the following commands as displayed below:
# subscription-manager release --set 8.1
# rm -rf /var/cache/dnf/
# dnf repolist -v
# dnf makecache
# cd /var/cache/dnf/rhel-8-for-x86_64-appstream-rpms-c3f9f3c2a72c7eef/repodata/
# zcat b7a940a2fa344c1b956e00ff3458a9c5ee4ebea5bfac336e4ca3d5f7d06ee40a-primary.xml.gz | head | grep "metadata packages"
# zgrep -c '<package ' b7a940a2fa344c1b956e00ff3458a9c5ee4ebea5bfac336e4ca3d5f7d06ee40a-primary.xml.gz
Actual results:
1. dnf shows the package count as 8444:
---
Repo-id : rhel-8-for-x86_64-appstream-rpms
Repo-name : Red Hat Enterprise Linux 8 for x86_64 - AppStream (RPMs)
Repo-revision: 1579574131
Repo-updated : Tue 21 Jan 2020 08:05:31 AM IST
Repo-pkgs : 8,444
Repo-size : 15 G
Repo-baseurl : https://cdn.redhat.com/content/dist/rhel8/8.1/x86_64/appstream/os
Repo-expire : 86,400 second(s) (last: Wed 22 Jan 2020 03:01:17 PM IST)
Repo-filename: /etc/yum.repos.d/redhat.repo
---
2. But when I download the metadata, it shows a different count of packages inside metadata:
---
[root@rhel8-15 repodata]# zcat b7a940a2fa344c1b956e00ff3458a9c5ee4ebea5bfac336e4ca3d5f7d06ee40a-primary.xml.gz | head | grep "metadata packages"
<metadata packages="9234" xmlns="http://linux.duke.edu/metadata/common" xmlns:rpm="http://linux.duke.edu/metadata/rpm"><package type="rpm">
[root@rhel8-15 repodata]# zgrep -c '<package ' b7a940a2fa344c1b956e00ff3458a9c5ee4ebea5bfac336e4ca3d5f7d06ee40a-primary.xml.gz
9234
---
Expected results:
Both dnf and repository metadata should reflect the same package count.
Additional info:
Due to this problem, if the same repository will be synced in Red hat Satellite, Satellite GUI shows the incorrect count i.e. 9234 whereas the RHEL 8 client of the same Red Hat Satellite shows 8444 package count for appstream.
The problem is with excluded packages by configuration and modules. To resolve the issue we provide additional information Repo-pkgs and Repo-available-pkgs. Repo-pkgs provides number of all packages. See bellow. The problem is resolved by https://github.com/rpm-software-management/dnf/pull/1535.
Repo-id : updates-modular
Repo-name : Fedora Modular 31 - x86_64 - Updates
Repo-revision : 1580003078
Repo-updated : Sun 26 Jan 2020 02:46:11 AM CET
Repo-pkgs : 2,456
Repo-available-pkgs: 139
Repo-size : 2.4 G
Repo-metalink : https://mirrors.fedoraproject.org/metalink?repo=updates-released-modular-f31&arch=x86_64
Updated : Mon 27 Jan 2020 02:23:21 PM CET
Repo-baseurl : rsync://ftp.fi.muni.cz/pub/linux/fedora/linux/updates/31/Modular/x86_64/ (121 more)
Repo-expire : 21,600 second(s) (last: Mon 27 Jan 2020 02:23:21 PM CET)
Repo-filename : /etc/yum.repos.d/fedora-updates-modular.repo
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/RHBA-2020:1823