prereposetup_hook() vs. checkEnabledRepo()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Yum mailing list
Yum@xxxxxxxxxxxxxxxxx
http://lists.baseurl.org/mailman/listinfo/yum


[Index of Archives]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux