Michael Vogt michael.vogt at ubuntu.com
Tue Oct 18 16:59:59 CDT 2005


On Tue, Oct 18, 2005 at 10:07:10AM +0200, Sivan Green wrote:
> Hi Michael!
Hi Sivan,
 
> On 22:36, Sat 15 Oct 05, Michael Vogt wrote:
> > I like this idea, but what do you think about going one step further?
> > My idea would be to inspect the deb file and extract the control
> > information and parse the Depends/PreDepends/Conflicts line. Now use
> > libapt to figure if these dependencies can be satified and if so,
> In satisfied you mean that either:
> 
> 1) Required dependencies reside on the default directory
> where you attempt to install the local .deb? or,
> 
> 2) All dependencies can be satisfied from the online
> repository.

Initially (in the current prototype) only (2) is supported. It
shouldn't be too hard to add support for a modified version of (1)
that takes all additonally supplied local debs into account as well
(e.g.: "# gdebi foo.deb foo_data.deb").
 
> I'm acutally curious to know how you can use libapt from
> python (?) to do the dependency tracking.

python-apt contains a "apt_inst" module that provides useful functions
to inspect a deb. I attached a small example.

Cheers,
 Michael

-- 
Linux is not The Answer. Yes is the answer. Linux is The Question. - Neo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: deb_inspect.py
Type: text/x-python
Size: 899 bytes
Desc: not available
Url : http://lists.ubuntu.com/archives/ubuntu-devel/attachments/20051018/f4bfcd19/deb_inspect.py


More information about the ubuntu-devel mailing list