[yum-cvs] yum/yum __init__.py, 1.267, 1.268 repos.py, 1.103, 1.104 sqlitesack.py, 1.54, 1.55 yumRepo.py, 1.28, 1.29

Seth Vidal skvidal at linux.duke.edu
Mon Jan 22 04:33:24 UTC 2007


Update of /home/groups/yum/cvs/yum/yum
In directory login1.linux.duke.edu:/tmp/cvs-serv27399/yum

Modified Files:
	__init__.py repos.py sqlitesack.py yumRepo.py 
Log Message:

- change out 'with' option to populate() closing rh bug 223650
- add gpl headed to yumRepo.py


Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.267
retrieving revision 1.268
diff -u -r1.267 -r1.268
--- __init__.py	21 Jan 2007 20:23:30 -0000	1.267
+++ __init__.py	22 Jan 2007 04:33:22 -0000	1.268
@@ -432,7 +432,7 @@
         if necessary:
             msg = 'Importing additional filelist information'
             self.verbose_logger.log(logginglevels.INFO_2, msg)
-            self.repos.populateSack(with='filelists')
+            self.repos.populateSack(mdtype='filelists')
            
     def buildTransaction(self):
         """go through the packages in the transaction set, find them in the

Index: repos.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/repos.py,v
retrieving revision 1.103
retrieving revision 1.104
diff -u -r1.103 -r1.104
--- repos.py	19 Dec 2006 03:43:31 -0000	1.103
+++ repos.py	22 Jan 2007 04:33:22 -0000	1.104
@@ -166,10 +166,10 @@
         return self.pkgSack
 
 
-    def populateSack(self, which='enabled', with='metadata', callback=None, cacheonly=0):
+    def populateSack(self, which='enabled', mdtype='metadata', callback=None, cacheonly=0):
         """This populates the package sack from the repositories, two optional 
            arguments: which='repoid, enabled, all'
-                      with='metadata, filelists, otherdata, all'"""
+                      mdtype='metadata, filelists, otherdata, all'"""
 
         if not callback:
             callback = self.callback
@@ -190,14 +190,14 @@
                 repobj = self.getRepo(which)
                 myrepos.append(repobj)
 
-        if with == 'all':
+        if mdtype == 'all':
             data = ['metadata', 'filelists', 'otherdata']
         else:
-            data = [ with ]
+            data = [ mdtype ]
          
         for repo in myrepos:
             sack = repo.getPackageSack()
-            sack.populate(repo, with, callback, cacheonly)
+            sack.populate(repo, mdtype, callback, cacheonly)
             self.pkgSack.addSack(repo.id, sack)
 
 

Index: sqlitesack.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/sqlitesack.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -r1.54 -r1.55
--- sqlitesack.py	15 Dec 2006 14:40:55 -0000	1.54
+++ sqlitesack.py	22 Jan 2007 04:33:22 -0000	1.55
@@ -90,7 +90,7 @@
         result = {}
         self.files = result        
         #FIXME - this should be try, excepting
-        self.sack.populate(self.repo, with='filelists')
+        self.sack.populate(self.repo, mdtype='filelists')
         cache = self.sack.filelistsdb[self.repo]
         cur = cache.cursor()
         executeSQL(cur, "select filelist.dirname as dirname, "
@@ -117,7 +117,7 @@
         if not self._changelog:
             if not self.sack.otherdb.has_key(self.repo):
                 try:
-                    self.sack.populate(self.repo, with='otherdata')
+                    self.sack.populate(self.repo, mdtype='otherdata')
                 except Errors.RepoError:
                     self._changelog = result
                     return

Index: yumRepo.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/yumRepo.py,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- yumRepo.py	1 Dec 2006 02:46:20 -0000	1.28
+++ yumRepo.py	22 Jan 2007 04:33:22 -0000	1.29
@@ -1,3 +1,17 @@
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Library General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+# Copyright 2005 Duke University 
 import os
 import re
 import time
@@ -67,11 +81,11 @@
             # umm, wtf?
             pass
 
-    def populate(self, repo, with='metadata', callback=None, cacheonly=0):
-        if with == 'all':
+    def populate(self, repo, mdtype='metadata', callback=None, cacheonly=0):
+        if mdtype == 'all':
             data = ['metadata', 'filelists', 'otherdata']
         else:
-            data = [ with ]
+            data = [ mdtype ]
 
         if not hasattr(repo, 'cacheHandler'):
             repo.cacheHandler = repo.storage.GetCacheHandler(




More information about the Yum-cvs-commits mailing list