[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#671496: /usr/bin/apt-ftparchive: undocumented and unusable



On Fri, May 4, 2012 at 6:06 PM, Michal Suchanek
<michal.suchanek@ruk.cuni.cz> wrote:
> As the format of apt archives has been changed silently and my
> dpkg-scanpackages script generates archives that apt no longer
> understands.

I don't know about such a change.
And there shouldn't be such a change either.
Can you give an example so we can fix apt?


> It's been suggested that I use apt-ftparchive instead since it works out
> all the details.

That depends.
For a "works out details" tool rerepro might be the better option.
apt-ftparchive is more for people who want to control the details themself…


> However, the main problem remains:
>
> THE APT REPOSITORY FORMAT IS NOT DOCUMENTED.
>
> THE TOOL TO GENERATE IT IS NOT SUFFICIENTLY DOCUMENTED, EITHER.

Oh yeah, who hasn't heard all the good stories about
"scream-generated documentation"… :/


> It far less obvious that these should be prefixed with APT::FTPArchive::
> but some values explicitly mentioned in the man page are prefixed so.

That the settings aren't prefixed with APT::FTPArchive:: has the reason
that they are not interpreted if you prefix them.

Feel free to refer to the example file included in the apt-utils package.
It features an example for BinDirectory style repos. Mostly because the
Tree style repo is even easier to setup, but i agree that we should have
an example for that in the package, too.


> It is not said what parts are required, if any.
> Hopefully filling in what parts of the archive I want is sufficient.
>
> Now I can presumably put some random values in the config file and
> generate my repo, eh?
>
> Except the syntax is:
>
> apt-ftparchve generate config section...
>
> It iss uspposed to be able to generate multiple sections so hopefully
> the section is not required?
> $ apt-ftparchive generate repo.conf
> Packages done, Starting contents.
> Done. 0 B in 0 archives. Took 0s

No, section is not required.
Your setup is just wrong…
As said, no prefix and you will be fine.


> I would really appreciate documentation describing the damn archives.

Feel free to have a look at:
http://anonscm.debian.org/loggerhead/apt/debian-sid/annotate/head:/doc/examples/ftp-archive.conf

This is NOT how the archive is generated (see dak instead) and is (a bit)
dated, but still an other valid example.



All in all, while you have some valid points a nicer wording would not
have hurt. And raising this as a question rather than a bugreport wouldn't
have been the worst of all possible ideas either because a bugreport is
usually full of details and not full of demoralizational rambling.


Best regards

David Kalnischkies



Reply to: