flash poll: do we need a library for parsing sources.list?
Stefano Zacchiroli
zack at debian.org
Wed Feb 20 15:03:17 UTC 2008
Do we have whatever library for parsing /etc/apt/sources.list? If no, I
think we should write a new component for python-debian which implements
it and (maybe :-)) I volunteer for writing an initial implementation.
The functionality I mildly have in mind are:
- both the possibility to act on whatever single file is written
according to the sources.list format and to act on the system-wide
repository list (i.e. sources.list + /etc/apt/sources.list.d/*)
- the possibility to iterate over the defined repositories, possibly
accompanied by their priority (if there is one which is
repository-wide) as defined in the APT policy
- for each repository the ability to access each component (URL,
component name, kind (bin/src)
- the possibility to build download URLs for Packages/Sources/... out of
a given repository item plus the missing information (e.g.
architecture)
- input/output of sources.list file, for applications willing to modify
them
The scenarios I've in mind where such a library can be useful is the
implementation of download scripts for Packages/Sources/... which are
frequently written by hand (I personally did that several times).
Do you think such an addition would be interesting for python-debian?
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/20080220/28f09f62/attachment.pgp
More information about the pkg-python-debian-discuss
mailing list