flash poll: do we need a library for parsing sources.list?

Stefano Zacchiroli zack at debian.org
Thu Feb 21 15:23:10 UTC 2008


On Wed, Feb 20, 2008 at 05:56:11PM +0000, James Westby wrote:
> It sounds like this should already be available in python-apt. However
> I have never managed to actually find out what the API of python-apt
> is, so I can't say for sure.

Indeed there is something on that on python-apt, the easiest reference I
have is /usr/lib/python2.5/site-packages/aptsources/sourceslist.py. I
haven't tried it, but it seems skimming through it that most of the
things I need are already there. I'll give it a test then, thanks for
the pointer!

On Wed, Feb 20, 2008 at 06:45:34PM +0000, Enrico Zini wrote:
> Note that /etc/debtags/sources.list and /etc/debtags/sources.list.d
> follow the same syntax, only they have 'tag' instead of 'deb'.  It would
> be interesting to be able to parse that, too, even if it wouldn't be
> very important.

The interface in python-apt seems to support generic lines, though
internally marks as valid those starting with one of "deb", "deb-src",
"rpm", "rpm-src". See line 142 of the aforementioned file. I haven't
checked what actually are the implications of not being marked as valid.

If you want to support debtags lines it seems like you need to submit a
patch for that ...

> OTOH, if any of you are coming to FOSDEM, in my talk I'm going to
> present the problem of downloading extra package information (read, for
> example, popcon) into the system.  This could mean new sources.  We'll
> see.

Ok, I'll be attending indeed.

Cheers.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-python-debian-discuss/attachments/20080221/25a3038f/attachment.pgp 


More information about the pkg-python-debian-discuss mailing list