[Yum-devel] [PATCH] Fix for https://bugzilla.redhat.com/show_bug.cgi?id=520810
Seth Vidal
skvidal at fedoraproject.org
Wed Sep 2 15:06:50 UTC 2009
just b/c it looks like a glob doesn't mean it IS a glob:
/usr/bin/[ is a legit file in coreutils but it looks (and acts)
just like a glob - so we need to do an ='s search even if it looks
like a glob. This makes me cranky.
---
yum/sqlitesack.py | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index b6c14c5..0b96c8a 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -836,7 +836,7 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
def _search_primary_files(self, name):
querytype = 'glob'
if not misc.re_glob(name):
- querytype = '='
+ querytype = '='
results = []
for (rep,cache) in self.primarydb.items():
@@ -846,6 +846,16 @@ class YumSqlitePackageSack(yumRepo.YumPackageSack):
executeSQL(cur, "select DISTINCT pkgKey from files where name %s ?" % querytype, (name,))
self._sql_pkgKey2po(rep, cur, results)
+ # https://bugzilla.redhat.com/show_bug.cgi?id=520810
+ # just b/c it looks like a glob doesn't mean it IS a glob:
+ # /usr/bin/[ is a legit file in coreutils but it looks (and acts)
+ # just like a glob - so we need to do an ='s search even if it looks
+ # like a glob. This makes me cranky.
+ if querytype == 'glob':
+ querytype = '='
+ executeSQL(cur, "select DISTINCT pkgKey from files where name %s ?" % querytype, (name,))
+ self._sql_pkgKey2po(rep, cur, results)
+
return misc.unique(results)
@catchSqliteException
--
1.6.2.5
More information about the Yum-devel
mailing list