Bug 1714788

Summary: Reposync should sync the entire repository to include module information. reposync should download the packages regardless of whether a module is enabled or disabled
Product: Red Hat Enterprise Linux 8 Reporter: jcastran
Component: dnf-plugins-coreAssignee: Marek Blaha <mblaha>
Status: CLOSED ERRATA QA Contact: Eva Mrakova <emrakova>
Severity: high Docs Contact:
Priority: high    
Version: 8.1CC: alexander.burt, dmach, fedoraproject, james.antill, kwalker, mblaha, rmullett, toracat
Target Milestone: rcKeywords: Triaged
Target Release: 8.0   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: dnf-plugins-core-4.0.8-1.el8 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-11-05 22:22:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1681085    
Bug Blocks:    

Description jcastran 2019-05-28 20:34:29 UTC
Description of problem:
Packages are only accessible when a specific module or stream is enabled. Reposync is not able to sync the repository because it has to abide by these rules. The workaround would be to enable all modules, sync, then switch to any alternative streams or any remaining un-enabled modules, then sync again. 

This should be a simply run reposync and it syncs the entire repository without having to consider what's missing

Version-Release number of selected component (if applicable):
dnf-utils-4.0.2.2-3.el8.noarch

How reproducible:
Everytime

Steps to Reproduce:
1. reposync --disablerepo="*" --enablerepo="rhel-8-for-x86_64-appstream-rpms"

Actual results:
reposync only downloads packages that are accessible

Expected results:
reposync should download the entire repository to include modules that are not enabled or even disabled

Additional info:

Comment 1 Marek Blaha 2019-06-03 11:31:52 UTC
The other workaround would be to mark the repo as a hotfix repo: add --setopt=repo_id.module_hotfixes=1 switch to command line.

Comment 3 Marek Blaha 2019-06-04 07:07:17 UTC
PR https://github.com/rpm-software-management/dnf-plugins-core/pull/339 fixes the bug. Reposync now should download all the packages of the repo regardless the modules/streams status.

Comment 4 Marek Blaha 2019-06-04 07:51:26 UTC
The corresponding tests are here: https://github.com/rpm-software-management/ci-dnf-stack/pull/550

Comment 11 errata-xmlrpc 2019-11-05 22:22:06 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/RHSA-2019:3583

Comment 12 Alex 2024-02-27 15:58:00 UTC
This issue appears to be present again under dnf-plugins-core-4.0.21-23.el8 @mblaha
We are experiencing the exact same behavior if the workaround you described isn't present for both ubi-8-appstream and rhel-8-for-x86_64-appstream-rpms

Currently installed:
dnf.noarch                                         4.7.0-19.el8                                    @rhel-8-for-x86_64-baseos-rpms
dnf-automatic.noarch                               4.7.0-19.el8                                    @rhel-8-for-x86_64-baseos-rpms
dnf-data.noarch                                    4.7.0-19.el8                                    @rhel-8-for-x86_64-baseos-rpms
dnf-plugin-subscription-manager.x86_64             1.28.40-1.el8_9                                 @rhel-8-for-x86_64-baseos-rpms
dnf-plugins-core.noarch                            4.0.21-23.el8                                   @rhel-8-for-x86_64-baseos-rpms
yum.noarch                                         4.7.0-19.el8                                    @rhel-8-for-x86_64-baseos-rpms
yum-utils.noarch                                   4.0.21-23.el8                                   @rhel-8-for-x86_64-baseos-rpms

Comment 13 Marek Blaha 2024-03-08 09:33:22 UTC
Would you mind filing a new issue for this regression?
I've just done a quick check on RHEL 8.9:

# rpm -q dnf dnf-plugins-core
dnf-4.7.0-19.el8.noarch
dnf-plugins-core-4.0.21-23.el8.noarch

# dnf reposync --urls --disablerepo="*" --enablerepo="rhel-8-for-x86_64-appstream-rpms" | grep php-cli
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.2.11-1.module+el8+2561+1aca3413.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.2.11-4.module+el8.1.0+4555+f5cb8e18.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.3.5-3.module+el8.1.0+3551+6c05863c.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.3.5-5.module+el8.1.0+4560+e0eee7d6.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.2.11-2.module+el8.1.0+3202+af5476b9.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.2.24-1.module+el8.2.0+4601+7c76a223.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.3.20-1.module+el8.2.0+7373+b272fdef.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.4.6-4.module+el8.3.0+7002+2eb69d76.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.4.19-1.module+el8.5.0+11143+cc873159.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-8.0.13-2.module+el8.6.0+13671+84712317.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.4.19-2.module+el8.6.0+13953+0a59ce9f.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-8.0.13-3.module+el8.6.0+15725+0c79e7c4.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.4.19-3.module+el8.6.0+15726+994cde98.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.4.19-4.module+el8.6.0+16316+906f6c6d.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-8.0.20-2.module+el8.7.0+16187+bb5ab920.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.4.30-1.module+el8.7.0+15886+8e29b882.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-7.4.33-1.module+el8.8.0+17865+ef7eddfa.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-8.0.27-1.module+el8.7.0+17863+0ad92cd2.x86_64.rpm
https://cdn.redhat.com/content/dist/rhel8/8/x86_64/appstream/os/Packages/p/php-cli-8.0.30-1.module+el8.8.0+20302+42d2b711.x86_64.rpm

So it looks like reposync is going to download packages from every php stream. The output is the same regardless I enable some specific php stream or disable php module at all.

Comment 14 Marek Blaha 2024-03-08 09:35:05 UTC
Please could you add also a reproducer? I cannot reproduce it on my system.