Bug 1471080 - dnf/yum error after placing .repo file in /etc/yum.repos.d
Summary: dnf/yum error after placing .repo file in /etc/yum.repos.d
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: fedora-repos
Version: 26
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-14 11:20 UTC by Pavel Niahodkin
Modified: 2017-07-14 13:02 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-07-14 13:02:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Described repo file (479 bytes, text/plain)
2017-07-14 11:20 UTC, Pavel Niahodkin
no flags Details

Description Pavel Niahodkin 2017-07-14 11:20:59 UTC
Created attachment 1298277 [details]
Described repo file

Description of problem:
"dnf update" command ended with error after placing .repo file in /etc/yum.repos.d

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


How reproducible:


Steps to Reproduce:
1. place attached file to /etc/yum.repos.d
2. perform "dnf update" command

Actual results:

Traceback (most recent call last):
  File "/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 95, in _main
    cli.configure(list(map(ucd, args)), option_parser())
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 856, in configure
    self._configure_repos(opts)
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 672, in _configure_repos
    self.base.read_all_repos(opts)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 394, in read_all_repos
    self.repos.add(repo)
  File "/usr/lib/python3.6/site-packages/dnf/repodict.py", line 40, in add
    msg = repo._valid()
  File "/usr/lib/python3.6/site-packages/dnf/repo.py", line 967, in _valid
    if len(self.baseurl) == 0 and not self.metalink and not self.mirrorlist:
TypeError: object of type 'NoneType' has no len()

Expected results: 

normal command execution

Additional info:

Comment 1 Peter Robinson 2017-07-14 13:02:38 UTC
Why are you putting RHEL repo files in Fedora.

The releasever will be interpreted as 26 to start:
https://cdn.redhat.com/content/dist/rhel/server/7/$releasever/$basearch/os

And you'd need to make sure all the certs etc are in place for entitlements.


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