Bug 1657344 - Create local mirrors of the repositories fails at reposync command
Summary: Create local mirrors of the repositories fails at reposync command
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dnf
Version: 8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 8.0
Assignee: Packaging Maintenance Team
QA Contact: Robin Hack
Vladimír Slávik
Depends On:
TreeView+ depends on / blocked
Reported: 2018-12-07 17:11 UTC by Toby Drake
Modified: 2019-06-14 01:41 UTC (History)
7 users (show)

Fixed In Version: dnf-plugins-core-
Doc Type: No Doc Update
Doc Text:
Clone Of:
Last Closed: 2019-06-14 01:41:36 UTC
Type: Bug
Target Upstream Version:

Attachments (Terms of Use)

Description Toby Drake 2018-12-07 17:11:15 UTC
Description of problem:
When creating a local repo mirror on a separate RHEL 8 VM, the reposync command fails with errors.

How reproducible:

Every time on an updated RHEL 8 Beta VM.

Steps to Reproduce:

1. # yum install yum-utils createrepo httpd

2. $ sudo yum repolist

3. # mkdir -p /var/www/html

4. # reposync --nogpgcheck --download-path=/var/www/html --repoid rhel-8-for-x86_64-baseos-beta-rpms --downloadcomps --download-metadata

Actual results:

# reposync --nogpgcheck --download-path=/var/www/html --repoid rhel-8-for-x86_64-baseos-beta-rpms --downloadcomps --download-metadata

Updating Subscription Management repositories.
Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS  3.3 kB/s | 4.1 kB     00:01    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS  2.5 MB/s | 8.3 MB     00:03    
Traceback (most recent call last):
  File "/bin/reposync", line 98, in <module>
    main.user_main(MAPPING[command] + args, exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 115, in cli_run
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1055, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf-plugins/reposync.py", line 105, in run
  File "/usr/lib/python3.6/site-packages/dnf-plugins/reposync.py", line 144, in getcomps
    comps_fn = repo.metadata._comps_fn
AttributeError: 'Metadata' object has no attribute '_comps_fn'

Expected results:

Local mirror is created on the RHEL 8 machine.

Additional info:

These steps are documented here:

Associated BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1653125

Comment 1 Daniel Mach 2018-12-13 08:03:51 UTC
I believe this has been fixed recently in following PR:

Comment 4 Christian Tramnitz 2019-01-06 13:06:54 UTC
Yes, dnf-plugins-core 4.0.3 now has a '--metadata-path' option as per https://github.com/rpm-software-management/dnf-plugins-core/commit/80f393bca77bcb0add616e7733c488db786f70e9
Could you please update the RHEL8 beta package with the code from upstream?

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