prereposetup_hook() vs. checkEnabledRepo()
Miroslav Suchý <[email protected]>
| Newsgroups | gmane.linux.rpm.yum |
|---|---|
| Organization | Red Hat, Registered Address: Red Hat Czech s.r.o., Purkynova 99/71, 612 45 Brno, Czech Republic, Registered in Brno under identification number CZ27690016 |
| Message-ID | <[email protected]> |
I have interested situation with yum-rhn-plugin:
In yum-rhn-plugin in init_hook we look for cached information of
channels and create dummy repos pointing to conduit.getConf().cachedir
In prereposetup_hook we connect to Spacewalk/Satellite and replace those
dummy repos with repos pointing to channels on Spacewalk/Satellite.
So far so good.
But when you have only rhnplugin and no other repo and you do:
rm -rf /var/cache/yum/*
yum update # or any other command
I get:
There are no enabled repos.
Run "yum repolist all" to see the repos you have.
This is because we have no cached repo (we deleted it, but same
situation will be just after kickstart) and the function
checkEnabledRepo() is called before prereposetup_hook.
My question is: what is semantics of prereposetup_hook? Is it intended
to setup the repo, or just to configure them?
In documentation is stated:
prereposetup
Called just before Yum initialises its repository information.
I tend to think that checkEnabledRepo() should be called *after*
prereposetup...
--
Miroslav Suchy
Red Hat Satellite Engineering