diff options
author | Chris Lumens <clumens@redhat.com> | 2005-11-14 22:41:10 +0000 |
---|---|---|
committer | Chris Lumens <clumens@redhat.com> | 2005-11-14 22:41:10 +0000 |
commit | c2a7356f7fc6ed71964d8bb673e5af2978644ea9 (patch) | |
tree | c3c6438853fdaa5e30a28836b8405c5ebaa69329 /scripts | |
parent | 581d05bbf519205e21f1fabf8cc71af397ffa004 (diff) | |
download | anaconda-c2a7356f7fc6ed71964d8bb673e5af2978644ea9.tar.gz anaconda-c2a7356f7fc6ed71964d8bb673e5af2978644ea9.tar.xz anaconda-c2a7356f7fc6ed71964d8bb673e5af2978644ea9.zip |
Ensure globbed matches print only on first occurence
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/pkgorder | 8 |
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() |