I'd love to be able to set an option in dpkg.cfg.d that causes dpkg to set an environment variable when running any commands. This would make it easy to, for instance, always set DEBIAN_FRONTEND=noninteractive for apt/dpkg invocations, while not setting it systemwide in /etc/environment.
I'm not sure that would be effective for debconf though, given that by default it is doing pre-configuration via an apt hook. Thanks, Guillem