I have written a custom plugin which has different hooks of yum viz. config_hook, postreposetup_hook, exclude_hook, preresolve_hook etc... The problem is that sometimes the postreposetup and exclude hooks are not getting called on a new machine when the yum command is executed. I have also written another plugin with simple print statements in each hook and each hook in that plugin is getting called. I am not able to figure out what the problem is.
Below is the simple plugin that is working and unfortunately I cannot share the code of other plugin here but it connects to a server in postreposetup_hook and exclude_hook does the package exclusions. Any pointers will be really helpful.
import yum
from yum.plugins import PluginYumExit, TYPE_CORE, TYPE_INTERACTIVE
requires_api_version='2.3'
plugin_type=(TYPE_CORE)
def config_hook(conduit):
print 'In config'
def init_hook(conduit):
print 'In init'
def prereposetup_hook(conduit):
print 'In prereposetup'
def postreposetup_hook(conduit):
print 'In postreposetup'
def exclude_hook(conduit):
print 'In exclude'
def preresolve_hook(conduit):
print 'In preresolve'
def postresolve_hook(conduit):
print 'In postreposetup'