[yum-cvs] yum-utils repomanage.py,1.3,1.4
Seth Vidal
skvidal at login.linux.duke.edu
Wed Oct 19 05:46:43 UTC 2005
Update of /home/groups/yum/cvs/yum-utils
In directory login:/tmp/cvs-serv31915
Modified Files:
repomanage.py
Log Message:
fix repomanage so it won't output multiples of the same entry
Index: repomanage.py
===================================================================
RCS file: /home/groups/yum/cvs/yum-utils/repomanage.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- repomanage.py 13 Oct 2005 14:53:40 -0000 1.3
+++ repomanage.py 19 Oct 2005 05:46:41 -0000 1.4
@@ -27,7 +27,7 @@
import types
import string
import getopt
-
+from yum import misc
from exceptions import Exception
@@ -245,6 +245,7 @@
for natup in pkgdict.keys():
evrlist = pkgdict[natup]
if len(evrlist) > 1:
+ evrlist = misc.unique(evrlist)
evrlist.sort(sortByEVR)
pkgdict[natup] = evrlist
@@ -255,13 +256,13 @@
outputpackages = []
if options['output'] == 'new':
for (n,a) in pkgdict.keys():
-
-
evrlist = pkgdict[(n,a)]
+
if len(evrlist) < abs(keepnum):
newevrs = evrlist
else:
newevrs = evrlist[keepnum:]
+
for (e,v,r) in newevrs:
for pkg in verfile[(n,a,e,v,r)]:
outputpackages.append(pkg)
@@ -269,6 +270,7 @@
if options['output'] == 'old':
for (n,a) in pkgdict.keys():
evrlist = pkgdict[(n,a)]
+
if len(evrlist) < abs(keepnum):
continue
More information about the Yum-cvs-commits
mailing list