reposync command fails when downloadcomps parameter is used on RHEL8

Solution Verified - Updated -


  • reposync command fails when "--downloadcomps" parameter is used
# reposync --repo rhel-8-for-x86_64-baseos-htb-rpms -p /var/www/html/test --download-metadata --downloadcomps
Updating Subscription Management repositories.
    Updating Subscription Management repositories.
Red Hat Enterprise Linux 8 for x86_64 - BaseOS HTB (RPMs)                       1.7 kB/s | 4.1 kB     00:02    
Red Hat Enterprise Linux 8 for x86_64 - BaseOS HTB (RPMs)                       6.1 MB/s |  55 MB     00:08    
Traceback (most recent call last):
  File "/usr/bin/reposync", line 98, in <module>
    main.user_main(MAPPING[command] + args, exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/", line 115, in cli_run
  File "/usr/lib/python3.6/site-packages/dnf/cli/", line 1055, in run
  File "/usr/lib/python3.6/site-packages/dnf-plugins/", line 105, in run
  File "/usr/lib/python3.6/site-packages/dnf-plugins/", line 144, in getcomps
    comps_fn = repo.metadata._comps_fn
AttributeError: 'Metadata' object has no attribute '_comps_fn'


  • Red Hat Enterprise Linux (RHEL) 8
  • dnf-utils-

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content