Export APTGETOPT to hookscripts.
Signed-off-by: Georgios M. Zarkadas georgios.zarkadas@gmail.com
This is the alternative approach I have mentioned in my previous merge request. It keeps APTGETOPT and APTITUDEOPT as arrays inside pbuilder core and submodules. The arrays are converted to plain variables to pass to executed submodules, then they are recreated at the start of each submodule.
Since this is a more laborious approach than using everywhere plain variables, I chose to keep hookscripts out of it; they get only plain variables, as in the first approach. The rationale is that they are generally short pieces of code and only consumers of the values contained inside APTGETOPT, APTITUDEOPT; there is no need for the added complexity of recreating the arrays.
As the tests I have made (inside a separate branch, named 'merge-requests-tests' in my forked git tree, at the directory 'merge-requests-tests/1.aptgetopt/') show that both approaches work, choosing either of them is possible.