[RHEL 8] Reposync --newest-only (-n) fails to sync all necessary packages and modules

Solution Verified - Updated

Environment

  • Red Hat Enterprise Linux 8

Issue

  • After using reposync with -n or --newest-only, yum fails with Error opening file for checksum:

      Error opening file for checksum: /repo/rhel-8-for-x86_64-appstream-rpms/Packages/r/rhnsd-5.0.35-3.module+el8+2754+6a08e8f4.x86_64.rpm
    
  • RHEL 8.0 and 8.1 reposync failed to download the modules in addition to the latest packages.

  • Why does reposync --newest-only download multiple versions of a package?

Resolution

Ensure your system is using the latest yum-utils available in order to resolve commonly seen issues.

Root Cause

With the --newest flag, reposync will pull

1 - All the highest EVRA's for each non-modular RPM (Everything without a ".module" in it's N)
2 - All the rpms from the latest versions of all module streams (It takes each module stream, and grabs the artifacts from the latest module version)
3 - All RPMs from all module streams (artifacts) with the highest EVRAs

                              +------------------+  +------------------+
                              |                  |  |                  |
                              |    module-a-1    |  |    module-a-2    |
                              |                  |  |                  |
                              +---------+--------+  +---------+--------+
                                        |                     |
                                        v                     v
+-----------+  +-----------+  +---------+--------+  +---------+--------+
|           |  |           |  |                  |  |                  |
|   rpm-3   |  |   rpm-1   |  |   rpm-4.module   |  |   rpm-3.module   |
|           |  |           |  |                  |  |                  |
+-----------+  +-----------+  +------------------+  +------------------+

"newest" meaning the highest EVRA

rpm-3 = Due to it being the "newest" non-modular RPM
rpm-3.module = Due to it being the latest artifact in the "newest" module version
rpm-4.module = Due to it being the "newest" artifact in all module streams

SBR
Components
Category
Tags

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.