Bug 1471080 - dnf/yum error after placing .repo file in /etc/yum.repos.d
dnf/yum error after placing .repo file in /etc/yum.repos.d
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: fedora-repos (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dennis Gilmore
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-14 07:20 EDT by Pavel Niahodkin
Modified: 2017-07-14 09:02 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-07-14 09:02:38 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Pavel Niahodkin 2017-07-14 07:20:59 EDT
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 09:02:38 EDT
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.