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

James Antill james at osuosl.org
Thu Sep 10 19:16:20 UTC 2009


 yum/sqlitesack.py |   10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

New commits:
commit 22af13c693f1a41605358504c97953334e6c2ac5
Author: James Antill <james at and.org>
Date:   Thu Sep 10 15:04:27 2009 -0400

     Fix for py sql functions, doesn't like non-int return values.
    
      BZ#522032 for: provides /lib/security/pam_loginuid.so (RHEL-5 only)
      na/ for:       install '*bin/autoheader' (all versions)

diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index b6c14c5..3dd93a5 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -929,15 +929,19 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
             if file_glob:
                 name_re = re.compile(fnmatch.translate(name))
             def filelist_globber(sql_dirname, sql_filenames):
+                # Note: Can't return bool, because sqlite doesn't like it in
+                #       weird ways. Test:
+                #                         install '*bin/autoheader'
+                #                         provides /lib/security/pam_loginuid.so
                 files = sql_filenames.split('/')
                 if not file_glob:
-                    return filename in files
+                    return int(filename in files)
 
                 fns = map(lambda f: '%s/%s' % (sql_dirname, f), files)
                 for match in fns:
                     if name_re.match(match):
-                        return True
-                return False
+                        return 1
+                return 0
 
             cache.create_function("filelist_globber", 2, filelist_globber)
             # for all the ones where filenames is multiple files, 


More information about the Yum-commits mailing list