Johannes Schauer Marin Rodrigues <jo...@debian.org> writes:

> let me tell you about another trick. Instead of running
>
> --customize-hook='chroot "$1" i-might-fail || chroot "$1" bash'
>
> you can also run:
>
> --chrooted-customize-hook='i-might-fail || bash'
>
> In contrast to the --X-hook options, the --chrooted-X-hook options run their
> arguments inside the chroot and thus save you quite a bit of typing. The
> --chrooted-X-hook options do a bit more than that but those things are not
> relevant here. The options are currently undocumented but I think I'll make
> them official with the next release.

Good to know. Thanks. Not relevant to me today because I don't have any
customization hooks, but I'm sure I will at some point.


> To give you an idea of why it's really far from simple to just re-run a 
> command
> run by mmdebstrap have a look at this:
>
> https://sources.debian.org/src/mmdebstrap/1.3.5-7/mmdebstrap/#L486
>
> If any of that fails, what good is an interactive shell going to do?

Yeah. Certainly for some things there isn't a simple command you can
give to an interactive shell. But for some other things, there is, like
my apt server failure. I don't have a good sense of which case is more
common.


>> > The commands should be printed if you increase verbosity with --verbose or 
>> > even
>> > with --debug. If the command is not printed, then that is a bug that I will
>> > fix.
>> 
>> Good to know. I admittedly haven't spent a ton of time working on it.
>
> I think what you ultimately want with the interactive bash shell is to figure
> out why the stuff that broke for you did break. But I can get you the same
> information by increasing either the --verbose or --debug output as necessary.

Yes and no. I can imagine that my apt server is misconfigured, and the
server will need a change to make this work. And to test potential
server fixes it would be much easier to run "apt update" repeatedly in
an interactive shell than doing a full mmdebstrap run. Doing a full run
each time can be much slower if the failing thing doesn't happen right
at the start. --verbose or --debug are good to diagnose problems, but
not to test potential fixes.


> Could you run your mmdebstrap invocation with --debug and paste(bin)
> the error you get?

Let me try to get that tomorrow.

Reply via email to