Propagate settings to the next pbuilderrc config file

When reading settings from a pbuilderrc file, initialize the environment with the settings obtained so far. This matches the behavior of pbuilder and makes it possible for the user's ~/.pbuilderrc to depend on values set in /usr/share/pbuilder/pbuilderrc and /etc/pbuilderrc.

Alternatively, all files could be sourced in a single bash invocation like this:

const char *cmd =
    "env bash -c 'set -e"
    "; . /usr/share/pbuilder/pbuilderrc"
    "; . /etc/pbuilderrc"
    "; . ~/.pbuilderrc"
    "; set'";

but this approach doesn't support the --configfile flag when intermixed with other flags.

Closes: #579506

Merge request reports

Loading