The pkg stanza has an option called `allow_untrusted`, which is
supposed to cause `/usr/sbin/installer` to be called with the
`-allowUntrusted` switch.
PR #3141 seems to have renamed the `pkg_install_opts` field to
`options`. At the same time, it introduces an `options` parameter for
the `run_installer` method, which shadows the `options` getter
method, causing the `allow_untrusted` option to be silently ignored.
The issue affects just the `pkg` stanza because `Hbc::Artifact::Pkg`
is the only artifact class that has an `options` method.
This commit removes the shadowing by renaming the field to
`stanza_options`; in one case, it uses `_options` for a parameter
name (instead of the more canonical `_`) for the sake of clarity.
Homebrew's actually ended up using a fair few gems. While we want to
avoid Bundler at runtime (and this PR still does that, in fact uses
Bundler even less at runtime than it did before) writing our own version
to use at build-time seems redundant.
installer command accepts -applyChoiceChangesXML option to change
customize options on the GUI installer from the commandline.
(`man installer` for more detailed information)
The introduced option `choice` enables the choice changes to be supplied
via pkg stanza without tricks in preflight code.