Johannes Schauer Marin Rodrigues, le dim. 24 août 2025 00:50:07 +0200, a ecrit:
> > Wow, I didn't know you could pass an empty suite and several mirrors.
> > That is not really clear from man mmdebstrap.
> 
> The main hint is in the synopsis at the very top of the man page:
> 
> | SYNOPSIS
> |        mmdebstrap [OPTION...] [SUITE [TARGET [MIRROR...]]]
> 
> From there you can also see that SUITE is even completely optional.

Yes, but that is documented as a completely different thing:

«
The SUITE option is optional if no TARGET and no MIRROR option is
provided.  If SUITE is missing, then the information of the desired
suite has to come from standard input as part of a valid apt
sources.list file or be set up via hooks.
»

That's very different from being able to pass mirror lines as MIRROR.

> > Probably the second
> > paragraph of the DESCRIPTION should explicitly mention this use case.
> 
> The second paragraph is about the SUITE parameter and an empty SUITE value is
> not only interesting when using the apt sources entry.

Yes, but that other interest is quite subtle, and thus not the thing
you'd want to put first in a documentation.

> Instead it says:
> 
> | The value of the I<SUITE> argument will be used to determine which apt 
> index to
> | use for finding out the set of C<Essential:yes> packages and/or the set of
> | packages with the right priority for the selected variant. This 
> functionality
> | can be disabled by choosing the empty string for I<SUITE>.
> 
> In case of debian ports you probably want an empty suite not because you are
> supplying information via the sources.list but rather because essential
> packages can also be part of the essential set, right?

Yes. But I don't think documenting this belongs to the description
section, and should rather belong to the VARIANTS section (which is
actually already the case)

> > Also, the "The MIRROR option" paragraph should at least start as "The
> > MIRROR options"
> 
> You are completely correct. I now pushed this:
> 
> https://gitlab.mister-muffin.de/josch/mmdebstrap/commit/fb4896cafbb8ee9b9dd0d7a0142bc795e0dc8af3
> 
> Maybe we also need more examples. I think hurd might be a bit too complex but
> how about this:
> 
> mmdebstrap --variant=apt --arch=m68k \
>     --include="debian-ports-archive-keyring" \
>     '' m68k-chroot.tar \
>     "deb http://deb.debian.org/debian-ports/ unstable main" \
>     "deb http://deb.debian.org/debian-ports/ unreleased main"

Yes, that would be useful.

> I'd also like to add a deb822 example now that apt wants to convert our 
> sources
> to it but that's hard to write so that it becomes copy-pastable from the man
> page...

Yes, one-liners are really useful.

Samuel

Reply via email to