From: Eugene V. Lyubimkin Date: Fri, 19 Dec 2008 19:49:54 +0000 (+0200) Subject: Merged from debian-sid branch. X-Git-Tag: 0.7.23~2^2^2~1 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/193d0845725a05e7e65b95e34f791cb6a85ff394?hp=65ea646c14385fef9852020a0a9432e7b567dcd5 Merged from debian-sid branch. --- diff --git a/configure.in b/configure.in index f90a32c3b..04d8a4712 100644 --- a/configure.in +++ b/configure.in @@ -18,7 +18,7 @@ AC_CONFIG_AUX_DIR(buildlib) AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in) dnl -- SET THIS TO THE RELEASE VERSION -- -AC_DEFINE_UNQUOTED(VERSION,"0.7.20~exp3") +AC_DEFINE_UNQUOTED(VERSION,"0.7.20") PACKAGE="apt" AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE") AC_SUBST(PACKAGE) diff --git a/debian/NEWS b/debian/NEWS new file mode 100644 index 000000000..5730fd7c6 --- /dev/null +++ b/debian/NEWS @@ -0,0 +1,27 @@ +apt (0.7.20) unstable; urgency=low + + * Code that determines which proxy to use was changed. Now + 'Acquire::{http,ftp}::Proxy[::]' options have the highest priority, + and '{http,ftp}_proxy' environment variables are used only if options + mentioned above are not specified. + + -- Eugene V. Lyubimkin Thu, 18 Dec 2008 00:30:16 +0200 + +apt (0.6.44) unstable; urgency=low + + * apt-ftparchive --db now uses Berkeley DB_BTREE instead of DB_HASH. + If you use a database created by an older version of apt, delete + it and allow it to be recreated the next time. + + -- Michael Vogt Wed, 26 Apr 2006 12:57:53 +0200 + +apt (0.5.25) unstable; urgency=low + + * apt-ftparchive --db now uses Berkeley DB version 4.2. If used with a + database created by an older version of apt, an attempt will be made + to upgrade the database, but this may not work in all cases. If your + database is not automatically upgraded, delete it and allow it to be + recreated the next time. + + -- Matt Zimmerman Sat, 8 May 2004 12:38:07 -0700 + diff --git a/debian/NEWS.Debian b/debian/NEWS.Debian deleted file mode 100644 index f44d1966b..000000000 --- a/debian/NEWS.Debian +++ /dev/null @@ -1,18 +0,0 @@ -apt (0.6.44) unstable; urgency=low - - * apt-ftparchive --db now uses Berkeley DB_BTREE instead of DB_HASH. - If you use a database created by an older version of apt, delete - it and allow it to be recreated the next time. - - -- Michael Vogt Wed, 26 Apr 2006 12:57:53 +0200 - -apt (0.5.25) unstable; urgency=low - - * apt-ftparchive --db now uses Berkeley DB version 4.2. If used with a - database created by an older version of apt, an attempt will be made - to upgrade the database, but this may not work in all cases. If your - database is not automatically upgraded, delete it and allow it to be - recreated the next time. - - -- Matt Zimmerman Sat, 8 May 2004 12:38:07 -0700 - diff --git a/debian/changelog b/debian/changelog index d0174400c..0adbbac1b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -7,12 +7,18 @@ apt (0.7.20) unstable; urgency=low * buildlib/config.{sub,guess}: - Renewed. This fixes lintian errors. * doc/apt.conf.5.xml, debian/apt-transport-https: - - Documented briefly 'APT::https' group of options. (Closes: #507398) + - Documented briefly 'Acquire::https' group of options. (Closes: #507398) - Applied patch from Daniel Burrows to document 'Debug' group of options. (Closes: #457265) - Mentioned 'APT::Periodic' and 'APT::Archives' groups of options. (Closes: #438559) - Mentioned '/* ... */' comments. (Closes: #507601) + * methods/{http,https,ftp}, doc/apt.conf.5.xml: + - Changed and unified the code that determines which proxy to use. Now + 'Acquire::{http,ftp}::Proxy[::]' options have the highest priority, + and '{http,ftp}_proxy' environment variables are used only if options + mentioned above are not specified. + (Closes: #445985, #157759, #320184, #365880, #479617) [ Michael Vogt ] * add option to "apt-get build-dep" to mark the needed @@ -29,7 +35,7 @@ apt (0.7.20) unstable; urgency=low - Finnish updated. Closes: #508449 - Galician updated. Closes: #509151 - -- Eugene V. Lyubimkin Sat, 06 Dec 2008 20:57:00 +0200 + -- Eugene V. Lyubimkin Mon, 15 Dec 2008 23:48:46 +0200 apt (0.7.20~exp2) unstable; urgency=low diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 74966c5b3..4d9e708a8 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -202,8 +202,9 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; standard form of http://[[user][:pass]@]host[:port]/. Per host proxies can also be specified by using the form http::Proxy::<host> with the special keyword DIRECT - meaning to use no proxies. The http_proxy environment variable - will override all settings. + meaning to use no proxies. If no one of the above settings is specified, + http_proxy environment variable + will be used. Three settings are provided for cache control with HTTP/1.1 compliant proxy caches. No-Cache tells the proxy to not use its cached @@ -251,9 +252,13 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; ftp - FTP URIs; ftp::Proxy is the default proxy server to use. It is in the - standard form of ftp://[[user][:pass]@]host[:port]/ and is - overridden by the ftp_proxy environment variable. To use a ftp + FTP URIs; ftp::Proxy is the default ftp proxy to use. It is in the + standard form of ftp://[[user][:pass]@]host[:port]/. Per + host proxies can also be specified by using the form + ftp::Proxy::<host> with the special keyword DIRECT + meaning to use no proxies. If no one of the above settings is specified, + ftp_proxy environment variable + will be used. To use a ftp proxy you will have to set the ftp::ProxyLogin script in the configuration file. This entry specifies the commands to send to tell the proxy server what to connect to. Please see diff --git a/methods/ftp.cc b/methods/ftp.cc index 554a24cf5..c91600ad5 100644 --- a/methods/ftp.cc +++ b/methods/ftp.cc @@ -112,23 +112,28 @@ bool FTPConn::Open(pkgAcqMethod *Owner) Close(); // Determine the proxy setting - if (getenv("ftp_proxy") == 0) + string SpecificProxy = _config->Find("Acquire::ftp::Proxy::" + ServerName.Host); + if (!SpecificProxy.empty()) { - string DefProxy = _config->Find("Acquire::ftp::Proxy"); - string SpecificProxy = _config->Find("Acquire::ftp::Proxy::" + ServerName.Host); - if (SpecificProxy.empty() == false) - { - if (SpecificProxy == "DIRECT") - Proxy = ""; - else - Proxy = SpecificProxy; - } - else - Proxy = DefProxy; + if (SpecificProxy == "DIRECT") + Proxy = ""; + else + Proxy = SpecificProxy; } else - Proxy = getenv("ftp_proxy"); - + { + string DefProxy = _config->Find("Acquire::ftp::Proxy"); + if (!DefProxy.empty()) + { + Proxy = DefProxy; + } + else + { + char* result = getenv("ftp_proxy"); + Proxy = result ? result : ""; + } + } + // Parse no_proxy, a , separated list of domains if (getenv("no_proxy") != 0) { diff --git a/methods/http.cc b/methods/http.cc index b3c791fa0..5d18b3adc 100644 --- a/methods/http.cc +++ b/methods/http.cc @@ -309,22 +309,27 @@ bool ServerState::Open() Persistent = true; // Determine the proxy setting - if (getenv("http_proxy") == 0) + string SpecificProxy = _config->Find("Acquire::http::Proxy::" + ServerName.Host); + if (!SpecificProxy.empty()) { - string DefProxy = _config->Find("Acquire::http::Proxy"); - string SpecificProxy = _config->Find("Acquire::http::Proxy::" + ServerName.Host); - if (SpecificProxy.empty() == false) - { - if (SpecificProxy == "DIRECT") - Proxy = ""; - else - Proxy = SpecificProxy; - } - else - Proxy = DefProxy; + if (SpecificProxy == "DIRECT") + Proxy = ""; + else + Proxy = SpecificProxy; } else - Proxy = getenv("http_proxy"); + { + string DefProxy = _config->Find("Acquire::http::Proxy"); + if (!DefProxy.empty()) + { + Proxy = DefProxy; + } + else + { + char* result = getenv("http_proxy"); + Proxy = result ? result : ""; + } + } // Parse no_proxy, a , separated list of domains if (getenv("no_proxy") != 0) diff --git a/methods/https.cc b/methods/https.cc index 98dfeefa1..728869fa2 100644 --- a/methods/https.cc +++ b/methods/https.cc @@ -61,19 +61,26 @@ void HttpsMethod::SetupProxy() URI ServerName = Queue->Uri; // Determine the proxy setting - if (getenv("http_proxy") == 0) + string SpecificProxy = _config->Find("Acquire::http::Proxy::" + ServerName.Host); + if (!SpecificProxy.empty()) { - string DefProxy = _config->Find("Acquire::http::Proxy"); - string SpecificProxy = _config->Find("Acquire::http::Proxy::" + ServerName.Host); - if (SpecificProxy.empty() == false) - { - if (SpecificProxy == "DIRECT") - Proxy = ""; - else - Proxy = SpecificProxy; - } - else - Proxy = DefProxy; + if (SpecificProxy == "DIRECT") + Proxy = ""; + else + Proxy = SpecificProxy; + } + else + { + string DefProxy = _config->Find("Acquire::http::Proxy"); + if (!DefProxy.empty()) + { + Proxy = DefProxy; + } + else + { + char* result = getenv("http_proxy"); + Proxy = result ? result : ""; + } } // Parse no_proxy, a , separated list of domains