[yum-cvs] yum/yum __init__.py,1.87,1.88
Seth Vidal
skvidal at login.linux.duke.edu
Wed Mar 2 07:28:01 UTC 2005
Update of /home/groups/yum/cvs/yum/yum
In directory login:/tmp/cvs-serv18644/yum
Modified Files:
__init__.py
Log Message:
clean dbcache option for removing sqlite caches.
updated docs
Index: __init__.py
===================================================================
RCS file: /home/groups/yum/cvs/yum/yum/__init__.py,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- __init__.py 2 Mar 2005 06:19:59 -0000 1.87
+++ __init__.py 2 Mar 2005 07:27:59 -0000 1.88
@@ -701,6 +701,26 @@
msg = '%d cache files removed' % removed
return 0, [msg]
+ def cleanSqlite(self):
+ filelist = []
+ ext = 'sqlite'
+ removed = 0
+ for repo in self.repos.listEnabled():
+ repo.dirSetup()
+ path = repo.cachedir
+ filelist = misc.getFileList(path, ext, filelist)
+
+ for item in filelist:
+ try:
+ os.unlink(item)
+ except OSError, e:
+ self.errorlog(0, 'Cannot remove sqlite cache file %s' % item)
+ continue
+ else:
+ self.log(7, 'Cache file %s removed' % item)
+ removed+=1
+ msg = '%d cache files removed' % removed
+ return 0, [msg]
def cleanMetadata(self):
filelist = []
More information about the Yum-cvs-commits
mailing list