summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2005-11-14 22:41:10 +0000
committerChris Lumens <clumens@redhat.com>2005-11-14 22:41:10 +0000
commitc2a7356f7fc6ed71964d8bb673e5af2978644ea9 (patch)
treec3c6438853fdaa5e30a28836b8405c5ebaa69329 /scripts
parent581d05bbf519205e21f1fabf8cc71af397ffa004 (diff)
downloadanaconda-c2a7356f7fc6ed71964d8bb673e5af2978644ea9.tar.gz
anaconda-c2a7356f7fc6ed71964d8bb673e5af2978644ea9.tar.xz
anaconda-c2a7356f7fc6ed71964d8bb673e5af2978644ea9.zip
Ensure globbed matches print only on first occurence
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/pkgorder8
1 files changed, 7 insertions, 1 deletions
diff --git a/scripts/pkgorder b/scripts/pkgorder
index 0db50cb38..ce54d2c19 100755
--- a/scripts/pkgorder
+++ b/scripts/pkgorder
@@ -164,13 +164,19 @@ class YumSorter(yum.YumBase):
self.doGroupSetup()
self.repos.populateSack(with='filelists')
+#XXX: sigh
+processed = {}
def printMatchingPkgs(ds):
+ global processed
for pkgtup in ds.tsInfo.sort():
fname = ds.tsInfo.pkgdict[pkgtup][0].po.returnSimple('relativepath')
fpattern = "%s/%s*" % (toppath, fname.rsplit('.', 2)[0])
matches = glob.glob(fpattern)
for match in matches:
- print os.path.basename(match)
+ mname = os.path.basename(match)
+ if processed.has_key(mname): continue
+ processed[mname] = True
+ print mname
def addGroups(ds, groupLst):
ds.initActionTs()