FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Development

 
 
LinkBack Thread Tools
 
Old 04-24-2011, 12:31 PM
Florian Weimer
 
Default Python code for parsing .deb files

Is there some Python module to extract metadata from .deb files
(package name, version, source package, source version, architecture)?
What about parsing package list files?

dak probably contains such code, but is a bit unwieldy.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 874o5nygoo.fsf@mid.deneb.enyo.de">http://lists.debian.org/874o5nygoo.fsf@mid.deneb.enyo.de
 
Old 04-24-2011, 01:07 PM
Julien Valroff
 
Default Python code for parsing .deb files

Hi,

Le dimanche 24 avril 2011 à 14:31:03 (+0200 CEST), Florian Weimer a écrit*:
> Is there some Python module to extract metadata from .deb files
> (package name, version, source package, source version, architecture)?

Looks like the DebFile class from the debian module does all this.

This is in the python-debian package.

Cheers,
Julien

--
.'`. Julien Valroff ~ <julien@kirya.net> ~ <julien@debian.org>
: :' : Debian Developer & Free software contributor
`. `'` http://www.kirya.net/
`- 4096R/ E1D8 5796 8214 4687 E416 948C 859F EF67 258E 26B1


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20110424130741.GA15567@kirya.net">http://lists.debian.org/20110424130741.GA15567@kirya.net
 
Old 04-24-2011, 03:36 PM
Florian Weimer
 
Default Python code for parsing .deb files

* Julien Valroff:

> Le dimanche 24 avril 2011 à 14:31:03 (+0200 CEST), Florian Weimer a écrit*:
>> Is there some Python module to extract metadata from .deb files
>> (package name, version, source package, source version, architecture)?
>
> Looks like the DebFile class from the debian module does all this.
>
> This is in the python-debian package.

Thanks, this is indeed helpful.


--
To UNSUBSCRIBE, email to debian-devel-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 87hb9nwtjz.fsf@mid.deneb.enyo.de">http://lists.debian.org/87hb9nwtjz.fsf@mid.deneb.enyo.de
 
Old 04-24-2011, 03:46 PM
Stefano Zacchiroli
 
Default Python code for parsing .deb files

On Sun, Apr 24, 2011 at 05:36:00PM +0200, Florian Weimer wrote:
> > This is in the python-debian package.
> Thanks, this is indeed helpful.

Just in case: while DebFile is specifically meant to deal with raw .deb
files (as Julien has explained), python-debian also contains other
modules and classes to address the other need you mentioned,
i.e. parsing package lists a-la APT. Just look for "Deb822" and its
documentation.

Happy hacking,
--
Stefano Zacchiroli -o- PhD in Computer Science PostDoc @ Univ. Paris 7
zack@{upsilon.cc,pps.jussieu.fr,debian.org} -<>- http://upsilon.cc/zack/
Quando anche i santi ti voltano le spalle, | . |. I've fans everywhere
ti resta John Fante -- V. Capossela .......| ..: |.......... -- C. Adams
 

Thread Tools




All times are GMT. The time now is 06:39 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org