Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Portage features?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
mdpye
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2002
Posts: 102
Location: Nottingham, England

PostPosted: Sat May 04, 2002 12:14 pm    Post subject: Portage features? Reply with quote

I am looking to extract the following pieces of information from portage, either through existing commands or by rolling my own (in which case I need to know where the data is to be found).

1. What packages are installed on my system?
2. What are the dependancies for a particular package?

I wish to build something which will allow me to browse my installed packages (rather than "emerge search"ing each one). Once I have compiled a list of those I wish to remove I want to check which packages depend on them...

Thanks

MP
_________________
Cheers, MP
Back to top
View user's profile Send private message
AutoBot
l33t
l33t


Joined: 22 Apr 2002
Posts: 968
Location: Usually Out

PostPosted: Sat May 04, 2002 12:55 pm    Post subject: Reply with quote

You can emerge epm to find out what packages you have installed:

Code:

emerge epm
epm -qa

_________________
This message self destructed a long time ago.
Back to top
View user's profile Send private message
Nitro
Bodhisattva
Bodhisattva


Joined: 08 Apr 2002
Posts: 661
Location: San Francisco

PostPosted: Sat May 04, 2002 1:48 pm    Post subject: Reply with quote

Personally, I haven't used epm, I find that gentoolkit tells me everything I need to know.

mdpye wrote:
1. What packages are installed on my system?



Code:
#  emerge gentoolkit

#  qpkg -I
app-admin/gentoolkit-0.1.9 *
app-admin/gkrellm-1.2.11 *
app-admin/msyslog-1.08a-r1 *
app-arch/unzip-5.42-r1 *
....
app-arch/zip-2.3-r1 *
app-cdr/cdrtools-1.11.21 *

#  qpkg -I -i gentoolkit
app-admin/gentoolkit-0.1.9 *
        Collection of unofficial administration scripts for Gentoo [ http:// ]


Looks like someone forgot to set the HOMEPAGE variable in the ebuild on that one. ;)

mdpye wrote:
2. What are the dependancies for a particular package?

The best way to do this (as far as I know, other then looking at the ebuild) is to tell emerge to run with an --empty-tree. Example:
Code:

 # emerge -e gentoolkit -p

These are the packages that I would merge, in order.

Calculating dependencies ...done!
[ebuild  N   ] sys-libs/zlib-1.1.4 to /
[ebuild  N   ] dev-python/python-fchksum-1.6.1 to /
[ebuild  N   ] sys-libs/ncurses-5.2.20020112a-r1 to /
[ebuild  N   ] sys-libs/readline-4.1-r4 to /
[ebuild  N   ] sys-libs/db-1.85-r1 to /
[ebuild  N   ] sys-libs/db-3.2.3h-r4 to /
[ebuild  N   ] dev-lang/python-2.2-r7 to /
[ebuild  N   ] sys-apps/debianutils-1.16 to /
[ebuild  N   ] sys-apps/fileutils-4.1.8-r2 to /
[ebuild  N   ] sys-apps/portage-1.9.6-r1 to /
[ebuild  N   ] sys-apps/bash-2.05a-r2 to /
[ebuild  N   ] dev-util/dialog-0.7-r1 to /
[ebuild  N   ] sys-apps/groff-1.17.2-r1 to /
[ebuild  N   ] sys-libs/gdbm-1.8.0-r5 to /
[ebuild  N   ] sys-devel/perl-5.6.1-r3 to /
[ebuild  N   ] app-admin/gentoolkit-0.1.9 to /



That shows all the other packages required to statisfy the dependencies of gentoolkit. Note the -p for --pretend flag, we don't want to actually compile all these ;)

Gentoolkit also includes etc-update which is very handy for updating your config files.

Hope this helps.
_________________
- Kyle Manna

Please, please SEARCH before posting.

There are three kinds of people in the world: those who can count, and those who can't.


Last edited by Nitro on Thu May 09, 2002 1:39 am; edited 1 time in total
Back to top
View user's profile Send private message
steveD
Guest





PostPosted: Sat May 04, 2002 2:20 pm    Post subject: Reply with quote

All information related to installed packages on your machine is in this folder:
/var/db/pkg
It contains more information than any command may produce.
Back to top
AutoBot
l33t
l33t


Joined: 22 Apr 2002
Posts: 968
Location: Usually Out

PostPosted: Sat May 04, 2002 5:51 pm    Post subject: Reply with quote

Heh me and gentoolkit are finished for the time being....read my thread labeled:Horrid Gentoolkit *bug* = ?
_________________
This message self destructed a long time ago.
Back to top
View user's profile Send private message
mdpye
Tux's lil' helper
Tux's lil' helper


Joined: 18 Apr 2002
Posts: 102
Location: Nottingham, England

PostPosted: Sun May 05, 2002 11:50 am    Post subject: Reply with quote

steveD wrote:
All information related to installed packages on your machine is in this folder:
/var/db/pkg
It contains more information than any command may produce.


That's what I was looking for, thank you. I can now bust out x number of scripts to extract exactly what I want to know. :)
_________________
Cheers, MP
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum