[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Britney(2) and dpkg

Hi Fabio,

On Fri, 02 May 2008, Fabio Tranchitella wrote:
> I give you an idea about what is needed inside britney, and what we are
> currently performing with an ad-hoc python extension:
>   # python pseudo-code
>   from britney import buildSystem
>   # we build a virtual i386 system with a list of packages from
>   # a standard ad-hoc python dict
>   packages = {'foo': [...], 'bar': [...]}
>   system_i386 = buildSystem("i386", packages)
>   # we check the installability for foo and bar
>   print system_i386.is_installable('foo')
>   print system_i386.is_installable('bar')
>   # we remove a binary package
>   system_i386.remove_binary('foo')
>   new_pkg = [...]
>   system_i386.add_binary('baz', new_pkg)
> Is it possible, in your opinion, to directly use dpkg from python for this
> purpose? Any hints about where to start looking at the code?

Well, this code excerpt doesn't tell us at all how dpkg is currently used
in britney. Can you point us to the relevant code ?

In the end, I suppose that the right path is to export whatever is needed
in libdpkg and make that library a shared one instead of a statically
linked one. After that you can of course build a python wrapper module.

But you will have to talk to Guillem for more specific details.

Raphaël Hertzog

Le best-seller français mis à jour pour Debian Etch :

Reply to: