Bug 1663088 - DNF API no longer accepts repo IDs with spaces in them
Summary: DNF API no longer accepts repo IDs with spaces in them
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 29
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-03 06:00 UTC by sylzr
Modified: 2019-01-04 20:53 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-01-04 20:53:22 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description sylzr 2019-01-03 06:00:37 UTC
Description of problem:
livecd-creator fail when the rpmfusion repo is added to kickstart file, this just happen in Fedora 29, the same process work fine in F28. If i quit the rpmfusion repo from kickstart, livecd-tools work fine, but this issue not happen in F28.

* Note- F29 updated with testing repo enabled


Version-Release number of selected component (if applicable):
livecd-tools-26.1-1.fc29.x86_64 ( version 25.x also fail )

How reproducible:
Create a kickstart file and add RMPFusion repository, in my case I've added centos repository and RPMFusion repo.

Steps to Reproduce:
1. create a kickstart file for minimal install
2. add centos repo and rpmfusion to kickstart
3. run sudo livecd-creator --verbose --config=*.ks --fslabel=test --cache=/home/$USER/example

Additional info:

[sylzr@localhost ks]$ sudo livecd-creator --verbose --config=centos-mate-base.ks --fslabel=test --cache=/home/$USER/cache
[sudo] password for sylzr: 
Using title 'Test' and product 'Test'
/usr/lib/python3.7/site-packages/pykickstart/commands/repo.py:267: KickstartParseWarning: A repo with the name Base has already been defined.
  warnings.warn(_("A repo with the name %s has already been defined.") % rd.name, KickstartParseWarning)
/usr/lib/python3.7/site-packages/pykickstart/commands/repo.py:267: KickstartParseWarning: A repo with the name Updates has already been defined.
  warnings.warn(_("A repo with the name %s has already been defined.") % rd.name, KickstartParseWarning)
/usr/lib/python3.7/site-packages/pykickstart/commands/repo.py:267: KickstartParseWarning: A repo with the name EPEL has already been defined.
  warnings.warn(_("A repo with the name %s has already been defined.") % rd.name, KickstartParseWarning)
/usr/lib/python3.7/site-packages/pykickstart/commands/repo.py:267: KickstartParseWarning: A repo with the name RPMFusion Free has already been defined.
  warnings.warn(_("A repo with the name %s has already been defined.") % rd.name, KickstartParseWarning)
/usr/lib/python3.7/site-packages/pykickstart/commands/repo.py:267: KickstartParseWarning: A repo with the name RPMFusion Non-Free has already been defined.
  warnings.warn(_("A repo with the name %s has already been defined.") % rd.name, KickstartParseWarning)
Overriding already specified repo Base
Overriding already specified repo Updates
Overriding already specified repo EPEL
Overriding already specified repo RPMFusion Free
Overriding already specified repo RPMFusion Non-Free
Extending sparse file /var/tmp/imgcreate-q1xzfqar/tmp-rn_p3fqm/ext3fs.img to 5368709120
Losetup add /dev/loop0 mapping to /var/tmp/imgcreate-q1xzfqar/tmp-rn_p3fqm/ext3fs.img
Formating ext4 filesystem on /dev/loop0
Formating args: ['mkfs.ext4', '-F', '-L', '_test', '-m', '1', '-b', '4096', '/dev/loop0']
Tuning filesystem on /dev/loop0
Mounting /dev/loop0 at /var/tmp/imgcreate-q1xzfqar/install_root
Overriding already specified repo Base
Overriding already specified repo Updates
Overriding already specified repo EPEL
Overriding already specified repo RPMFusion Free
Overriding already specified repo RPMFusion Non-Free
Unmounting directory /var/tmp/imgcreate-q1xzfqar/install_root
Losetup remove /dev/loop0
Traceback (most recent call last):
  File "/usr/bin/livecd-creator", line 258, in <module>
    sys.exit(main())
  File "/usr/bin/livecd-creator", line 228, in main
    creator.install()
  File "/usr/lib/python3.7/site-packages/imgcreate/creator.py", line 702, in install
    yr = dbo.addRepository(name, baseurl, mirrorlist)
  File "/usr/lib/python3.7/site-packages/imgcreate/dnfinst.py", line 179, in addRepository
    repo = dnf.repo.Repo(name, parent_conf = self.conf)
  File "/usr/lib/python3.7/site-packages/dnf/repo.py", line 428, in __init__
    self._repo = libdnf.repo.Repo(name, self._config)
  File "/usr/lib64/python3.7/site-packages/libdnf/repo.py", line 595, in __init__
    this = _repo.new_Repo(id, config)
RuntimeError: Bad id for repo: RPMFusion Free, byte =   9

Comment 1 Neal Gompa 2019-01-04 04:23:53 UTC
This is an issue with the DNF API for accepting repo IDs with spaces in them.

Comment 2 sylzr 2019-01-04 20:53:22 UTC
(In reply to Neal Gompa from comment #1)
> This is an issue with the DNF API for accepting repo IDs with spaces in them.

Thanks for the answer Neal, I've edit the kickstart and it worked :)


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