Gentoo Archives: gentoo-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] getting installed packages list (portage api)
Date: Sat, 21 Feb 2004 14:24:49
Message-Id: 200402212322.55357.jstubbs@gentoo.org
In Reply to: [gentoo-dev] getting installed packages list (portage api) by Meir Kriheli
1 On Saturday 21 February 2004 10:46, Meir Kriheli wrote:
2 > Hi,
3 >
4 > I looked over the API, and couldn't come with one. Is there a way to get
5 > the list of emerged packages through portage's API, or should I go
6 > over /var/db/pkg ?
7
8 Never actually tried it before, but of the top of my head:
9
10 db["/"]["vartree"].db.cpv_all() should return a list of "cat/pkg-ver"
11 db["/"]["vartree"].db.cp_all() should return a list of "cat/pkg"
12
13 Regards,
14 Jason Stubbs
15
16 --
17 gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] getting installed packages list (portage api) Jason Stubbs <jstubbs@g.o>