Hi Dima,

I'm putting Helmut in CC who is in favour of such an option as well and who
might have more ideas.

Quoting Dima Kogan (2023-05-29 18:42:57)
> Hi. Currently it's possible to do
> 
>   sbuild --anything-failed-commands '%s'
> 
> to get an interactive shell in response to any step of the process
> failing. This makes it much easier to debug problems. It would be great
> if mmdebstrap had a similar function.
> 
> I'm currently trying to debug an issue with an apt-cacher-based server
> failing when mmdebstrap is pulling from it (but not when anything else
> is pulling from it), and that option would make this process much easier.

how about an option like this:

--failure-hook='chroot "$1" bash'

Since all hooks have the MMDEBSTRAP_HOOK variable set, whatever is run in the
hook would have access to the type of hook that failed.

The information that would be missing would be *which* hook of a certain type
was the one failing. I do not see a good way to communicate this information.

Another question: what should be done if the failure-hook failed?

Do you know of another software besides sbuild that has a similar interface?
I'd like to get some more ideas first before I add another interface that
mmdebstrap would have to support forever.

I would rather not add the percent escapes from sbuild as that would mean that
any percent sign in the hooks has to be escaped as well. This would break
existing users of hooks.

I'd also like to add that you can already emulate this behaviour by running a
hook like this:

--customize-hook='chroot "$1" i-might-fail || chroot "$1" bash'

So do we need another option for this?

What do you think?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to