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

Re: How to know the set of (source?) packages having bytecode executables?



On Sun, Feb 24, 2008 at 08:22:27PM +0100, David MENTRE wrote:
> After using Stephane's script as template, I have my Python script to
> list all binary packages. I have also some Python code to test if a
> file is an OCaml bytecode (match Caml1999X[0-9][0-9][0-9] pattern at the
> last 12 bytes of the file).

Ok, thanks for this tip. ... let's hope the regexp will be stable in the
future :)

> With "dpkg -S", I should be able to find the relevant binary packages
> that contain a bytecode. Is it possible to do the same as "dpkg -S" from
> Python code using, I suppose, python-debian code?

Nope, the file database AFAIK is not accessible via python-debian at the
moment, nor it is from python-apt. For the sake of performances I
suggest you to use apt-file instead of dpkg -S.

Thanks for the scripts.

-- 
Stefano Zacchiroli -*- PhD in Computer Science ............... now what?
zack@{upsilon.cc,cs.unibo.it,debian.org}  -<%>-  http://upsilon.cc/zack/
(15:56:48)  Zack: e la demo dema ?    /\    All one has to do is hit the
(15:57:15)  Bac: no, la demo scema    \/    right keys at the right time

Attachment: signature.asc
Description: Digital signature


Reply to: