2

I am doing automated builds with pdebuild. Sometimes these builds fail. In these cases I would like to keep the chroot to be able to investigate the cause of failure. I was trying to run pdebuild with --debug, which is -according to pbuilder manpage - is expected to do just that, but it had no effect. How can I tell pdebuild to leave the build environment in place?

Árpád Magosányi
  • 1,394
  • 2
  • 19
  • 35

1 Answers1

1

According to this -mentors mailing list post, you can use the supplied C10shell hook:

cp /usr/share/doc/pbuilder/examples/C10shell path/to/hook/dir

(I use cp instead of ln -s only because I often edit the hooks myself.)

This will start an interactive shell upon failure.

detly
  • 29,332
  • 18
  • 93
  • 152
  • Well, this won't work with an automated build. However I could backup the current status of the chroot from such a hook, and run other diagnostics. Thanks and +1. – Árpád Magosányi Sep 06 '14 at 18:21
  • @ÁrpádMagosányi Yeah, I wasn't sure whether you needed something non-interactive or not. But it sounds like this will help :) – detly Sep 06 '14 at 23:35