[yum-commits] Branch 'yum-3_2_X' - yum/packageSack.py yum/rpmsack.py yum/sqlitesack.py

James Antill james at osuosl.org
Wed Aug 19 05:41:22 UTC 2009


 yum/packageSack.py |    4 +++-
 yum/rpmsack.py     |    3 +++
 yum/sqlitesack.py  |    7 ++++---
 3 files changed, 10 insertions(+), 4 deletions(-)

New commits:
commit d555cc80290e991922b6f68c92bc51a119dc61fe
Author: James Antill <james at and.org>
Date:   Mon Aug 17 23:09:41 2009 -0400

    Fix doc comments for returnPackages/simplePkgList, mainly patterns arg.

diff --git a/yum/packageSack.py b/yum/packageSack.py
index b71356a..cc90d5f 100644
--- a/yum/packageSack.py
+++ b/yum/packageSack.py
@@ -443,7 +443,9 @@ class MetaSack(PackageSackBase):
 
 
     def returnPackages(self, repoid=None, patterns=None, ignore_case=False):
-        """return list of all packages, takes optional repoid"""
+        """Returns a list of packages. Note that the packages are
+           always filtered to those matching the patterns/case. An optional
+           repoid allows you to easily get data for a specific repo. """
         if not repoid:
             return self._computeAggregateListResult("returnPackages",
                                                     None, patterns, ignore_case)
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index c3c7265..fbeb9b3 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -323,6 +323,9 @@ class RPMDBPackageSack(PackageSackBase):
         return False
 
     def returnPackages(self, repoid=None, patterns=None, ignore_case=False):
+        """Returns a list of packages. Note that the packages are
+           always filtered to those matching the patterns/case. repoid is
+           ignored, and is just here for compatibility with non-rpmdb sacks. """
         if not self._completely_loaded:
             rpats = self._compile_patterns(patterns, ignore_case)
             for hdr, idx in self._all_packages():
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index 3f9dc37..5b75cf5 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -1540,8 +1540,8 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
                 
     def returnPackages(self, repoid=None, patterns=None, ignore_case=False):
         """Returns a list of packages, only containing nevra information. The
-           packages are processed for excludes. Note that patterns is just
-           a hint, we are free it ignore it. """
+           packages are processed for excludes. Note that the packages are
+           always filtered to those matching the patterns/case. """
 
         if self._skip_all():
             return []
@@ -1575,7 +1575,8 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
 
     def simplePkgList(self, patterns=None, ignore_case=False):
         """Returns a list of pkg tuples (n, a, e, v, r), optionally from a
-           single repoid. """
+           single repoid. Note that the packages are always filtered to those
+           matching the patterns/case. """
 
         if self._skip_all():
             return []


More information about the Yum-commits mailing list