[yum-commits] Branch 'yum-3_2_X' - 2 commits - output.py yum/rpmsack.py
James Antill
james at osuosl.org
Sat Oct 17 18:34:07 UTC 2009
output.py | 5 ++++-
yum/rpmsack.py | 4 ++--
2 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 1b959b0c2fa30dcd345dfe0449fd0c025a52ac67
Author: James Antill <james at and.org>
Date: Fri Oct 16 17:26:11 2009 -0400
Use yumdb_info.from_repo in listTransaction for removes
diff --git a/output.py b/output.py
index e462646..996b89a 100755
--- a/output.py
+++ b/output.py
@@ -912,7 +912,10 @@ class YumOutput:
def _add_line(lines, data, a_wid, po, obsoletes=[]):
(n,a,e,v,r) = po.pkgtup
evr = po.printVer()
- repoid = po.repoid
+ if po.repoid == 'installed' and 'from_repo' in po.yumdb_info:
+ repoid = "@%s" % po.yumdb_info.from_repo
+ else:
+ repoid = po.repoid
pkgsize = float(po.size)
size = self.format_number(pkgsize)
commit a24eddf50ff217322eba269f6b2113992dca6427
Author: James Antill <james at and.org>
Date: Thu Oct 15 13:35:17 2009 -0400
Minor speedup in rpmdb._search().
Don't compare name, because we've already done it if it's not None.
Reorder the rest of the pkgtup comparison to fail quicker.
diff --git a/yum/rpmsack.py b/yum/rpmsack.py
index 1c7e8f1..743538d 100644
--- a/yum/rpmsack.py
+++ b/yum/rpmsack.py
@@ -475,7 +475,7 @@ class RPMDBPackageSack(PackageSackBase):
else:
pkgs = self.returnPkgs()
for po in pkgs:
- for tag in ('name', 'epoch', 'ver', 'rel', 'arch'):
+ for tag in ('arch', 'rel', 'ver', 'epoch'):
if loc[tag] is not None and loc[tag] != getattr(po, tag):
break
else:
@@ -493,7 +493,7 @@ class RPMDBPackageSack(PackageSackBase):
for hdr in mi:
po = self._makePackageObject(hdr, mi.instance())
- for tag in ('name', 'epoch', 'ver', 'rel', 'arch'):
+ for tag in ('arch', 'rel', 'ver', 'epoch'):
if loc[tag] is not None and loc[tag] != getattr(po, tag):
break
else:
More information about the Yum-commits
mailing list