finding out package installation status/deps through api?
Hello everybody!
I have been unable to find anything through google (though most likely just because I don't know what to search for), so... is there any kind of API I could use to get info about installed packages on the system? I want to build a package tree dynamically based on user input, so just querying dpkg a lot of times is kinda out of the question. So, where do I best start looking? I know that I could just read the code for debfoster (since it does this too and is quite short), but I rather wouldn't... there's exactly 10 words of comments for 500 lines of code in one relevant source file that I looked at, which is not exactly encouraging ;) Thanks a lot in advance for any directions, greets, -grayFalcon |
I am assuming by API you mean gui..graphical?
if so try Debian Package Search Code:
apt-get install packagesearch |
Uh... no, actually by API I mean "Application Programming Interface". What I'm looking for is a library that would allow me to do what I described from C (or python, or perl... I don't really care as long as it's not Java ;) ).
Greets, -grayFalcon |
Solved, kinda
Ech, well, I just mustered up the courage and delved into the debfoster code... and lo and behold, it was not as bad as I had anticipated.
In short, it reads all the information from /var/lib/dpkg/status. Not exactly what I had hoped for, but it does contain all the information I need I guess. Greets, -grayFalcon |
All times are GMT -5. The time now is 03:14 PM. |