Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to obtain a list of all installed packages with version
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
thermoman
n00b
n00b


Joined: 18 Aug 2004
Posts: 28

PostPosted: Tue Mar 22, 2005 3:05 pm    Post subject: How to obtain a list of all installed packages with version Reply with quote

Hi,

i'm having a bunch of gentoo boxes here under my hands and now i want to code a script which collects version information of all installed packages on all boxes and generates a nice overview out of this data.

So what i'm asking for is how to obtain a list of installed packages including version information?

Code:
qpkg


is deprecated and only gives me a list of installed packages, no version information.

Code:
equery


don't even produces a list of installed packages.

Getting the infos out of /var/lib/foo (or where portage stores it's installed packages database) is not an option since this could easily be broken due to an update of portage.

If someone could point me in the right direction :)

Thanks in advance,
thermoman
Back to top
View user's profile Send private message
mascanho
Veteran
Veteran


Joined: 21 Dec 2004
Posts: 1241
Location: On my Bmx Bike on a Concrete Park Flatlanding ...

PostPosted: Tue Mar 22, 2005 3:11 pm    Post subject: Reply with quote

Code:
emerge -ep world
?
_________________
Flatland Life is a Choice !
emerge avatar
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Tue Mar 22, 2005 3:13 pm    Post subject: Reply with quote

Perhaps you could use
Code:
emerge -peD world
Back to top
View user's profile Send private message
dmitchell
Veteran
Veteran


Joined: 17 May 2003
Posts: 1159
Location: Austin, Texas

PostPosted: Tue Mar 22, 2005 5:51 pm    Post subject: Re: How to obtain a list of all installed packages with vers Reply with quote

thermoman wrote:
qpkg is deprecated and only gives me a list of installed packages, no version information.

That's because you aren't using the -v flag. If you'd taken the time to read qpkg --help or man qpkg you would have known that.

Quote:
equery don't even produces a list of installed packages.

That's because you didn't type equery list. Again, if you'd taken the time to read equery --help or man equery you would have known that.
_________________
Your argument is invalid.
Back to top
View user's profile Send private message
hjnenc
Veteran
Veteran


Joined: 15 Aug 2004
Posts: 1599
Location: Vienna, Austria

PostPosted: Tue Mar 22, 2005 6:59 pm    Post subject: Reply with quote

This question has been discussed that often, that it even has its own FAQ posting GF3
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Tue Mar 22, 2005 7:01 pm    Post subject: Re: How to obtain a list of all installed packages with vers Reply with quote

danmitchell wrote:
thermoman wrote:
qpkg is deprecated and only gives me a list of installed packages, no version information.

That's because you aren't using the -v flag. If you'd taken the time to read qpkg --help or man qpkg you would have known that.

Quote:
equery don't even produces a list of installed packages.

That's because you didn't type equery list. Again, if you'd taken the time to read equery --help or man equery you would have known that.


The -v option for qpkg specifies (from man qpkg)
Quote:
Be more verbose [2 levels]

This is no indication that it would cause qpkg to print the package version. It could just as likely mean that it would print in more detail what the qpkg command is doing, as this is the kind of behavior -v provides for the tar, rsync, etc commands.

The list command for equery by no means indicates that it will produce a list of ALL packages installed, instead it says
Quote:
list <local-opts> pkgspec
This command lists packages matching pkgspec ...

Indicating that pkgspec is required, i.e. you have to ask about a specific package, whereas thermoman is asking how to obtain the list of packages that are installed. At least that is how I took his post. The equery man page does not indicate the pkgspec is optional, in fact it says it is mandatory.
Quote:
The 'command' is the only mandatory option to equery. Most commands require a 'pkgspec' option, which is described by <cat/>packagename<-version>; namely, the package name is mandatory, while the category and version are optional.



hjnenc wrote:
This question has been discussed that often, that it even has its own FAQ posting GF3

Which indicates the man page and the help page are poorly written and/or is not clear in the meaning and usage of its options.
Back to top
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Tue Mar 22, 2005 7:29 pm    Post subject: Reply with quote

You're pushing it. The man pages are not that bad, especially if you read them in full (hint: examples and NOTES sections for qpkg).
And you should have searched the FAQ - that's what it's there for.

If you're not happy about the doc/man/whatever, please submit improvements to bugs.gentoo.org
That's how things evolve, with people contributing, not with people complaining.
Back to top
View user's profile Send private message
jdgill0
Veteran
Veteran


Joined: 25 Mar 2003
Posts: 1366
Location: Lexington, Ky -- USA

PostPosted: Tue Mar 22, 2005 7:46 pm    Post subject: Reply with quote

mseigneurin wrote:
You're pushing it. The man pages are not that bad, especially if you read them in full (hint: examples and NOTES sections for qpkg).
And you should have searched the FAQ - that's what it's there for.

If you're not happy about the doc/man/whatever, please submit improvements to bugs.gentoo.org
That's how things evolve, with people contributing, not with people complaining.


I was not meaning to "push". I was just rebutting what was posted earlier that the man pages made it so obvious as to how to use the qpkg and equery commands to obtain a list of installed packages. I looked at those man pages myself, and I don't see that they do make it clear. I do agree full heartedly that people should read man pages, the FAQ, etc prior to asking for help. I am not personally complaining about the man pages for equery and qpkg, just that they don't explain things as clearly as they were proclaimed to do in the previous post.

Before someone jumps on another person about what they should have done, the person doing the accusing should make sure their own information is accurate and true. In this case, I believe the person asking the question likely read the man pages, and like myself likely concluded it would not do what he was asking it to do.

I mean no ill will and let it go at this. If I am wrong I apologize.
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4923
Location: Gothenburg, Sweden

PostPosted: Tue Mar 22, 2005 8:03 pm    Post subject: Reply with quote

hjnenc wrote:
This question has been discussed that often, that it even has its own FAQ posting GF3

Moved from Portage & Programming.
_________________
Please read our FAQ Forum, it answers many of your questions.
irc: #gentoo-forums on irc.freenode.net
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads 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