This service will be undergoing non-disruptive maintenance at 07:20 UTC, 2018-12-14. It is expected to last approximately 30 minutes
Bug 1018284 - [rfe] [api] refactor check for valid id into separate function
Summary: [rfe] [api] refactor check for valid id into separate function
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
(Show other bugs)
Version: rawhide
Hardware: All All
low
unspecified
Target Milestone: ---
Assignee: Radek Holy
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-11 15:39 UTC by mulhern
Modified: 2014-01-04 19:52 UTC (History)
8 users (show)

Fixed In Version: dnf-0.4.10-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-04 19:52:56 UTC
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Bugzilla 985103 None None None Never

Description mulhern 2013-10-11 15:39:21 UTC
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):

3.4.3

How reproducible:

N/A

Steps to Reproduce:
N/A

Actual results:
N/A

Expected results:
N/A

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 20:38:01 UTC
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 08:13:01 UTC
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 08:19:28 UTC
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 13:06:50 UTC
Radek, please add a function like that to dnf.utils and document it as an API call.

Comment 5 Radek Holy 2013-12-20 09:14:16 UTC
The function called "repo_id_invalid" added by b81bdf1654cfa4174a9629547d8a5e3bca2e9759 on master.

Comment 6 Fedora Update System 2014-01-02 10:09:34 UTC
dnf-0.4.10-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.10-1.fc20

Comment 7 Fedora Update System 2014-01-03 08:41:17 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2014-0089/dnf-0.4.10-1.fc20
then log in and leave karma (feedback).

Comment 8 Fedora Update System 2014-01-04 19:52:56 UTC
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.