[yum-cvs] yum/yum plugins.py,1.10,1.11

Menno Smits mjs at login.linux.duke.edu
Sat May 7 04:24:11 UTC 2005


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

Modified Files:
	plugins.py 
Log Message:
Allow plugins direct access to RepoStorage instance rather than try and mimic
it's API. This break backwards compat. API_VERSION is now 2.0.


Index: plugins.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/plugins.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- plugins.py	5 May 2005 10:35:19 -0000	1.10
+++ plugins.py	7 May 2005 04:24:08 -0000	1.11
@@ -88,7 +88,7 @@
 # API, the major version number must be incremented and the minor version number
 # reset to 0. If a change is made that doesn't break backwards compatibility,
 # then the minor number must be incremented.
-API_VERSION = '1.1'
+API_VERSION = '2.0'
 
 SLOTS = (
         'config', 'init', 
@@ -370,6 +370,13 @@
     def getConf(self):
         return self._base.conf
 
+    def getRepos(self):
+        '''Return Yum's container object for all configured repositories.
+
+        @return: Yum's RepoStorage instance
+        '''
+        return self._base.repos
+
 class RepoSetupPluginConduit(InitPluginConduit):
 
     def getCmdLine(self):
@@ -379,17 +386,6 @@
         '''
         return self._parent.cmdline
 
-    def getRepo(self, repoid):
-        '''Return a repository object by its id
-        '''
-        return self._base.repos.getRepo(repoid)
-
-    def getRepos(self, pattern='*'):
-        '''Return a list of repository objects using wildward patterns.
-        Default is to return all repositories.
-        '''
-        return self._base.repos.findRepos(pattern)
-
     def getRpmDB(self):
         '''Return a representation of local RPM database. This allows querying
         of installed packages.




More information about the Yum-cvs-commits mailing list