LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices

Reply
 
Search this Thread
Old 04-24-2009, 01:35 AM   #1
grayFalcon
Member
 
Registered: Jan 2003
Distribution: Debian
Posts: 68

Rep: Reputation: 15
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
 
Old 04-24-2009, 07:21 AM   #2
aus9
Guru
 
Registered: Oct 2003
Posts: 5,056

Rep: Reputation: Disabled
I am assuming by API you mean gui..graphical?

if so try Debian Package Search

Code:
apt-get install packagesearch
 
Old 04-24-2009, 07:50 AM   #3
grayFalcon
Member
 
Registered: Jan 2003
Distribution: Debian
Posts: 68

Original Poster
Rep: Reputation: 15
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
 
Old 04-25-2009, 04:22 PM   #4
grayFalcon
Member
 
Registered: Jan 2003
Distribution: Debian
Posts: 68

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Standard Base plans cross-format package API LXer Syndicated Linux News 0 01-17-2007 10:54 PM
command for finding the Network status Uday123 Linux - Software 5 01-11-2006 09:54 AM
RPM/package deps gripe NeoMagick Suse/Novell 4 02-24-2005 05:38 AM
Need help finding linux equivalent to windows API functions: SHBrowseForFolder....etc mike1 Programming 2 11-11-2004 06:48 AM
Linux doesnt boot after showing finding modules OK status praveenk13 Linux - Software 0 02-26-2004 11:04 PM


All times are GMT -5. The time now is 09:15 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration