PROPOSAL: RepoMan - apt repository manager (with code!)
Lots of the discussion here in d-d seems to have been focused on
management of apt's sources.list file. After reading some of these,
it struck me that something like "RSS/RDF for apt" is what is needed
here. After thinking a little more and doing a little research, I
cobbled together a little example of some of the thoughts I had.
The application I wrote is called (for lack of imagination)
"RepoMan". It pretends to be a management program for apt
sources.list files. You can find a copy of it here:
It requires Python, python-xml, python-glade, python-gnome, and all
the accretion that implies. Sorry if I offend your sensibilities
somewhere; I'm sure it's just as easy to implement in Perl/Tk, or
Java, or whatever.
The archive above contains two simple programs, a Python library, an
example "repository list", and a Glade UI file. The first program,
"simple-repo-parser", takes a repository list on stdin and writes a
valid sources.list file on stdout. The second, "repoman", is a rather
incomplete GUI program for managing a sources.list file; it reads a
repository list from the current directory, allows you to add and
remove repositories from the active list, and finally allows you to
save the list. None of them are even alpha quality; all require you
to run with all the files you need in the current directory, and
repoman's repository list is hard-coded.
- Both programs allow you to switch distributions (although
simple-repo-parser requires you to edit the source to do so), so that
slink-specific, potato-specific, and woody-specific repositories are
included (or not) as appropriate. With repoman, switching is as
simple as pulling down an option menu.
- Source (and source-only) repositories are supported.
- Support is included (but not coded) for mirroring; that is, each
repository can include a list of mirrors that can be substituted.
Alternately, a repository may specify a URI for a downloadable list
of mirrors. The mirrors are tagged by ISO country codes, allowing
for the possibility that RepoMan could pick the "closest" mirror for
every repository, switching mirrors as they appear and disappear.
- Repositories can include a short description, notes, and maintainer
The repository list itself is in XML (DTDless, at least for now).
Each repository is assigned an ID and a type ("deb" or "deb-src"), and
contains a tagged description, notes, maintainer information, and
whatever other metadata we might want. A "sourcetoo" empty tag is
supported for repositories that hold source in the same locations. It
then includes a "uri" for the URI to the master repository, as well as
zero or more "mirror-uri" entries (each with locations), and possibly
a "mirror-list-uri". Finally, one or more "distributions" are
specified, corresponding to the third field of a sources.list line;
these contain a name and zero or more components (the fourth and
following fields in sources.list).
As I mentioned, the whole thing is rather incomplete; OTOH, it serves
to illustrate the ideas I had. Of course, the whole idea is that
repository list(s) could be downloaded from the Internet dynamically,
perhaps tied to backend databases on Web sites. By regularly updating
the list(s) from the Internet, users could reconfigure their systems
automatically to reflect new or decommissioned mirrors, and could add
new repositories as they become available (such as the
recently-announced Helix GNOME test repositories, or the "testing"
repository maintained by Anthony Towns). Additionally, upgrading to a
newer release of Debian is as simple as switching from "slink" to
"potato", rebuilding sources.list, and performing the usual apt
What does everyone think of this? If it sounds like a good idea, I
could clean it up a bit, package it, and upload to woody. I thought
it would be best, in case I had a major screw loose, to get a bit of