[yum-cvs] yum/yum __init__.py,1.105,1.106 plugins.py,1.4,1.5

Menno Smits mjs at login.linux.duke.edu
Sun Mar 27 07:58:55 UTC 2005


Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv13633/yum

Modified Files:
	__init__.py plugins.py 
Log Message:
- modified doRepoSetup so that cli.py calls YumBase to do most of the work.
  This makes the code cleaner (less duplication) and means the call for the
  reposetup plugin hook is only in one place. 
- added call reposetup plugin hook


Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- __init__.py	27 Mar 2005 07:31:17 -0000	1.105
+++ __init__.py	27 Mar 2005 07:58:53 -0000	1.106
@@ -173,10 +173,13 @@
         if hasattr(self, 'up'):
             del self.up
 
-    def doRepoSetup(self, nosack=None):
-        """grabs the repomd.xml for each enabled repository and sets up the basics
-           of the repository - stub"""
-           
+    def doRepoSetup(self):
+        """grabs the repomd.xml for each enabled repository and sets up the
+        basics of the repository - stub
+        """
+          
+        self.plugins.run('reposetup')
+
         for repo in self.repos.listEnabled():
             if repo.repoXML is not None and len(repo.urls) > 0:
                 continue
@@ -184,12 +187,13 @@
                 repo.cache = self.conf.getConfigOption('cache')
                 repo.baseurlSetup()
                 repo.dirSetup()
+                self.log(3, 'Baseurl(s) for repo: %s' % repo.urls)
             except Errors.RepoError, e:
                 self.errorlog(0, '%s' % e)
                 raise
                 
             try:
-                repo.getRepoXML()
+                repo.getRepoXML(text=repo)
             except Errors.RepoError, e:
                 self.errorlog(0, 'Cannot open/read repomd.xml file for repository: %s' % repo)
                 self.errorlog(0, str(e))

Index: plugins.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/plugins.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- plugins.py	27 Mar 2005 07:31:17 -0000	1.4
+++ plugins.py	27 Mar 2005 07:58:53 -0000	1.5
@@ -12,8 +12,6 @@
 # is created) mean that all output goes to stdout regardless of the log settings.
 #   - peek at debuglevel option? 
 
-# TODO: finish reposetup slot: where to call from?
-
 # TODO: better documentation of how the whole thing works (esp. addition of
 # config options)
 #       - document from user perspective in yum man page
@@ -27,14 +25,11 @@
 # TODO "log" slot? To allow plugins to do customised logging/history (say to a
 # SQL db)
 
-# TODO: method for plugins to retrieve running yum version (move __version__ to
-# yum/__init__.py?)
-
 # TODO: multiversion plugin support
 
 # TODO: cmd line options to disable plugins (all or specific)
 
-# TODO: cmdline/config option to specify additional plugin directories (plugin path)
+# TODO: cmdline option to override/specify additional plugin directories
 
 # TODO: config vars marked as PLUG_OPT_WHERE_ALL should inherit defaults from
 #   the [main] setting if the user doesn't specify them




More information about the Yum-cvs-commits mailing list