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 1793950 - dnf shows different package count for appstream repository than what is specified in the repository metadata
Summary: dnf shows different package count for appstream repository than what is speci...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.1
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 8.0
Assignee: Jaroslav Mracek
QA Contact: Luca Berton
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-22 10:41 UTC by Kaushik Sajjan Agarwal
Modified: 2024-12-20 18:58 UTC (History)
8 users (show)

Fixed In Version: dnf-4.2.17-1.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-28 16:49:13 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 Product Errata RHBA-2020:1823 0 None None None 2020-04-28 16:49:22 UTC

Description Kaushik 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.

Comment 2 Jaroslav Mracek 2020-01-27 18:48:26 UTC
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

Comment 3 Jaroslav Mracek 2020-01-28 14:14:30 UTC
CI-tests: https://github.com/rpm-software-management/ci-dnf-stack/pull/695

Comment 4 Jaroslav Mracek 2020-01-28 14:21:17 UTC
Do you need any additional information, rpm build with the patch for testing or anything else?

Comment 15 errata-xmlrpc 2020-04-28 16:49:13 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/RHBA-2020:1823


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