Reply
Thread Tools
Posts: 1,283 | Thanked: 370 times | Joined on Sep 2009 @ South Florida
#11
Originally Posted by Rob1n View Post
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).
Might want to include a short set of instructions in the zip file for future use without having to refer to this thread.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#12
Originally Posted by kbeeveer46 View Post
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)
There's no need to hack the code - all the other repositories are looked up from the hildon-application-manager config file. The only reason the three/four are hardcoded is that the config file doesn't contain URLs for the built-in repositories.

You can redirect the output to file by doing:
Code:
perl package_sources.pl > file.txt
 

The Following User Says Thank You to Rob1n For This Useful Post:
Posts: 113 | Thanked: 44 times | Joined on Feb 2010
#13
Thanks. It seems as though anything in extras-devel shows up as "Unknown" for me which is fine. I was just curious as to how many of my apps are from there since I can't tell when I download them. There are a lot! Haha
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#14
Originally Posted by kbeeveer46 View Post
Thanks. It seems as though anything in extras-devel shows up as "Unknown" for me which is fine. I was just curious as to how many of my apps are from there since I can't tell when I download them. There are a lot! Haha
Something's not working there then. Can you check what repositories it's finding (run "perl package_sources.pl test")? Can you also check whether all the repositories appear in /etc/hildon-application-manager/catalogues (the script's pulling out the uri and name fields).
 
Posts: 29 | Thanked: 23 times | Joined on Jan 2009 @ Macedonia
#15
It's working fine for me, I suspect kbeeveer46 doesn't have extras-devel enabled in the app manager.

I see lots of packages found with the same version number as the one I have installed in both extras-testing and extras-devel. It would be great if we only see them once in extras-testing, so we can filter them out with grep -v when looking for shady extras-devel packages.
So basically I want to show only those packages which are found only in extras-devel, and not in extras-testing or anywhere else. Can you think of any simple way to accomplish this?
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#16
Originally Posted by kovach View Post
It's working fine for me, I suspect kbeeveer46 doesn't have extras-devel enabled in the app manager.
Yeah, I figured that one out on the way in to work this morning. I've modified the script to check for disabled repositories (I'll upload it later when I've finished with some other changes/cleanups).

Originally Posted by kovach View Post
I see lots of packages found with the same version number as the one I have installed in both extras-testing and extras-devel. It would be great if we only see them once in extras-testing, so we can filter them out with grep -v when looking for shady extras-devel packages.
So basically I want to show only those packages which are found only in extras-devel, and not in extras-testing or anywhere else. Can you think of any simple way to accomplish this?
I'll have a look - if I hardcode in the URLs then I can define a priority order for repositories, and skip reporting if the version exists in a higher-priority repository.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#17
Okay, new script uploaded here.

It now checks for disabled repositories - if you're doing a full report then packages from disabled repositories are still marked as Unknown, but if you request a report of a disabled repository then it will return an error. It also reports disabled repositories separately when outputting the list of available repositories.

In addition, a priority list is now applied to the maemo.org repositories, so it should only report a package as coming from a single maemo.org repository (maemo.org, extras-testing, extras-devel). If the installed package has a version not found in any repository, all versions will still be reported (though again, only a single instance of each version).
 

The Following User Says Thank You to Rob1n For This Useful Post:
noobmonkey's Avatar
Posts: 3,203 | Thanked: 1,391 times | Joined on Nov 2009 @ Worthing, England
#18
hmmmmm i want to do a similar thing, but by using terminal commands or python, not perl.... if i ever figure it out, will post back here
__________________
----------- Follow me on Twitter here
----------- My Photography Website and Blog is here
----------- Author of the N900 Health Check Application ----------- New Version in Extras Devel (Dec 2010 - 2.9.10)
----------- Are you on the N900 World Map? - http://pininthemap.com/maemo - masterpin: shotgun
----------- What apps do you want to see on the n900 or in MeeGo in the future? -
 
Reply


 
Forum Jump


All times are GMT. The time now is 12:02.