aboutsummaryrefslogtreecommitdiff
blob: 0b6e9ec34bdeb2646751900d9e887a91edf484ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/python

import portage

allpkgs=portage.db["/"]["porttree"].dbapi.cp_all()
bestpkgs={}
mycount=0

for x in allpkgs:
	if x not in list(bestpkgs.keys()):
		y=portage.db["/"]["porttree"].dbapi.xmatch("bestmatch-visible", x)
		bestpkgs[x]=y
		if y=="":
			continue
		xs=portage.pkgsplit(bestpkgs[x])
		print('%s %s %s' % (xs[0].split("/")[1], xs[1], bestpkgs[x]))
		mycount+=1