"pool"- and "dists"-structure of the current Debian packages mirror
Note: Please do a CC to "firstname.lastname@example.org" since I'm not subscribed
to either list.
I'm not happy with the structure of the current Debian mirror.
Especially I'm not happy if anyone burns the current structure on a
Woody CD set. So I've written 2 Perl scripts ("debianpool",
"debiandists") which each independently tries to convert it to a clean
Debian mirror structure.
"debianpool" follows the rules of the current "pool"-structure but
copies/links any package of any distribution from the old
"dists"-structure into the pool. "debiandists" does the same for the
"dists"-structure but uses a slight modified "dists"-structure (see
below). Both scripts also generates the necessary new control files
equivalent to "Packages"-, "Sources"-files. These new control files are
located at the base of each structure ("debian/pool/" or
"debian/dists/"). To connect to the current control files, they have to
conform to the following naming schema:
<dist>_<part>_<arch> i.e. "Testing_main_i386"
<dist>_<part>_Source i.e. "Testing_main_Source"
<dist>_All_<arch> i.e. "Testing _All_i386"
All_All_<arch> i.e. "All_All_i386"
Uppercase/lowercase is irrelevant. "All" means containing the sum of all
relevant dists/parts. Note: The "All"-files are not processed by this
scripts, this has to be done by separate concat commands. There is
another sort of control files (see below) with the following naming:
<dist>_Utils_<arch> i.e. "Testing _Utils_i386"
This control files contains all utilities which belong to a distribution
(i.e. disk images, doc files). Currently there is no such a control file
in the Debian mirror.
The modification in the "dists"-structure are, all distributions
(potato, woody, sid) and all parts (main, contrib, non-US) are within
the same binary_<arch> directory.
The above structures are not directly usable by any package manager
(apt, dselect) since this is the final way I think the Debian mirror
structure should look like. But these structures are easily adaptable to
the current apt access method, just follow the description inside the
scripts. Still I think the access method should be modified in a way
that it doesn't enforce a certain directory structure and naming schema
but rather addresses the control files directly (i.e.
"pkg:/mirror/debian/dists/Testing_main_i386"). This also will allow for
having "pool"- and "dists"-structure side by side.
The scripts are located at "http://www.problemlos.ch/~otti/" and each
contains a hopefully better description. Also the scripts return a small
help if used without parameters. While I uses Perl 5.6 the scripts
should also work with Perl 5.0. Both scripts aren't well tested,
especially "debianpool" and not tried remotely, so don't use it on a
production system. And also the scripts never delete any obsolete
package, I may write a "debiancompact" script when I've more time.