Bug 1507129 - DNF crashes on repositories without filelists
Summary: DNF crashes on repositories without filelists
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: rawhide
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jaroslav Mracek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1546102 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-27 18:57 UTC by sedrubal
Modified: 2018-06-28 08:25 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-06-28 08:25:23 UTC


Attachments (Terms of Use)
relevant part of dnf.librepo.log (IMHO there is nothing helpful) (7.30 KB, text/plain)
2017-10-27 18:57 UTC, sedrubal
no flags Details

Description sedrubal 2017-10-27 18:57:43 UTC
Created attachment 1344471 [details]
relevant part of dnf.librepo.log (IMHO there is nothing helpful)

Description of problem:

DNF crashes after adding zammad repo file (for yum on centos).

Version-Release number of selected component (if applicable):

librepo-1.8.0-1.fc26.x86_64
curl-7.53.1-10.fc26.x86_64
dnf-2.7.3-1.fc26.noarch

How reproducible:

Always

Steps to Reproduce:

1. curl -o /etc/yum.repos.d/zammad.repo https://dl.packager.io/srv/zammad/zammad/stable/installer/el/7.repo
2. dnf makecache  # or any dnf command interacting with repos

Actual results:

After asking for the gpg repo key for the new repo, dnf crashes

Expected results:

DNF should work with this repository and I want to be able to download zammad.

Additional info:

Instructions for zammad are here: https://docs.zammad.org/en/latest/install-centos.html

dnf output with traceback:

# dnf -v makecache
DNF version: 2.7.3
cachedir: /var/cache/dnf
Making cache files for all metadata files.
updates: will expire after 21571 seconds.
fedora: will expire after 604776 seconds.
zammad: will expire after 172798 seconds.
repo: using cache for: updates
not found deltainfo for: Fedora 26 - x86_64 - Updates
updates: using metadata from Thu Oct 26 11:48:06 2017.
repo: using cache for: fedora
not found deltainfo for: Fedora 26 - x86_64
not found updateinfo for: Fedora 26 - x86_64
fedora: using metadata from Wed Jul  5 20:31:38 2017.
repo: using cache for: zammad
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], 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
    cli.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1011, in run
    return self.command.run()
  File "/usr/lib/python3.6/site-packages/dnf/cli/commands/makecache.py", line 55, in run
    return self.base.update_cache(self.opts.timer is not None)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 298, in update_cache
    self.fill_sack(load_system_repo=False, load_available_repos=True)  # performs the md sync
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 326, in fill_sack
    self._add_repo_to_sack(r)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 122, in _add_repo_to_sack
    hrepo.filelists_fn = repo._filelists_fn
TypeError: Expected a string or a unicode object

Note: repo._filelists_fn is None at this point.

yum-deprecated (3.4.3) output:

# yum-deprecated makecache
Yum command has been deprecated, use dnf instead.
See 'man dnf' and 'man yum2dnf' for more information.

fedora/26/x86_64/metalink                                |  26 kB  00:00:00
updates/26/x86_64/metalink                               |  17 kB  00:00:00
zammad/x86_64/signature                                  |  473 B  00:00:00
zammad/x86_64/signature                                  |  578 B  00:00:00
Error: requested datatype filelists not available

Comment 1 Daniel Mach 2017-11-01 12:12:19 UTC
This is a real bug.
We need to change behavior to following:
* if filelists is in repomd.xml and exists -> use it
* if filelists is in repomd.xml and does not exist -> fail
* if filelists is not in repomd.xml -> don't use it (skip loading, ignore)

Comment 2 Jaroslav Mracek 2017-12-11 16:02:41 UTC
I created a patch that should solve the issue (https://github.com/rpm-software-management/dnf/pull/1000).

Comment 3 Marek Blaha 2018-03-01 07:46:58 UTC
*** Bug 1546102 has been marked as a duplicate of this bug. ***

Comment 4 Fedora End Of Life 2018-05-03 08:19:57 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 5 Jaroslav Mracek 2018-06-28 08:25:23 UTC
The issue is solved by dnf-3.0.1-1 that was released into rawhide.


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