maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   List of installed packages per repository (https://talk.maemo.org/showthread.php?t=43009)

nex 2010-02-01 21:55

List of installed packages per repository
 
Hi,

Is there an easy way of figuring out which packages I have installed from a specific repository, say extras-testing?

I thought of getting a list of packages from that repository and checking against dkpg -l, but is there a simpler way?

Edit: the reason for this is to start removing extras-devel and -testing stuff one by one until I see what causes the degraded performance I see occaionally.

Rob1n 2010-02-02 09:01

Re: List of installed packages per repository
 
I'm not aware of an easier way, no. The originating repository doesn't appear to be stored in the metadata for the installed package.

rolfok 2010-03-03 12:09

Re: List of installed packages per repository
 
That's bad. In fact, apt-cache madison paketname does not work as expected.
Ubuntu:
# apt-cache madison agrep
apgrep ... multiverse/Packages

I hope that RPM (with Meego) will be implemented more complete than APT (with Maemo).

Rob1n 2010-03-03 12:16

Re: List of installed packages per repository
 
Quote:

Originally Posted by rolfok (Post 553768)
That's bad. In fact, apt-cache madison paketname does not work as expected.
Ubuntu:
# apt-cache madison agrep
apgrep ... multiverse/Packages

I hope that RPM (with Meego) will be implemented more complete than APT (with Maemo).

All that's telling you is what repository the package is currently in, which might differ from where it was when you installed. You can grep through the _Packages files in /var/lib/apt/lists to get this info.

kbeeveer46 2010-03-03 13:41

Re: List of installed packages per repository
 
I was just thinking about this feature the other day too. It'd be nice too have.

Rob1n 2010-03-03 14:04

Re: List of installed packages per repository
 
Quote:

Originally Posted by kbeeveer46 (Post 553904)
I was just thinking about this feature the other day too. It'd be nice too have.

Would you want to be able to look up what repository an individual package came from, or just list all the installed packages from a given repository?

cjsegninir 2010-03-03 14:27

Re: List of installed packages per repository
 
I think it would be nice to have a list of all the installed apps with their respective repositories. It could be useful for the issue Nex is having...

Rob1n 2010-03-03 14:30

Re: List of installed packages per repository
 
Quote:

Originally Posted by cjsegninir (Post 553992)
I think it would be nice to have a list of all the installed apps with their respective repositories. It could be useful for the issue Nex is having...

I'll look at knocking up a command-line script to do this then. Should be fairly straightforward.

Rob1n 2010-03-03 16:09

Re: List of installed packages per repository
 
Quote:

Originally Posted by Rob1n (Post 554000)
I'll look at knocking up a command-line script to do this then. Should be fairly straightforward.

And here it is. It's an standalone perl script and is invoked as follows to list all installed packages and the repository they came from:
Code:

perl package_sources.pl
You can also give it the name of a repository, in which case it will only list packages from that repository:
Code:

perl package_sources.pl Ovi
If it doesn't recognise the repository name (it should match those in App Manager) then it'll print out a list of the defined repositories.

Packages are listed using the package name and, where available, the display name. If the version installed cannot be found, then the version number found will be printed as well. If the package cannot be found in any repository then "Unknown" will be printed.

Let me know if you have any problems running this - it seems to work fine on my N900 but there may be unexpected issues on different firmware variants (I hope not - it should be pulling out the correct variant URL to use).

EDIT:
- Added documentation to zip file
- Added check for disabled repositories
- Added prioritisation of maemo.org repositories, so only the highest-priority match will be reported
- Moved script to my webspace: http://www.robinhill.me.uk/maemo/package_sources.html

kbeeveer46 2010-03-03 17:58

Re: List of installed packages per repository
 
I noticed you only have three repos in the list. The main reason I wanted something like this is to tell what I have installed from extras-devel. I'd hack the code myself (although I've never played with perl before) but I'm at work and don't have much time! haha

Another thing. Is it possible to output the results to a file? My list was so long that I couldn't scroll up high enough to see all of it (maybe I don't know enough about terminal)


All times are GMT. The time now is 08:16.

vBulletin® Version 3.8.8