[yum-cvs] yum-utils repoquery.py,1.33,1.34

Panu Matilainen pmatilai at linux.duke.edu
Thu Jun 29 09:54:14 UTC 2006


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

Modified Files:
	repoquery.py 
Log Message:
- add files() method to querypkg, use it for fmt_list()
- with --alldeps, look through files as well for depending packages


Index: repoquery.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/repoquery.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- repoquery.py	13 Jun 2006 15:23:28 -0000	1.33
+++ repoquery.py	29 Jun 2006 09:54:12 -0000	1.34
@@ -166,6 +166,9 @@
     def fmt_obsoletes(self, **kw):
         return "\n".join(self.prco('obsoletes'))
 
+    def fmt_list(self, **kw):
+        return "\n".join(self.files())
+
 class repoPkgQuery(pkgQuery):
     def __init__(self, pkg, qf):
         pkgQuery.__init__(self, pkg, qf)
@@ -183,7 +186,7 @@
         rplist.sort()
         return rplist
 
-    def fmt_list(self, **kw):
+    def files(self, **kw):
         fdict = {}
         for ftype in self.pkg.returnFileTypes():
             for file in self.pkg.returnFileEntries(ftype):
@@ -192,7 +195,7 @@
                 fdict[os.path.normpath('//%s' % file)] = None
         files = fdict.keys()
         files.sort()
-        return "\n".join(files)
+        return files
 
     def fmt_changelog(self, **kw):
         changelog = []
@@ -235,8 +238,8 @@
         prcolist.sort()
         return prcolist
     
-    def fmt_list(self, **kw):
-        return "\n".join(self.pkg.tagByName('filenames'))
+    def files(self, **kw):
+        return self.pkg.tagByName('filenames')
 
     def fmt_changelog(self, **kw):
         changelog = []
@@ -424,6 +427,7 @@
         if self.options.alldeps:
             for pkg in self.returnByName(name):
                 provs.extend(pkg.prco("provides"))
+                provs.extend(pkg.files())
 
         for prov in provs:
             # Only look at the providing name, not the whole version. This 
@@ -584,6 +588,8 @@
         if not opts.group:
             needfiles = 1
         pkgops.append("list")
+    if opts.alldeps:
+        needfiles = 1
     if opts.info:
         pkgops.append("info")
     if opts.envra:




More information about the Yum-cvs-commits mailing list