Dear Maintainer,
There are eight hookscripts in the examples/ directory
that use ${APTGETOPT[@]} in their code. APTGETOPT is a
bash array and while it works fine inside pbuilder code
where all library modules are sourced, it is not get
exported to hookscripts, because they are executed as
a separate process and the array is not exported to
their environment.
I have tested this using explicit export APTGETOPT clause
in my pbuilderrc and hookscripts that print the environment
and, unless my configuration is fundamentally broken, it
is not get exported.
I file this as a bug, because including a large number
of scripts using this feature in the examples/ directory
implies the expectation that it actually works.
The attached patch exports the APTGETOPT array as a plain
environment variable in a way that scripts that use the
${APTGETOPT[@]} form in their code will run successfully
without modification. The second patch (...manpages) updates
the relevant hookscripts section of the pbuilder manpage.
Cheers,
Georgios