[yum-commits] package-cleanup.py
Tim Lauridsen
timlau at osuosl.org
Thu Mar 5 15:51:03 UTC 2009
package-cleanup.py | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 299cabc2e04ab69982938ecb27e8559aa10a5454
Author: Tim Lauridsen <tim at naboo.local>
Date: Thu Mar 5 16:47:44 2009 +0100
make package-cleanup handle other kind of arch dupes (Ex. i386 & i586)
diff --git a/package-cleanup.py b/package-cleanup.py
index 5bdae12..f61f7ae 100755
--- a/package-cleanup.py
+++ b/package-cleanup.py
@@ -148,9 +148,14 @@ def findDupes(my):
# If all packages with the same name has the same arch, then it is a dupe
if len(archs) == 1:
refined[(n)] = pkgdict[(n)]
- # if there is more than one arch, then one must be 'noarch' to be a dupe.
- elif 'noarch' in archs:
- refined[(n)] = pkgdict[(n)]
+ else:
+ for a in archs: # All archs with same name
+ for ca in rpmUtils.arch.getArchList(a): # get the compatible arch
+ if ca == a:
+ continue
+ if ca in archs: # If another compatible is in the archs, then it is a dupe
+ refined[(n)] = pkgdict[(n)]
+
del pkgdict
More information about the Yum-commits
mailing list