Bug 237425

Summary: Yum doesn't read options set by plugins in repository configuration files
Product: [Fedora] Fedora Reporter: Jonathan Dieter <jonathan>
Component: yumAssignee: Jeremy Katz <katzj>
Status: CLOSED UPSTREAM QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bkearney
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-04-26 13:31:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 150226    

Description Jonathan Dieter 2007-04-22 17:29:52 UTC
Description of problem:
In fedora-development.repo, we have the line:
deltaurl=http://www.lesbg.com/jdieter/updates/development/$basearch

In the yum-presto plugin, there's the following code:
def config_hook(conduit):
    # Set up repository specific deltarpm url and mirrorlist
    config.RepoConf.deltaurl = config.UrlListOption()

Later, in postreposetup_hook, we try to access this configuration with:
    print repo.deltaurl
where repo is an active repository (we actually loop through all of them).

The result:
None for all active repositories (including development)

Version-Release number of selected component (if applicable):
yum-3.1.6-2.fc7

How reproducible:
Always

Comment 1 Jonathan Dieter 2007-04-23 03:53:45 UTC
I suspect this is related to
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236512.  I would guess that
the configuration options aren't getting set before postreposetup_hook (along
with the rest of the repository information).

Comment 2 Jeremy Katz 2007-04-26 01:59:15 UTC
James -- this is due to some of the metaclass magic... we only set up the
options that get looked at for the config objects when the classes are created
as opposed to letting plugins add options to the classes before they're
instantiated.



Comment 3 James Bowes 2007-04-26 13:31:21 UTC
I've reverted the metaclass changes to the config module, so everything will be
as once it was.