[yum-cvs] yum/yum __init__.py, 1.231, 1.232 depsolve.py, 1.88, 1.89 rpmsack.py, 1.12, 1.13

Seth Vidal skvidal at linux.duke.edu
Sun Aug 20 14:43:56 UTC 2006


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

Modified Files:
	__init__.py depsolve.py rpmsack.py 
Log Message:

more deprecation warnings added
more deprecation warnings fixed


Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.231
retrieving revision 1.232
diff -u -r1.231 -r1.232
--- __init__.py	20 Aug 2006 14:15:17 -0000	1.231
+++ __init__.py	20 Aug 2006 14:43:53 -0000	1.232
@@ -248,7 +248,8 @@
         
         if not self.localdbimported:
             self.verbose_logger.debug('Reading Local RPMDB')
-            self.rpmdb.addDB(self.read_ts)
+            self.rpmdb.ts = self.read_ts
+            self.rpmdb.buildIndexes()
             self.localdbimported = 1
 
     def closeRpmDB(self):

Index: depsolve.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/depsolve.py,v
retrieving revision 1.88
retrieving revision 1.89
diff -u -r1.88 -r1.89
--- depsolve.py	20 Aug 2006 14:23:22 -0000	1.88
+++ depsolve.py	20 Aug 2006 14:43:53 -0000	1.89
@@ -393,7 +393,6 @@
         # we must find out what provides/provided it from the rpmdb (if anything)
         # then check to see if that thing is being acted upon by the transaction set
         # if it is then we need to find out what is being done to it and act accordingly
-        rpmdbNames = self.rpmdb.getNamePkgList()
         needmode = None # mode in the transaction of the needed pkg (if any)
         needpo = None
         providers = []
@@ -403,7 +402,7 @@
             cheater_tup = self.cheaterlookup[(needname, needflags, needversion)]
             providers = [cheater_tup]
         
-        elif needname in rpmdbNames:
+        elif self.rpmdb.installed(name=needname):
             txmbrs = self.tsInfo.matchNaevr(name=needname)
             for txmbr in txmbrs:
                 providers.append(txmbr.pkgtup)
@@ -643,7 +642,7 @@
             
         # FIXME - why can't we look up in the transaction set for the requiringPkg
         # and know what needs it that way and provide a more sensible dep structure in the txmbr
-        if (best.name, best.arch) in self.rpmdb.getNameArchPkgList():
+        if self.rpmdb.installed(name=best.name, arch=best.arch):
             self.verbose_logger.debug('TSINFO: Marking %s as update for %s', best,
                 name)
             txmbr = self.tsInfo.addUpdate(best)

Index: rpmsack.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/rpmsack.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- rpmsack.py	20 Aug 2006 13:52:03 -0000	1.12
+++ rpmsack.py	20 Aug 2006 14:43:53 -0000	1.13
@@ -187,6 +187,7 @@
 
     def returnNewestByNameArch(self, naTup=None):
 
+        #FIXME - should this (or any packagesack) be returning tuples?
         if not naTup:
             return
         
@@ -335,8 +336,9 @@
         return hdrlist
 
     def getNameArchPkgList(self):
+        warnings.warn('getNameArchPkgList() will go away in a future version of Yum.\n',
+                DeprecationWarning)
     
-        #FIXME - emit deprecation notice    
         lst = []
         for (name, arch, epoch, ver, rel) in self.pkglists:
             lst.append((name, arch))
@@ -345,7 +347,9 @@
         
         
     def getNamePkgList(self):
-        #FIXME - emit deprecation notice
+        warnings.warn('getNamePkgList() will go away in a future version of Yum.\n',
+                DeprecationWarning)
+    
         lst = []
         for (name, arch, epoch, ver, rel) in self.pkglists:
             lst.append(name)
@@ -390,6 +394,9 @@
         return []
         
     def addDB(self, ts):
+        warnings.warn('addDB()() will go away in a future version of Yum.\n',
+                DeprecationWarning)
+    
         self.ts = ts
         self.buildIndexes()
 




More information about the Yum-cvs-commits mailing list