[Yum-devel] [PATCH] oddball case where rpm coughed up an EMPTY provides entry.
Seth Vidal
skvidal at fedoraproject.org
Thu May 13 16:10:13 UTC 2010
safe to skip them - also filed a bug with rpm to never let this happen
---
yum/packages.py | 2 ++
yum/sqlitesack.py | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/yum/packages.py b/yum/packages.py
index ac45518..0947c42 100644
--- a/yum/packages.py
+++ b/yum/packages.py
@@ -398,6 +398,8 @@ class RpmBase(object):
if printable:
results = []
for prco in prcos:
+ if not prco[0]: # empty or none or whatever, doesn't matter
+ continue
results.append(misc.prco_tuple_to_string(prco))
return results
diff --git a/yum/sqlitesack.py b/yum/sqlitesack.py
index 7873411..84607c6 100644
--- a/yum/sqlitesack.py
+++ b/yum/sqlitesack.py
@@ -388,6 +388,8 @@ class YumAvailablePackageSqlite(YumAvailablePackage, PackageObject, RpmBase):
cur = self._sql_MD('primary', sql, (self.pkgKey,))
self.prco[prcotype] = [ ]
for ob in cur:
+ if not ob['name']:
+ continue
prco_set = (_share_data(ob['name']), _share_data(ob['flags']),
(_share_data(ob['epoch']),
_share_data(ob['version']),
--
1.7.0.1
More information about the Yum-devel
mailing list