Bug 1546102

Summary: DNF error when used with Artifactory RPM repo
Product: [Fedora] Fedora Reporter: citius <ilya>
Component: dnfAssignee: Marek Blaha <mblaha>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 27CC: dmach, ignatenko, ilya, mblaha, mhatina, packaging-team-maint, rpm-software-management, vmukhame, vrutkovs
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-01 07:46:58 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:
Attachments:
Description Flags
repomd.xml
none
repo xml file
none
primary.xml
none
repofile none

Description citius 2018-02-16 10:30:54 UTC
Description of problem:

DNF throws an Type error, when Artifactory generated repository is used.


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

2.7.5
  Installed: dnf-0:2.7.5-2.fc27.noarch at Чт 14 дек 2017 14:21:41
  Built    : Fedora Project at Ср 29 ноя 2017 09:48:50

  Installed: rpm-0:4.14.1-1.fc27.x86_64 at Ср 07 фев 2018 09:39:54
  Built    : Fedora Project at Чт 01 фев 2018 11:45:18

  Artifactory 5.6.1

How reproducible:

Easy.

Steps to Reproduce:
1. Create local RPM repo in Artifactory.
2. Add .repo file with baseurl to /etc/yum.repos.d on Fedora
3. Any call to DNF now throws an error.

Actual results:

Error:
TypeError: Expected a string or a unicode object


Expected results:

Cache updated, package installed or updated.

Comment 1 citius 2018-02-16 10:39:40 UTC
Full traceback follows:

[root@test ~]# dnf upgrade
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 1013, in run
    self._process_demands()
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 766, in _process_demands
    load_available_repos=self.demands.available_repos)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 353, 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

Comment 2 citius 2018-02-16 10:42:48 UTC
Also no problems observed in YUM (Centos 7.3).
But YUM installed in Fedora shows same error.

Comment 3 Marek Blaha 2018-02-16 13:01:41 UTC
Are you able to provide .repo file and content of repodata directory of the Artifactory generated local RPM repo?

Comment 4 citius 2018-02-19 12:38:21 UTC
Created attachment 1397849 [details]
repomd.xml

Comment 5 citius 2018-02-19 12:39:18 UTC
Created attachment 1397850 [details]
repo xml file

Comment 6 citius 2018-02-19 12:39:59 UTC
Created attachment 1397851 [details]
primary.xml

Comment 7 citius 2018-02-19 12:40:33 UTC
Created attachment 1397852 [details]
repofile

Comment 8 Marek Blaha 2018-03-01 07:46:58 UTC

*** This bug has been marked as a duplicate of bug 1507129 ***