On Sat, 19 Oct 2013 18:34:52 +0200 Michael Vogt wrote: > On Wed, Oct 16, 2013 at 10:39:06PM -0300, Lisandro Damián Nicanor Pérez Meyer wrote: > [..] > > Saddly it is not documented in apt.conf(5). Being documented would help in > > implementations like the one described in #726430. > > Looking at #726430 - would it help you if we would simply add the > discovered proxy as http_proxy to the environment used to fork the > DPkg::Pre-Invoke scripts? I think it would help, as it would transparently make apt-listbugs work in Lisandro's job environment, without any modification on the apt-listbugs side. The only possible issue I see is that apt-listbugs would at that point work correctly, when invoked (in apt mode) by apt-get or aptitude, but would fail (in auto-detected-proxy environments), when invoked directly by the user (as in "apt-listbugs list first_package second_package/version", for instance). This could turn out to be really surprising for the user... Another alternative solution could be to create a 'virtual' configuration value, perhaps called "acquire::http::resulting_proxy". It would be 'virtual' in the sense that it would not correspond to anything that could be actually written in the apt.conf configuration file (or file fragments). But $ apt-config shell foo acquire::http::resulting_proxy would print foo='http://ip:port/' if APT used such a proxy (independently of which actual configuration value causes APT to use that proxy: it could be because of Acquire::HTTP::Proxy *or* because of Acquire::http::Proxy-Auto-Detect). Of course, this means that in some cases, running apt-config would cause the auto-detect command to be invoked behind the scenes... If apt-config supported such a 'virtual' configuration value, apt-listbugs could probe it in stead of "acquire::http::proxy" without worrying about the details. This would mean that any other future proxy setting mechanism implemented in APT would be automatically supported by apt-listbugs without any further modification... Beautifully easy (at least from *my own* point of view!), isn't it?!? ;-) -- http://www.inventati.org/frx/frx-gpg-key-transition-2010.txt New GnuPG key, see the transition document! ..................................................... Francesco Poli . GnuPG key fpr == CA01 1147 9CD2 EFDF FB82 3925 3E1C 27E1 1F69 BFFE
Attachment:
pgpZNkVv94SGm.pgp
Description: PGP signature