Bug 1018284 - [rfe] [api] refactor check for valid id into separate function
[rfe] [api] refactor check for valid id into separate function
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
All All
low Severity unspecified
: ---
: ---
Assigned To: Radek Holy
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-11 11:39 EDT by mulhern
Modified: 2014-01-04 14:52 EST (History)
8 users (show)

See Also:
Fixed In Version: dnf-0.4.10-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-01-04 14:52:56 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description mulhern 2013-10-11 11:39:21 EDT
Description of problem:

Some clients of yum generate their own .repo files. Yum has certain requirements for the format of the .repo files, in particular, for the format of the section name in a .repo file.

If the check for correct id format were exposed in a separate method the client code could call the method to verify correctness while writing the .repo file.

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


How reproducible:


Steps to Reproduce:

Actual results:

Expected results:

Additional info:

It might be helpful to expose the whole chunk of code in getReposFromConfig that checks for proper format of a .repo file in a separate method so that a client could immediately read and verify the file after having written it and manage errors appropriately.
Comment 1 mulhern 2013-10-11 16:38:01 EDT
it would be best if the code that checks the format were factored out of the yum package, so that the user didn't have to load that package in order to verify that the repo files they were constructing were correctly formatted. (The client code probably wants to avoid the side-effects of loading the yum package when generating a .repo file).
Comment 2 Jan Zeleny 2013-10-15 04:13:01 EDT
I'm reassigning this to dnf, this has a bigger priority there, as we are in a process of defining dnf's API. This will not have a priority in yum itself, maybe as a backport from dnf.
Comment 3 Ales Kozumplik 2013-10-15 04:19:28 EDT
Hi there, thanks for the report. We'll try to provide the requested function when we define the API. Leaving this a low prio thing until then.
Comment 4 Ales Kozumplik 2013-12-04 08:06:50 EST
Radek, please add a function like that to dnf.utils and document it as an API call.
Comment 5 Radek Holy 2013-12-20 04:14:16 EST
The function called "repo_id_invalid" added by b81bdf1654cfa4174a9629547d8a5e3bca2e9759 on master.
Comment 6 Fedora Update System 2014-01-02 05:09:34 EST
dnf-0.4.10-1.fc20 has been submitted as an update for Fedora 20.
Comment 7 Fedora Update System 2014-01-03 03:41:17 EST
Package dnf-0.4.10-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.10-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2014-01-04 14:52:56 EST
dnf-0.4.10-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

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