Johannes Schauer Marin Rodrigues:
It's currently broken because `lb` uses (at least) the following
parameters which are unsupported by mmdebstrap:
* --download-only
By looking at the source code of live-build I am reasonably sure, this
might only be happening because I previously set:
`lh config --cache-packages true`
That 'lb config' option however may or may not be redundant since
mmdebstrap might cache itself by default. Nevertheless would it be nice
if this could be fixed please.
This will be difficult. There are quite few semantics of the --download-only
option of debootstrap that mmdebstrap would have to copy 1:1 for this to work.
Are you familiar enough with lb to discuss this problem?
No, unfortunately not.
While at it, there are some other debootstrap related command line
options that I found in the live-build source. These might come up later
in other corner cases that mmdebstrap doesn't support yet:
* --foreign - Only used for the live-build's qemu-debootstrap related
code path. But perhaps worth supporting too?
There is no need for that option because mmdebstrap automatically does the
right thing if you instruct it to create a foreign architecture chroot without
you having to manually tell it that the architecture is foreign.
Understood.
However, all the options I suggested could be considered "accept these
option, do not bail out, and simply do nothing about these options". In
other words, if --foreign is set, simply ignore it. That is, if that
seems appropriate.
--foreign
"INFO: --foreign option not needed by mmdebstrap and ignored"
* --second-stage - Similar to above.
Why should I add this extra complexity of what debootstrap does in its second
stage to mmdebstrap if mmdebstrap doesn't even need it because it does the
right thing already?
Towards debootstrap drop-in comparability only.
Kinda, if it appropriate do everything in the first stage, do it. And
later if mmdebstrap is called with --second-stage is run, simply say
"not needed, mmdebstrap doesn't need a second stage, all done" exit 0
and do nothing. (Or the other way around.)
* --no-check-gpg - Not sure worth bothering or if you would like to
support that for compatibility's sake.
This is not really possible with mmdebstrap in all cases because mmdebstrap is
using apt to create the chroot and even with [trusted=yes], apt will still run
gpgv and do checks that cannot be disabled as of today. For this to work
reliably, more code needs to be added to apt. I've talked with apt maintainers
about this in the past about this but they (understandably) say, that the risk
of doing something wrong in such important code paths (security-wise) is too
high to allow for completely disabling gpg checks.
In which situation would --no-check-gpg be useful?
I don't know any where --no-check-gpg is currently useful except for
completeness sake of supporting the same (or as many as possible)
options as debootstrap. In case --no-check-gpg is given, simply ignore
it and don't bail out due to unknown option.
Yeah. That's the general theme of my reply. Accept the option in
mmdebstrap option parser but don't implement/change any actual
functionality. Just the options parser giving it a pass and then ignored.