Bladeren bron

Merge branch 'debian/sid' into debian/experimental

Conflicts:
	apt-pkg/acquire-item.cc
	configure.ac
	debian/changelog
	doc/apt-verbatim.ent
	doc/po/apt-doc.pot
	doc/po/de.po
	doc/po/es.po
	doc/po/fr.po
	doc/po/it.po
	doc/po/ja.po
	doc/po/pt.po
	po/ar.po
	po/ast.po
	po/bg.po
	po/bs.po
	po/ca.po
	po/cs.po
	po/cy.po
	po/da.po
	po/de.po
	po/dz.po
	po/el.po
	po/es.po
	po/eu.po
	po/fi.po
	po/fr.po
	po/gl.po
	po/hu.po
	po/it.po
	po/ja.po
	po/km.po
	po/ko.po
	po/ku.po
	po/lt.po
	po/mr.po
	po/nb.po
	po/ne.po
	po/nl.po
	po/nn.po
	po/pl.po
	po/pt.po
	po/pt_BR.po
	po/ro.po
	po/ru.po
	po/sk.po
	po/sl.po
	po/sv.po
	po/th.po
	po/tl.po
	po/tr.po
	po/uk.po
	po/vi.po
	po/zh_CN.po
	po/zh_TW.po
	test/integration/test-ubuntu-bug-346386-apt-get-update-paywall
Michael Vogt 12 jaren geleden
bovenliggende
commit
8c782efd93
100 gewijzigde bestanden met toevoegingen van 116843 en 117813 verwijderingen
  1. 0 1
      .travis.yml
  2. 0 73
      README.ddtp
  3. 181 0
      README.md
  4. 2 2
      apt-pkg/acquire-item.cc
  5. 3 0
      apt-pkg/cachefile.cc
  6. 82 0
      apt-pkg/contrib/proxy.cc
  7. 16 0
      apt-pkg/contrib/proxy.h
  8. 6 3
      apt-pkg/contrib/strutl.cc
  9. 2 2
      apt-pkg/deb/deblistparser.cc
  10. 7 6
      apt-pkg/deb/dpkgpm.cc
  11. 2 1
      apt-pkg/depcache.cc
  12. 48 1
      apt-pkg/packagemanager.cc
  13. 2 2
      apt-private/private-output.cc
  14. 3 2
      buildlib/docbook.mak
  15. 3 2
      cmdline/apt-cache.cc
  16. 17 16
      cmdline/apt-get.cc
  17. 16 0
      cmdline/apt-helper.cc
  18. 33 0
      debian/changelog
  19. 1 1
      debian/tests/control
  20. 3 1
      debian/tests/run-tests
  21. 0 171
      doc/Bugs
  22. 3 9
      doc/apt-cache.8.xml
  23. 3 9
      doc/apt-cdrom.8.xml
  24. 3 9
      doc/apt-config.8.xml
  25. 3 9
      doc/apt-extracttemplates.1.xml
  26. 3 9
      doc/apt-ftparchive.1.xml
  27. 3 9
      doc/apt-get.8.xml
  28. 3 9
      doc/apt-key.8.xml
  29. 3 9
      doc/apt-mark.8.xml
  30. 3 9
      doc/apt-secure.8.xml
  31. 3 9
      doc/apt-sortpkgs.1.xml
  32. 1 1
      doc/apt-verbatim.ent
  33. 5 9
      doc/apt.8.xml
  34. 3 9
      doc/apt.conf.5.xml
  35. 3 9
      doc/apt_preferences.5.xml
  36. 2 1
      doc/design.dbk
  37. 2 1
      doc/dpkg-tech.dbk
  38. 2 1
      doc/files.dbk
  39. 2 1
      doc/guide.dbk
  40. 1 1
      doc/makefile
  41. 2 1
      doc/method.dbk
  42. 2 1
      doc/offline.dbk
  43. 791 791
      doc/po/apt-doc.pot
  44. 821 824
      doc/po/de.po
  45. 815 824
      doc/po/es.po
  46. 815 824
      doc/po/fr.po
  47. 815 824
      doc/po/it.po
  48. 1326 1193
      doc/po/ja.po
  49. 811 811
      doc/po/pl.po
  50. 996 1491
      doc/po/pt.po
  51. 811 811
      doc/po/pt_BR.po
  52. 3 9
      doc/sources.list.5.xml
  53. 66 33
      ftparchive/apt-ftparchive.cc
  54. 2 60
      methods/http.cc
  55. 0 3
      methods/http.h
  56. 4 0
      methods/https.cc
  57. 2229 2246
      po/ar.po
  58. 2536 2553
      po/ast.po
  59. 2563 2580
      po/bg.po
  60. 2049 2066
      po/bs.po
  61. 2560 2577
      po/ca.po
  62. 2596 2586
      po/cs.po
  63. 2541 2558
      po/cy.po
  64. 2566 2583
      po/da.po
  65. 2669 2644
      po/de.po
  66. 2507 2524
      po/dz.po
  67. 2510 2527
      po/el.po
  68. 2575 2592
      po/es.po
  69. 2516 2533
      po/eu.po
  70. 2510 2527
      po/fi.po
  71. 2656 2673
      po/fr.po
  72. 2569 2586
      po/gl.po
  73. 2554 2571
      po/hu.po
  74. 2658 2675
      po/it.po
  75. 2619 2636
      po/ja.po
  76. 2498 2515
      po/km.po
  77. 2514 2531
      po/ko.po
  78. 2106 2123
      po/ku.po
  79. 2259 2276
      po/lt.po
  80. 2499 2516
      po/mr.po
  81. 2530 2547
      po/nb.po
  82. 2491 2508
      po/ne.po
  83. 2567 2584
      po/nl.po
  84. 2493 2510
      po/nn.po
  85. 2614 2631
      po/pl.po
  86. 2588 2605
      po/pt.po
  87. 2529 2546
      po/pt_BR.po
  88. 2524 2541
      po/ro.po
  89. 2595 2612
      po/ru.po
  90. 2556 2573
      po/sk.po
  91. 2547 2564
      po/sl.po
  92. 2558 2575
      po/sv.po
  93. 2524 2541
      po/th.po
  94. 2504 2521
      po/tl.po
  95. 2614 2590
      po/tr.po
  96. 2575 2592
      po/uk.po
  97. 2626 2643
      po/vi.po
  98. 2496 2513
      po/zh_CN.po
  99. 2495 2512
      po/zh_TW.po
  100. 0 0
      prepare-release

+ 0 - 1
.travis.yml

@@ -2,5 +2,4 @@ language: cpp
 before_install:
  - sudo apt-get update -q
  - sudo ./prepare-release travis-ci
- - sudo apt-get install -q --no-install-recommends stunnel4 db-util
 script: make && make test && test/integration/run-tests

+ 0 - 73
README.ddtp

@@ -1,74 +0,0 @@
-TODO:
-- URL-Remap for the translation files (to hack around the problem that
-  they are not on any ftp server yet but only on http://ddtp.debian.org/)
-
-Here is the original announcement of the ddtp support:
-
-* To: debian-devel-announce@lists.debian.org
-* Subject: Translate files
-* From: Michael Bramer <grisu@debian.org>
-* Date: Sun, 6 Oct 2002 21:56:06 +0200
-* Mail-followup-to: debian-devel@lists.debian.org
-* Message-id: <20021006195605.GA30516@home.debsupport.de>
-* Old-return-path: <michael@home.debsupport.de>
-* User-agent: Mutt/1.3.28i
-
-Hello all
-
-After some discussion between Anthony Towns (a ftpmaster), Jason
-Gunthorpe (APT Developer) and some DDTP Coordinators we find a way to
-transfer the translated package descriptions from the archive to the
-user. 
-
-The translated descriptions need to be downloadable befor any
-installation process, like the other package meta information. We
-choose a new file per languages with all translated package
-descriptions. The package system can download one or more of this
-files at 'apt-get update' time and know the translations.
-
-The new files are names 'Translate-$lang' and the file have this
-rfc822-format:
-  Package: &lt;package-name&gt;
-  Description-md5: &lt;the md5 checksum of the english description&gt;
-  Description-$lang.$encoding: &lt;translated headline&gt;
-   &lt;translated section&gt;
-
-The encoding of the Description is 'UTF-8' in all languages normal.
-The files will be located at 'debian/dists/sid/main/i18n/' on the ftp
-server (for all architecture). In addition of the plain
-'Translate-$lang' file, there will be a 'gz' and a 'bz2' version and
-in future also the new incremental format version.
-
-The &lt;the md5 checksum of the english description&gt; is the md5 checksum
-of the full english description, without the 'Description: '-tag and
-with all spaces and newlines. Look at this example:
- Description: XXX
-  YYY
-  .
-  ZZZ
-is md5(&quot;XXX\n YYY\n .\n ZZZ\n&quot;) (perl-syntax).
-
-
-A future APT version will download one or some 'Translate-$lang'
-file(s) at 'update'-time. After this download it show a translated
-description instead of the english form, if it found a translated
-description of the package with the right md5 chechsum. The environment
-of the user will controlled this process (LANG, LANGUAGE, LC_MESSAGES,
-etc). With this the package system will never show a outdated
-translation.
-
-The translations come all from the DDTP. A daily process on
-ddtp.debian.org make new 'Translated-$lang' files and a script on
-ftp-master request this files and move this to the debian archive.
-Now the first files are accessible at
-	<a  href="http://ddtp.debian.org/pdesc/translatefiles/">http://ddtp.debian.org/pdesc/translatefiles/</a>
-
-If you found wrong translations, please read the guides on
-ddtp.debian.org, make a better translation and send this per mail to
-the DDTP server. Don't bug the package maintainer!
-
-Thanks
-Grisu
-Michael Bramer  -  a Debian Linux Developer      <a  href="http://www.debsupport.de">http://www.debsupport.de</a>
-PGP: finger grisu@db.debian.org  -- Linux Sysadmin   -- Use Debian Linux

+ 181 - 0
README.md

@@ -0,0 +1,181 @@
+APT
+===
+
+apt is the main commandline package manager for Debian and its derivatives.
+It provides commandline tools for searching and managing as well as querying
+information about packages as well as low-level access to all features
+provided by the libapt-pkg and libapt-inst libraries which higher-level
+package managers can depend upon.
+
+Included tools are:
+
+* apt-get for retrieval of packages and information about them
+  from authenticated sources and for installation, upgrade and
+  removal of packages together with their dependencies
+* apt-cache for querying available information about installed
+  as well as installable packages
+* apt-cdrom to use removable media as a source for packages
+* apt-config as an interface to the configuration settings
+* apt-key as an interface to manage authentication keys
+* apt-extracttemplates to be used by debconf to prompt for configuration
+  questions before installation.
+* apt-ftparchive creates Packages and other index files
+  needed to publish an archive of debian packages
+* apt-sortpkgs is a Packages/Sources file normalizer.
+
+The libraries libapt-pkg and libapt-inst are also maintained as part of this project,
+alongside various additional binaries like the acquire-methods used by them.
+Bindings for Python ([python-apt](https://tracker.debian.org/pkg/python-apt)) and
+Perl ([libapt-pkg-perl](https://tracker.debian.org/pkg/libapt-pkg-perl)) are available as separated projects.
+
+Discussion happens mostly on [the mailinglist](mailto:deity@lists.debian.org) ([archive](https://lists.debian.org/deity/)) and on [IRC](irc://irc.oftc.net/debian-apt).
+Our bugtracker as well as a general overview can be found at the [Debian Tracker page](https://tracker.debian.org/pkg/apt).
+
+
+Contributing
+------------
+APT is maintained in git, the official repository being located at
+`git://anonscm.debian.org/apt/apt.git` ([webgit](http://anonscm.debian.org/gitweb/?p=apt/apt.git)),
+but also available at other locations like [GitHub](https://github.com/Debian/apt).
+
+The default branch is `debian/sid`, other branches targeted at different
+derivatives and releases being used as needed. Various topic branches in
+different stages of completion might be branched of from those, which you
+are encouraged to do as well.
+
+### Coding
+
+APT uses its own autoconf based build system, see [README.make](http://anonscm.debian.org/gitweb/?p=apt/apt.git;a=blob;f=README.make)
+for the glory details, but to get started, just run:
+
+	$ make
+
+from a fresh git checkout.
+
+The source code uses in most parts a relatively uncommon indent convention,
+namely 3 spaces with 8 space tab (see [doc/style.txt](http://anonscm.debian.org/gitweb/?p=apt/apt.git;a=blob;f=doc/style.txt) for more on this).
+Adhering to it avoids unnecessary code-churn destroying history (aka: `git blame`)
+and you are therefore encouraged to write patches in this style.
+Your editor can surely help you with this, for vim the settings would be
+`setlocal shiftwidth=3 noexpandtab tabstop=8`
+(the later two are the default configuration and could therefore be omitted).
+
+### Translations
+
+While we welcome contributions here, we highly encourage you to contact the [Debian Internationalization (i18n) team](https://wiki.debian.org/Teams/I18n).
+Various language teams have formed which can help you creating, maintaining
+and improving a translation, while we could only do a basic syntax check of the
+file format…
+
+Further more, Translating APT is split into two independent parts:
+The program translation, meaning the messages printed by the tools,
+as well as the manpages and other documentation shipped with APT.
+
+### Bug triage
+
+Software tools like APT which are used by thousands of users every
+day have a steady flow of incoming bugreports. Not all of them are really
+bugs in APT: It can be packaging bugs like failing maintainer scripts a
+user reports against apt, because apt was the command he executed leading
+to this failure or various wishlist items for new features. Given enough time
+also the occasional duplicate enters the system.
+Our bugtracker is therefore full with open bugreports which are waiting for you! ;)
+
+Testing
+-------
+
+### Manual execution
+
+When you make changes and want to run them manually, make sure your
+`$LD_LIBRARY_PATH` points to the libraries you have built, e.g. via:
+
+	$ export LD_LIBRARY_PATH=$(pwd)/build/bin
+	$ ./build/bin/apt-get moo
+
+
+### Integration tests
+
+There is a extensive integration testsuite available which can be run via:
+
+	$ ./test/integration/run-tests
+
+While these tests are not executed at package build-time as they require additional
+dependencies, the repository contains the configuration needed to run them on [Travis CI](https://travis-ci.org/)
+as well as via autopkgtests e.g. on [Debian Continuous Integration](http://ci.debian.net/?q=apt#package/apt).
+
+A testcase here is a shellscript embedded in a framework creating an environment in which
+apt tools can be used naturally without root-rights to test every aspect of its behavior
+itself as well as in conjunction with dpkg and other tools while working with packages.
+
+
+### Unit tests
+
+These tests are gtest-dev based, reside in `./test/libapt` and can be run with `make test`.
+They are executed at package build-time, but not by `make`.
+
+Debugging
+---------
+
+APT does many things, so there is no central debug mode which could be
+activated. It uses instead various config-options to activate debug output
+in certain areas. The following describes some common scenarios and generally
+useful options, but is in no way exhaustive.
+
+Note that you should *NEVER* use these settings as root to avoid accidents.
+Similation mode (`-s`) is usually sufficient to help you run apt as a non-root user.
+
+### Using different state files
+
+If a dependency solver bug is reported, but can't be reproduced by the
+triager easily, it is beneficial to ask the reporter for the
+`/var/lib/dpkg/status` file, which includes the packages installed on the
+system and in which version. Such a file can then be used via the option
+`dir::state::status`. Beware of different architecture settings!
+Bugreports usually include this information in the template. Assuming you
+already have the `Packages` files for the architecture (see `sources.list`
+manpage for the `arch=` option) you can change to a different architecture
+with a config file like:
+
+	APT::Architecture "arch1";
+	#clear APT::Architectures;
+	APT:: Architectures { "arch1"; "arch2"; }
+
+If a certain mirror state is needed, see if you can reproduce it with [snapshot.debian.org](http://snapshot.debian.org/).
+Your sources.list file (`dir::etc::sourcelist`) has to be correctly mention the repository,
+but if it does, you can use different downloaded archive state files via `dir::state::lists`.
+
+In case manually vs. automatically installed matters, you can ask the reporter for
+the `/var/lib/apt/extended_states` file and use it with `dir::state::extended_states`.
+
+### Dependency resolution
+
+APT works in its internal resolver in two stages: First all packages are visited
+and marked for installation, keep back or removal. Option `Debug::pkgDepCache::Marker`
+shows this. This also decides which packages are to be installed to satisfy dependencies,
+which can be seen by `Debug::pkgDepCache::AutoInstall`. After this is done, we might
+be in a situation in which two packages want to be installed, but only on of them can be.
+It is the job of the pkgProblemResolver to decide which of two packages 'wins' and can
+therefore decide what has to happen. You can see the contenders as well as their fight and
+the resulting resolution with `Debug::pkgProblemResolver`.
+
+### Downloading files
+
+Various binaries (called 'methods') are tasked with downloading files. The Acquire system
+talks to them via simple text protocol. Depending on which side you want to see, either
+`Debug::pkgAcquire::Worker` or `Debug::Acquire::http` (or similar) will show the messages.
+
+The integration tests use a simple self-built webserver which also logs. If you find that
+the http(s) methods do not behave like they should be try to implement this behavior in the
+webserver for simpler and more controlled testing.
+
+### Installation order
+
+Dependencies are solved, packages downloaded: Everything read for the installation!
+The last step in the chain is often forgotten, but still very important:
+Packages have to be installed in a particular order so that their dependencies are
+satisfied, but at the same time you don't want to install very important and optional
+packages at the same time if possible, so that a broken optional package does not
+block the correct installation of very important packages. Which option to use depends on
+if you are interested in the topology sorting (`Debug::pkgOrderList`), the dependency-aware
+cycle and unconfigured prevention (`Debug::pkgPackageManager`) or the actual calls
+to dpkg (`Debug::pkgDpkgPm`).

+ 2 - 2
apt-pkg/acquire-item.cc

@@ -369,7 +369,7 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
    Desc.URI = Target->URI + ".diff/Index";
 
    DestFile = _config->FindDir("Dir::State::lists") + "partial/";
-   DestFile += URItoFileName(Target->URI) + string(".DiffIndex");
+   DestFile += URItoFileName(Desc.URI);
 
    if(Debug)
       std::clog << "pkgAcqDiffIndex: " << Desc.URI << std::endl;
@@ -405,7 +405,7 @@ pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
 string pkgAcqDiffIndex::Custom600Headers() const
 {
    string Final = _config->FindDir("Dir::State::lists");
-   Final += URItoFileName(RealURI) + string(".IndexDiff");
+   Final += URItoFileName(Desc.URI);
    
    if(Debug)
       std::clog << "Custom600Header-IMS: " << Final << std::endl;

+ 3 - 0
apt-pkg/cachefile.cc

@@ -143,6 +143,9 @@ bool pkgCacheFile::BuildDepCache(OpProgress *Progress)
    if (DCache != NULL)
       return true;
 
+   if (BuildPolicy(Progress) == false)
+      return false;
+
    DCache = new pkgDepCache(Cache,Policy);
    if (_error->PendingError() == true)
       return false;

+ 82 - 0
apt-pkg/contrib/proxy.cc

@@ -0,0 +1,82 @@
+// -*- mode: cpp; mode: fold -*-
+// Description								/*{{{*/
+/* ######################################################################
+   
+   Proxy - Proxy releated functions
+   
+   ##################################################################### */
+									/*}}}*/
+// Include Files							/*{{{*/
+#include<apt-pkg/configuration.h>
+#include<apt-pkg/error.h>
+#include<apt-pkg/fileutl.h>
+#include<apt-pkg/strutl.h>
+
+#include<iostream>
+#include <unistd.h>
+
+#include "proxy.h"
+
+
+// AutoDetectProxy - auto detect proxy          			/*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool AutoDetectProxy(URI &URL)
+{
+   // we support both http/https debug options
+   bool Debug = _config->FindB("Debug::Acquire::"+URL.Access,false);
+
+   // option is "Acquire::http::Proxy-Auto-Detect" but we allow the old
+   // name without the dash ("-")
+   std::string AutoDetectProxyCmd = _config->Find("Acquire::"+URL.Access+"::Proxy-Auto-Detect",
+                                      _config->Find("Acquire::"+URL.Access+"::ProxyAutoDetect"));
+
+   if (AutoDetectProxyCmd.empty())
+      return true;
+
+   if (Debug)
+      std::clog << "Using auto proxy detect command: " << AutoDetectProxyCmd << std::endl;
+
+   int Pipes[2] = {-1,-1};
+   if (pipe(Pipes) != 0)
+      return _error->Errno("pipe", "Failed to create Pipe");
+
+   pid_t Process = ExecFork();
+   if (Process == 0)
+   {
+      close(Pipes[0]);
+      dup2(Pipes[1],STDOUT_FILENO);
+      SetCloseExec(STDOUT_FILENO,false);
+
+      std::string foo = URL;
+      const char *Args[4];
+      Args[0] = AutoDetectProxyCmd.c_str();
+      Args[1] = foo.c_str();
+      Args[2] = 0;
+      execv(Args[0],(char **)Args);
+      std::cerr << "Failed to exec method " << Args[0] << std::endl;
+      _exit(100);
+   }
+   char buf[512];
+   int InFd = Pipes[0];
+   close(Pipes[1]);
+   int res = read(InFd, buf, sizeof(buf)-1);
+   ExecWait(Process, "ProxyAutoDetect", true);
+
+   if (res < 0)
+      return _error->Errno("read", "Failed to read");
+   if (res == 0)
+      return _error->Warning("ProxyAutoDetect returned no data");
+
+   // add trailing \0
+   buf[res] = 0;
+
+   if (Debug)
+      std::clog << "auto detect command returned: '" << buf << "'" << std::endl;
+
+   if (strstr(buf, URL.Access.c_str()) == buf)
+      _config->Set("Acquire::"+URL.Access+"::proxy::"+URL.Host, _strstrip(buf));
+
+   return true;
+}
+									/*}}}*/

+ 16 - 0
apt-pkg/contrib/proxy.h

@@ -0,0 +1,16 @@
+// -*- mode: cpp; mode: fold -*-
+// Description								/*{{{*/
+/* ######################################################################
+   
+   Proxy - Proxy operations
+   
+   ##################################################################### */
+									/*}}}*/
+#ifndef PKGLIB_PROXY_H
+#define PKGLIB_PROXY_H
+
+class URI;
+bool AutoDetectProxy(URI &URL);
+
+
+#endif

+ 6 - 3
apt-pkg/contrib/strutl.cc

@@ -711,9 +711,12 @@ string LookupTag(const string &Message,const char *Tag,const char *Default)
    then returns the result. Several varients on true/false are checked. */
 int StringToBool(const string &Text,int Default)
 {
-   char *End;
-   int Res = strtol(Text.c_str(),&End,0);   
-   if (End != Text.c_str() && Res >= 0 && Res <= 1)
+   char *ParseEnd;
+   int Res = strtol(Text.c_str(),&ParseEnd,0);
+   // ensure that the entire string was converted by strtol to avoid
+   // failures on "apt-cache show -a 0ad" where the "0" is converted
+   const char *TextEnd = Text.c_str()+Text.size();
+   if (ParseEnd == TextEnd && Res >= 0 && Res <= 1)
       return Res;
    
    // Check for positives

+ 2 - 2
apt-pkg/deb/deblistparser.cc

@@ -793,8 +793,8 @@ bool debListParser::ParseProvides(pkgCache::VerIterator &Ver)
 	 Start = ParseDepends(Start,Stop,Package,Version,Op);
 	 if (Start == 0)
 	    return _error->Error("Problem parsing Provides line");
-	 if (Op != pkgCache::Dep::NoOp) {
-	    _error->Warning("Ignoring Provides line with DepCompareOp for package %s", Package.c_str());
+	 if (Op != pkgCache::Dep::NoOp && Op != pkgCache::Dep::Equals) {
+	    _error->Warning("Ignoring Provides line with non-equal DepCompareOp for package %s", Package.c_str());
 	 } else if ((Ver->MultiArch & pkgCache::Version::Foreign) == pkgCache::Version::Foreign) {
 	    if (NewProvidesAllArch(Ver, Package, Version) == false)
 	       return false;

+ 7 - 6
apt-pkg/deb/dpkgpm.cc

@@ -621,15 +621,15 @@ void pkgDPkgPM::ProcessDpkgStatusLine(char *line)
    {
       if(action == "error")
       {
-         d->progress->Error(list[1], PackagesDone, PackagesTotal,
+         d->progress->Error(pkgname, PackagesDone, PackagesTotal,
                             list[3]);
          pkgFailures++;
-         WriteApportReport(list[1].c_str(), list[3].c_str());
+         WriteApportReport(pkgname.c_str(), list[3].c_str());
          return;
       }
       else if(action == "conffile-prompt")
       {
-         d->progress->ConffilePrompt(list[1], PackagesDone, PackagesTotal,
+         d->progress->ConffilePrompt(pkgname, PackagesDone, PackagesTotal,
                                      list[3]);
          return;
       }
@@ -1662,9 +1662,10 @@ void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg)
    // do not report dpkg I/O errors, this is a format string, so we compare
    // the prefix and the suffix of the error with the dpkg error message
    vector<string> io_errors;
-   io_errors.push_back(string("failed to read on buffer copy for %s"));
-   io_errors.push_back(string("failed in write on buffer copy for %s"));
-   io_errors.push_back(string("short read on buffer copy for %s"));
+   io_errors.push_back(string("failed to read"));
+   io_errors.push_back(string("failed to write"));
+   io_errors.push_back(string("failed to seek"));
+   io_errors.push_back(string("unexpected end of file or stream"));
 
    for (vector<string>::iterator I = io_errors.begin(); I != io_errors.end(); ++I)
    {

+ 2 - 1
apt-pkg/depcache.cc

@@ -663,10 +663,11 @@ void pkgDepCache::Update(OpProgress *Prog)
 {   
    iUsrSize = 0;
    iDownloadSize = 0;
-   iDelCount = 0;
    iInstCount = 0;
+   iDelCount = 0;
    iKeepCount = 0;
    iBrokenCount = 0;
+   iPolicyBrokenCount = 0;
    iBadCount = 0;
 
    // Perform the depends pass

+ 48 - 1
apt-pkg/packagemanager.cc

@@ -373,6 +373,8 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
    std::list<DepIterator> needConfigure;
    do
    {
+      // Check each dependency and see if anything needs to be done
+      // so that it can be configured
       Changed = false;
       for (DepIterator D = instVer.DependsList(); D.end() == false; )
       {
@@ -384,7 +386,8 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
 	    continue;
 	 Bad = true;
 
-	 // Check for dependencies that have not been unpacked, probably due to loops.
+         // the first pass checks if we its all good, i.e. if we have
+         // to do anything at all
 	 for (DepIterator Cur = Start; true; ++Cur)
 	 {
 	    SPtrArray<Version *> VList = Cur.AllTargets();
@@ -403,6 +406,47 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
 		  break;
 	       }
 
+	       // Check if the version that is going to be installed will satisfy the dependency
+	       if (Cache[DepPkg].InstallVer != *I || List->IsNow(DepPkg) == false)
+		  continue;
+
+	       if (PkgLoop == true)
+	       {
+		  if (Debug)
+		     std::clog << OutputInDepth(Depth) << "Package " << Pkg << " loops in SmartConfigure" << std::endl;
+	          Bad = false;
+	       }
+	    }
+
+            if (Cur == End || Bad == false)
+	       break;
+         }
+
+         // this dependency is in a good state, so we can stop
+         if (Bad == false)
+         {
+            if (Debug)
+               std::clog << OutputInDepth(Depth) << "Found ok dep " << D.TargetPkg() << std::endl;
+            continue;
+         }
+
+	 // Check for dependencies that have not been unpacked, 
+         // probably due to loops.
+	 for (DepIterator Cur = Start; true; ++Cur)
+	 {
+	    SPtrArray<Version *> VList = Cur.AllTargets();
+
+	    for (Version **I = VList; *I != 0; ++I)
+	    {
+	       VerIterator Ver(Cache,*I);
+	       PkgIterator DepPkg = Ver.ParentPkg();
+
+	       // Check if the current version of the package is available and will satisfy this dependency
+	       if (DepPkg.CurrentVer() == Ver && List->IsNow(DepPkg) == true &&
+		   List->IsFlag(DepPkg,pkgOrderList::Removed) == false &&
+		   DepPkg.State() == PkgIterator::NeedsNothing)
+                  continue;
+
 	       // Check if the version that is going to be installed will satisfy the dependency
 	       if (Cache[DepPkg].InstallVer != *I || List->IsNow(DepPkg) == false)
 		  continue;
@@ -420,6 +464,8 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
 		  if (NonLoopingSmart(UNPACK_IMMEDIATE, Pkg, DepPkg, Depth, PkgLoop, &Bad, &Changed) == false)
 		     return false;
 	       }
+               // at this point we either unpacked a Dep or we are in a loop,
+               // no need to unpack a second one
 	       break;
 	    }
 
@@ -436,6 +482,7 @@ bool pkgPackageManager::SmartConfigure(PkgIterator Pkg, int const Depth)
          return _error->Error("Internal error: MaxLoopCount reached in SmartUnPack (1) for %s, aborting", Pkg.FullName().c_str());
    } while (Changed == true);
 
+   // now go over anything that needs configuring
    Bad = false, Changed = false, i = 0;
    do
    {

+ 2 - 2
apt-private/private-output.cc

@@ -220,7 +220,7 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,	/*{{{*/
       output = SubstVar(output, "${Version}", GetVersion(CacheFile, V));
       output = SubstVar(output, "${Description}", GetShortDescription(CacheFile, records, P));
       output = SubstVar(output, "${Origin}", GetArchiveSuite(CacheFile, V));
-      out << output << std::endl;
+      out << output;
    } else {
       // raring/linux-kernel version [upradable: new-version]
       //    description
@@ -229,7 +229,7 @@ void ListSingleVersion(pkgCacheFile &CacheFile, pkgRecords &records,	/*{{{*/
       std::string CandidateVerStr = GetCandidateVersion(CacheFile, P);
       std::string InstalledVerStr = GetInstalledVersion(CacheFile, P);
       std::string StatusStr;
-      if(P.CurrentVer() == V && state.Upgradable() && state.CandidateVer != NULL)
+      if(P.CurrentVer() == V && state.Upgradable())
       {
          strprintf(StatusStr, _("[installed,upgradable to: %s]"),
                    CandidateVerStr.c_str());

+ 3 - 2
buildlib/docbook.mak

@@ -13,6 +13,7 @@
 LOCAL := docbook-$(firstword $(SOURCE))
 $(LOCAL)-HTML := $(addsuffix .html,$(addprefix $(DOC)/,$(basename $(SOURCE))))
 $(LOCAL)-TEXT := $(addsuffix .text,$(addprefix $(DOC)/,$(basename $(SOURCE))))
+INCLUDES = apt.ent apt-verbatim.ent apt-vendor.ent
 
 docbook:
 
@@ -30,7 +31,7 @@ veryclean: veryclean/html/$(LOCAL)
 
 vpath %.dbk $(SUBDIRS)
 vpath $(DOCBOOK_HTML_STYLESHEET) $(SUBDIRS)
-$(DOC)/%.html: %.dbk $(DOCBOOK_HTML_STYLESHEET)
+$(DOC)/%.html: %.dbk $(DOCBOOK_HTML_STYLESHEET) $(INCLUDES)
 	echo Creating html for $< to $@
 	-rm -rf $@
 	mkdir -p $@
@@ -59,7 +60,7 @@ veryclean: veryclean/text/$(LOCAL)
 
 vpath %.dbk $(SUBDIRS)
 vpath $(DOCBOOK_TEXT_STYLESHEET) $(SUBDIRS)
-$(DOC)/%.text: %.dbk $(DOCBOOK_TEXT_STYLESHEET)
+$(DOC)/%.text: %.dbk $(DOCBOOK_TEXT_STYLESHEET) $(INCLUDES)
 	echo Creating text for $< to $@
 	$(DOCBOOK) \
 		--stringparam l10n.gentext.default.language $(LC) \

+ 3 - 2
cmdline/apt-cache.cc

@@ -1330,8 +1330,8 @@ static bool Search(CommandLine &CmdL)
    ExDescFile *DFList = new ExDescFile[descCount];
    memset(DFList,0,sizeof(*DFList) * descCount);
 
-   bool PatternMatch[descCount * NumPatterns];
-   memset(PatternMatch,false,sizeof(PatternMatch));
+   bool *PatternMatch = new bool[descCount * NumPatterns];
+   memset(PatternMatch,false,sizeof(*PatternMatch) * descCount * NumPatterns);
 
    // Map versions that we want to write out onto the VerList array.
    for (pkgCache::GrpIterator G = Cache->GrpBegin(); G.end() == false; ++G)
@@ -1441,6 +1441,7 @@ static bool Search(CommandLine &CmdL)
    }
    
    delete [] DFList;
+   delete [] PatternMatch;
    for (unsigned I = 0; I != NumPatterns; I++)
       regfree(&Patterns[I]);
    if (ferror(stdout))

+ 17 - 16
cmdline/apt-get.cc

@@ -955,18 +955,19 @@ static bool DoSource(CommandLine &CmdL)
 	 else
 	 {
 	    // Call dpkg-source
-	    char S[500];
-	    snprintf(S,sizeof(S),"%s -x %s",
+	    std::string const sourceopts = _config->Find("DPkg::Source-Options", "-x");
+	    std::string S;
+	    strprintf(S, "%s %s %s",
 		     _config->Find("Dir::Bin::dpkg-source","dpkg-source").c_str(),
-		     Dsc[I].Dsc.c_str());
-	    if (system(S) != 0)
+		     sourceopts.c_str(), Dsc[I].Dsc.c_str());
+	    if (system(S.c_str()) != 0)
 	    {
-	       fprintf(stderr,_("Unpack command '%s' failed.\n"),S);
-	       fprintf(stderr,_("Check if the 'dpkg-dev' package is installed.\n"));
+	       fprintf(stderr, _("Unpack command '%s' failed.\n"), S.c_str());
+	       fprintf(stderr, _("Check if the 'dpkg-dev' package is installed.\n"));
 	       _exit(1);
-	    }	    
+	    }
 	 }
-	 
+
 	 // Try to compile it with dpkg-buildpackage
 	 if (_config->FindB("APT::Get::Compile",false) == true)
 	 {
@@ -982,20 +983,20 @@ static bool DoSource(CommandLine &CmdL)
 	    buildopts.append(_config->Find("DPkg::Build-Options","-b -uc"));
 
 	    // Call dpkg-buildpackage
-	    char S[500];
-	    snprintf(S,sizeof(S),"cd %s && %s %s",
+	    std::string S;
+	    strprintf(S, "cd %s && %s %s",
 		     Dir.c_str(),
 		     _config->Find("Dir::Bin::dpkg-buildpackage","dpkg-buildpackage").c_str(),
 		     buildopts.c_str());
-	    
-	    if (system(S) != 0)
+
+	    if (system(S.c_str()) != 0)
 	    {
-	       fprintf(stderr,_("Build command '%s' failed.\n"),S);
+	       fprintf(stderr, _("Build command '%s' failed.\n"), S.c_str());
 	       _exit(1);
-	    }	    
-	 }      
+	    }
+	 }
       }
-      
+
       _exit(0);
    }
 

+ 16 - 0
cmdline/apt-helper.cc

@@ -16,6 +16,7 @@
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/acquire.h>
 #include <apt-pkg/acquire-item.h>
+#include <apt-pkg/proxy.h>
 
 #include <apt-private/acqprogress.h>
 #include <apt-private/private-output.h>
@@ -29,6 +30,19 @@
 #include <apti18n.h>
 									/*}}}*/
 
+static bool DoAutoDetectProxy(CommandLine &CmdL)
+{
+   if (CmdL.FileSize() != 2)
+      return _error->Error(_("Need one URL as argument"));
+   URI ServerURL(CmdL.FileList[1]);
+   AutoDetectProxy(ServerURL);
+   std::string SpecificProxy = _config->Find("Acquire::"+ServerURL.Access+"::Proxy::" + ServerURL.Host);
+   ioprintf(std::cout, "Using proxy '%s' for URL '%s'\n",
+            SpecificProxy.c_str(), std::string(ServerURL).c_str());
+
+   return true;
+}
+
 static bool DoDownloadFile(CommandLine &CmdL)
 {
    if (CmdL.FileSize() <= 2)
@@ -70,6 +84,7 @@ static bool ShowHelp(CommandLine &)
       "\n"
       "Commands:\n"
       "   download-file - download the given uri to the target-path\n"
+      "   auto-detect-proxy - detect proxy using apt.conf\n"
       "\n"
       "                       This APT helper has Super Meep Powers.\n");
    return true;
@@ -80,6 +95,7 @@ int main(int argc,const char *argv[])					/*{{{*/
 {
    CommandLine::Dispatch Cmds[] = {{"help",&ShowHelp},
 				   {"download-file", &DoDownloadFile},
+				   {"auto-detect-proxy", &DoAutoDetectProxy},
                                    {0,0}};
 
    std::vector<CommandLine::Args> Args = getCommandArgs(

+ 33 - 0
debian/changelog

@@ -68,6 +68,39 @@ apt (1.1~exp1) experimental; urgency=low
 
  -- Michael Vogt <mvo@debian.org>  Thu, 19 Jun 2014 12:01:48 +0200
 
+apt (1.0.7) unstable; urgency=medium
+
+  [ Michael Vogt ]
+  * add REAMDE.md
+  * StringToBool: only act if the entire string is consumed by strtol()
+  * Use @builddeps@ in the debian/tests/control file
+  * apt-pkg/acquire-item.cc: make pkgAcqDiffIndex more uniform
+  * Fix SmartConfigure to ignore ordering of packages that are already valid
+  * doc/apt.8.xml: fix typo, thanks to Jakub Wilk (Closes: #756056)
+  * doc/po/pt.po: updated, thanks to Américo Monteir (Closes: #756200)
+
+  [ victory ]
+  * Update Japanese documentation translation (Closes: #754817)
+
+  [ Trần Ngọc Quân ]
+  * l10n: vi.po (636t): Update one new string
+
+  [ Julian Andres Klode ]
+  * Fix debListParser to accept "no" as a value for the Multi-Arch field
+    (Closes: #759099)
+
+  [ Mert Dirik ]
+  * Turkish program translation update (Closes: 756710)
+
+  [ Miroslav Kure ]
+  * Czech program translation update (Closes: 758208)
+
+  [ David Kalnischkies ]
+  * add dpkg::source-options for dpkg-source invocation (Closes: 757534)
+  * support versioned provides as implemented by dpkg (Closes: 758153)
+
+ -- Michael Vogt <mvo@debian.org>  Wed, 27 Aug 2014 17:11:42 -0700
+
 apt (1.0.6) unstable; urgency=medium
 
   [ Chris Leick ]

+ 1 - 1
debian/tests/control

@@ -1,3 +1,3 @@
 Tests: run-tests
 Restrictions: allow-stderr 
-Depends: @, build-essential, fakeroot, wget, dpkg-dev, debhelper, libdb-dev, gettext, libcurl4-gnutls-dev, zlib1g-dev, libbz2-dev, xsltproc, docbook-xsl, docbook-xml, po4a, autotools-dev, autoconf, automake, doxygen, stunnel4, libdb-dev, db-util
+Depends: @, @builddeps@, fakeroot, wget, stunnel4, db-util

+ 3 - 1
debian/tests/run-tests

@@ -8,7 +8,9 @@ if [ ! -e environment.mak ]; then
 fi
 make -C test/interactive-helper/
 
-# run against the installed apt
+# run tests against the installed apt, use "env -i" to ensure
+# the host env does not pollute our environment
+env -i \
 APT_INTEGRATION_TESTS_WEBSERVER_BIN_DIR=$(pwd)/build/bin \
 APT_INTEGRATION_TESTS_METHODS_DIR=/usr/lib/apt/methods \
 APT_INTEGRATION_TESTS_LIBEXEC_DIR=/usr/lib/apt/ \

+ 0 - 171
doc/Bugs

@@ -1,174 +0,0 @@
-#24000: Bug in apt Version: 0.0.17-1bo0
- Summary: Couldn't locate an archive source for a package
- Status: Require Status file. 
-#24717: apt dies early if one postinst/preinst dies
- Status: Requires dpkg modifications
-#25104: APT should retry failed downloads
- Summary: FTP method has problems with busy servers
- Status: The 0.3.0 ftp method should probably use the configuration mechanism
-         to control this desired behavoir.
-#25176: Problem with FTP/firewall
-#25458: Problem with FTP/firewall
- Summary: FTP method has no controls for firewalls
- Status: The 0.3.0 ftp method should probably use the configuration mechanism
-         to control this desired behavoir.
- 
-#25026: apt: Why do you list the packages you're _not_ doing anything to instead of the ones you are?
-#22507: apt: apt-get - listing packages to be upgraded (wishlist)
- Summary: Feature request 
- Status: Fixed in 0.3.0 via the -u option
-#21113: [Apt] In dselect, update dies and exits if the packages file is not found.
- Status: Fixed in 0.3.0
-#22675: APT does not honor the --admin-dir option
-#22836: Disk/Zip-Method for apt?
- Summary: APT does not provide a way to download packages onto a 
-          removable media for another computer
- Status: 0.3.0 has substantially better support for this to the point
-         that it is doable by using a separate configuration file and
-	 the -c option
-#27601: srange errors from dselect
- Summary: Couldn't locate an archive source
- Status: Require status file
-         Believed to be fixed in 0.1.9, was not reproducible w/ given
-	 status file
-#27841: apt: apt depends on a missing library
- Status: New versions of APT in slink have been compiled with libstdc++2.9
-#23984: apt: support for "no_proxy" would be nice
- Status: Planned to be integrated into the new methods via the configuration
-         file
-	 Done - Use Acquire::http::proxy::host.com="DIRECT"
-#25021: apt: Need some control over multiple connections
- Status: Probable that 0.3.x will have support for configuing some
-         parameters
-	 Done - Use Acquire::Queue-Mode="access"
-#25019: apt: Confusing progress report
- Summary: Gripes about the progress meter
- Status: I do not intend to implement very many of these ideas in apt-get. 
-         The GUI will naturally be better
-	 I think the new progress meter address basically everyone's 
-	 concerns.
-#25022: apt: Lack of feedback on date checking
- Summary: Wants to know what package files were not updated
- Status: There is no place for this in the current apt-get design,
-         probably won't make the GUI either.
-	 Wee, the new acquire code allows this, it now prints out 'Hit'
-#26019: apt may report wrong line speed
-#26433: apt: claims to fetch things it doesn't actually fetch (wishlist)
-#28778: apt: apt's fetched message is wrong for update of packages files
- Summary: APT includes the fetch time from the local cache in its
-          calculations
- Status: Probably will be fixed with new acquire code
-         And it actually was fixed with the new acquire code
-#26670: apt: apt-get dumps core after checking integrity
- Summary: Some terminal environments cause APT to crash
-          Win95 telnet and emacs term-in-a-buffer are two at least
- Status: I have no idea why.
-         Seems to be gone in .3, whatever it was...
-#25001: apt: cleaned out archive even though not all files were installed
- Status: Apparently in some cases APT can return a success code even 
-         though it failed. I'm paying very close attention to this in
-	 0.3.x. Not to mention that the clean behavior will be 
-	 configurable..
-#28391: apt-get install without upgrading
- Summary: Make install leave the package in the keep state if it is already
-          installed
- Status: Will be implemented in 0.3.0
-	 Try the --no-upgrade options
-#28373: apt package is missing information on ftp.conf
-#29293: apt: Docs reference apt(8) but apt(8) not provided.
- Summary: The man pages have references to several non-existent items,
-          ftp.conf is only one of them.
- Status: Fix the man pages. This certainly will be done in 0.3.0
-#24799: Some suggestions for the apt method in dselect
- Summary: Wants to be able to specifiy -d from dselect
- Status: Likely a APT_OPTIONS environment variable will be created, -d can
-         be put there.
-	 There is already an APT_CONFIG in 0.3, APT_OPTIONS may also 
-	 appear..
-	 Use Dselect::Options "-d" and others
-#29920: Wish for more verbosity on "has no installation candidate"
- Summary: More reports
- Status: Already fixed in .3
-#29382: apt: apt deletes packages after installation without any question
- Summary: Obvois.
- Status: Fixed in .3, use Dselect::Clean "prompt"
-#30027: apt: version comparison bug
- Summary: Version compare differs from dpkg
- Status: Fixed in all CVS versions.
-#30260: apt: wishlist: do not return to main menu without prompting for return
- Summary: Wants to prompt after dselect update
- Status: Fixed in v3, use dselect::promptafterupdate "true";
-#29441: documenting the codes for -s
- Summary: Apparently the simulation output is not immediately obvois
- Status: Someone should update the man page.
-#24685: HTTP Proxy cache refresh
- Summary: Some caches hold onto the package index file for too long
- Status: It may be possible to insert the proper header to disable
-         caching but I can't think how to do this while allowing
-	 the cache to return cached objects - in effect it would
-	 completely disable the cache which may not be desired.
-         APT now sends a max age header. See the apt.conf(5)
-#28172: HTTP Proxy cache refresh should be forced for corrupted packages
- Summary: Some problem resulted in a corrupted package
- Status: I believe this reflects a deeper problem and the suggested solution
-         is only a band-aide patch. I intend to close this bug when #24685
-	 is fixed with a configuration directive.
-	 Use -o acquire::http::no-cache=true
-#29351: poor error message after conffile update
- Summary: APT errors when the package file is not found
- Status: The new APT warns better and the error is not fatal
-#30112: apt: internal error in apt
- Summary: APT gives an unclear error when it cannot correct dependencies
- Status: Error is clearer
-#30324: apt-get lying about file dates in /var/state/apt/lists
- Summary: Doesn't copy the file dates right with file URIs
- Status: Fixed in v3
-#30383: apt: dist-upgrade msg "E: Internal error, ScoredFix generated breaks."
- Summary: libc6 maddness causes bizzar problems
- Status: Fixed in v3 
-#29983: apt: Wrong diagnostic, could be better
- Summary: It doesn't explicy say you should be root
- Status: Fixed in v3
-#22892: Apt improvements
- Summary: Bails if an index file can't be found
- Status: Fixed in v3
-#28184: apt could be smarter regarding mirrors
- Summary: Make use of redundant sources
- Status: 0.3.0 will likely do this, already the information for it is stored.
-#27646: Apt: dpkg --merge-avail
- Summary: Suggestion to call merge avail after each update operation
- Status: Unlikely. The dpkg --print-avail functions should be obsoleted
-         by the apt-query program which should be written.
-         Use the dselect script, alias or something.
-#26663: rsync file access
- Status: Unlikely, rsync does not provide the necessary support to be
-         a terribly good method. I do not intend any 'split mode' 
-	 support (ie a way to get Package files via rsync and .debs
-	 via http) 
-#27100: apt: Better support for project/experimental
- Status: GUI Feature - Version selection and pinning
-         Honors the NotAutomatic flag
-#30643: base: apt-get update problems with http-/ftp-caches (i.e. squid)
- Status: Fixed as best I can. Try the Acquire::http::No-Cache option.
-
-#26592: apt: Problems with ftpd in SunOS 5.6
-#29903: apt-get insists onto sending a SIZE command
- Summary: SunOS ftpd does not support the SIZE command
- Status: Probably not worth fixing
-#20723: Apt suggestion
- Summary: Package Grouping Mechanism
- Status: Who knows
-#22550: apt-get upgrade could configure packages earlier
- Status: Who knows
-#23934: apt-get source <package>
-#27190: apt: installing source packages (wishlist)
- Status: Impossible to do without an index file for all source archives.
-#22551: apt: wish: use dist X iff pkg does not exist in dist Y
- Status: GUI Feature - Version selection and pinning
-#30237: apt: 0.1.9 checks dependencies against packages.gz
- Summary: For packages with identical version numbers APT prefers
-          to use the archive index files
- Status: Yes it is sorta bad, but there is no reasonable solution.

+ 3 - 9
doc/apt-cache.8.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt-cdrom.8.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt-config.8.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt-extracttemplates.1.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt-ftparchive.1.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt-get.8.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt-key.8.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt-mark.8.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt-secure.8.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt-sortpkgs.1.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 1 - 1
doc/apt-verbatim.ent

@@ -225,7 +225,7 @@
 ">
 
 <!-- this will be updated by 'prepare-release' -->
-<!ENTITY apt-product-version "1.1~exp2">
+<!ENTITY apt-product-version "1.0.7">
 
 <!-- (Code)names for various things used all over the place -->
 <!ENTITY oldstable-codename "squeeze">

+ 5 - 9
doc/apt.8.xml

@@ -1,13 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>
@@ -105,8 +101,8 @@
      <listitem><para><literal>upgrade</literal> is used to install the
      newest versions of all packages currently installed on the system
      from the sources enumerated in
-     <filename>/etc/apt/sources.list</filename>. New package will be
-     installed, but existing package will never removed.
+     <filename>/etc/apt/sources.list</filename>. New packages will be
+     installed, but existing packages will never be removed.
      </para></listitem>
      </varlistentry>
 

+ 3 - 9
doc/apt.conf.5.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 3 - 9
doc/apt_preferences.5.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 2 - 1
doc/design.dbk

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- -*- DocBook -*- -->
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
 <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <book lang="en">

+ 2 - 1
doc/dpkg-tech.dbk

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- -*- DocBook -*- -->
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
 <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <book lang="en">

+ 2 - 1
doc/files.dbk

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- -*- DocBook -*- -->
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
 <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <book lang="en">

+ 2 - 1
doc/guide.dbk

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- -*- DocBook -*- -->
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
 <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <book lang="en">

+ 1 - 1
doc/makefile

@@ -29,7 +29,7 @@ include $(COPY_H)
 clean: clean/subdirs clean/examples
 veryclean: veryclean/subdirs clean/examples
 manpages: apt-vendor.ent manpages/subdirs
-docbook: docbook/subdirs
+docbook: apt-vendor.ent docbook/subdirs
 
 DOCUMENTATIONPO = $(patsubst %.po,%,$(notdir $(wildcard po/*.po)))
 DOCDIRLIST = $(addsuffix /makefile,$(DOCUMENTATIONPO))

+ 2 - 1
doc/method.dbk

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- -*- DocBook -*- -->
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
 <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <book lang="en">

+ 2 - 1
doc/offline.dbk

@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<!-- -*- DocBook -*- -->
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
 <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <book lang="en">

File diff suppressed because it is too large
+ 791 - 791
doc/po/apt-doc.pot


File diff suppressed because it is too large
+ 821 - 824
doc/po/de.po


File diff suppressed because it is too large
+ 815 - 824
doc/po/es.po


File diff suppressed because it is too large
+ 815 - 824
doc/po/fr.po


File diff suppressed because it is too large
+ 815 - 824
doc/po/it.po


File diff suppressed because it is too large
+ 1326 - 1193
doc/po/ja.po


File diff suppressed because it is too large
+ 811 - 811
doc/po/pl.po


File diff suppressed because it is too large
+ 996 - 1491
doc/po/pt.po


File diff suppressed because it is too large
+ 811 - 811
doc/po/pt_BR.po


+ 3 - 9
doc/sources.list.5.xml

@@ -1,15 +1,9 @@
 <?xml version="1.0" encoding="utf-8" standalone="no"?>
 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
   "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
-
-<!ENTITY % aptent SYSTEM "apt.ent">
-%aptent;
-
-<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent">
-%aptverbatiment;
-
-<!ENTITY % aptvendor SYSTEM "apt-vendor.ent">
-%aptvendor;
+<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
+<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
+<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
 ]>
 
 <refentry>

+ 66 - 33
ftparchive/apt-ftparchive.cc

@@ -781,33 +781,14 @@ static bool SimpleGenRelease(CommandLine &CmdL)
 }
 
 									/*}}}*/
-// Generate - Full generate, using a config file			/*{{{*/
+// DoGeneratePackagesAndSources - Helper for Generate                   /*{{{*/
 // ---------------------------------------------------------------------
-/* */
-static bool Generate(CommandLine &CmdL)
+static bool DoGeneratePackagesAndSources(Configuration &Setup,
+					 vector<PackageMap> &PkgList,
+					 struct CacheDB::Stats &SrcStats,
+					 struct CacheDB::Stats &Stats,
+					 CommandLine &CmdL)
 {
-   struct CacheDB::Stats SrcStats;
-   if (CmdL.FileSize() < 2)
-      return ShowHelp(CmdL);
-
-   struct timeval StartTime;
-   gettimeofday(&StartTime,0);   
-   struct CacheDB::Stats Stats;
-   
-   // Read the configuration file.
-   Configuration Setup;
-   if (ReadConfigFile(Setup,CmdL.FileList[1],true) == false)
-      return false;
-
-   vector<PackageMap> PkgList;
-   LoadTree(PkgList,Setup);
-   LoadBinDir(PkgList,Setup);
-
-   // Sort by cache DB to improve IO locality.
-   stable_sort(PkgList.begin(),PkgList.end(),PackageMap::DBCompare());
-   stable_sort(PkgList.begin(),PkgList.end(),PackageMap::SrcDBCompare());
-		
-   // Generate packages
    if (CmdL.FileSize() <= 2)
    {
       for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); ++I)
@@ -876,9 +857,16 @@ static bool Generate(CommandLine &CmdL)
       if (I->TransWriter != NULL && I->TransWriter->DecreaseRefCounter() == 0)
 	 delete I->TransWriter;
 
-   if (_config->FindB("APT::FTPArchive::Contents",true) == false)
-      return true;
-   
+   return true;
+}
+
+                                                                        /*}}}*/
+// DoGenerateContents - Helper for Generate to generate the Contents    /*{{{*/
+// ---------------------------------------------------------------------
+static bool DoGenerateContents(Configuration &Setup,
+			       vector<PackageMap> &PkgList,
+			       CommandLine &CmdL)
+{
    c1out << "Packages done, Starting contents." << endl;
 
    // Sort the contents file list by date
@@ -935,17 +923,62 @@ static bool Generate(CommandLine &CmdL)
 	 break;
       }      
    }
+
+   return true;
+}
+
+									/*}}}*/
+// Generate - Full generate, using a config file			/*{{{*/
+// ---------------------------------------------------------------------
+/* */
+static bool Generate(CommandLine &CmdL)
+{
+   struct CacheDB::Stats SrcStats;
+   if (CmdL.FileSize() < 2)
+      return ShowHelp(CmdL);
+
+   struct timeval StartTime;
+   gettimeofday(&StartTime,0);
+   struct CacheDB::Stats Stats;
    
+   // Read the configuration file.
+   Configuration Setup;
+   if (ReadConfigFile(Setup,CmdL.FileList[1],true) == false)
+      return false;
+
+   vector<PackageMap> PkgList;
+   LoadTree(PkgList,Setup);
+   LoadBinDir(PkgList,Setup);
+
+   // Sort by cache DB to improve IO locality.
+   stable_sort(PkgList.begin(),PkgList.end(),PackageMap::DBCompare());
+   stable_sort(PkgList.begin(),PkgList.end(),PackageMap::SrcDBCompare());
+
+   // Generate packages
+   if (_config->FindB("APT::FTPArchive::ContentsOnly", false) == false)
+   {
+      if(DoGeneratePackagesAndSources(Setup, PkgList, SrcStats, Stats, CmdL) == false)
+         return false;
+   } else {
+      c1out << "Skipping Packages/Sources generation" << endl;
+   }
+
+   // do Contents if needed
+   if (_config->FindB("APT::FTPArchive::Contents", true) == true)
+      if (DoGenerateContents(Setup, PkgList, CmdL) == false)
+         return false;
+
    struct timeval NewTime;
-   gettimeofday(&NewTime,0);   
-   double Delta = NewTime.tv_sec - StartTime.tv_sec + 
+   gettimeofday(&NewTime,0);
+   double Delta = NewTime.tv_sec - StartTime.tv_sec +
                   (NewTime.tv_usec - StartTime.tv_usec)/1000000.0;
-   c1out << "Done. " << SizeToStr(Stats.Bytes) << "B in " << Stats.Packages 
+   c1out << "Done. " << SizeToStr(Stats.Bytes) << "B in " << Stats.Packages
          << " archives. Took " << TimeToStr((long)Delta) << endl;
-   
+
    return true;
 }
-									/*}}}*/
+
+                                                                        /*}}}*/
 // Clean - Clean out the databases					/*{{{*/
 // ---------------------------------------------------------------------
 /* */

+ 2 - 60
methods/http.cc

@@ -34,6 +34,7 @@
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/netrc.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/proxy.h>
 
 #include <stddef.h>
 #include <stdlib.h>
@@ -304,6 +305,7 @@ bool HttpServerState::Open()
    Persistent = true;
    
    // Determine the proxy setting
+   AutoDetectProxy(ServerName);
    string SpecificProxy = _config->Find("Acquire::http::Proxy::" + ServerName.Host);
    if (!SpecificProxy.empty())
    {
@@ -762,66 +764,6 @@ bool HttpMethod::Configuration(string Message)
 				  PipelineDepth);
    Debug = _config->FindB("Debug::Acquire::http",false);
 
-   // Get the proxy to use
-   AutoDetectProxy();
-
-   return true;
-}
-									/*}}}*/
-// HttpMethod::AutoDetectProxy - auto detect proxy			/*{{{*/
-// ---------------------------------------------------------------------
-/* */
-bool HttpMethod::AutoDetectProxy()
-{
-   // option is "Acquire::http::Proxy-Auto-Detect" but we allow the old
-   // name without the dash ("-")
-   AutoDetectProxyCmd = _config->Find("Acquire::http::Proxy-Auto-Detect",
-                                      _config->Find("Acquire::http::ProxyAutoDetect"));
-
-   if (AutoDetectProxyCmd.empty())
-      return true;
-
-   if (Debug)
-      clog << "Using auto proxy detect command: " << AutoDetectProxyCmd << endl;
-
-   int Pipes[2] = {-1,-1};
-   if (pipe(Pipes) != 0)
-      return _error->Errno("pipe", "Failed to create Pipe");
-
-   pid_t Process = ExecFork();
-   if (Process == 0)
-   {
-      close(Pipes[0]);
-      dup2(Pipes[1],STDOUT_FILENO);
-      SetCloseExec(STDOUT_FILENO,false);
-
-      const char *Args[2];
-      Args[0] = AutoDetectProxyCmd.c_str();
-      Args[1] = 0;
-      execv(Args[0],(char **)Args);
-      cerr << "Failed to exec method " << Args[0] << endl;
-      _exit(100);
-   }
-   char buf[512];
-   int InFd = Pipes[0];
-   close(Pipes[1]);
-   int res = read(InFd, buf, sizeof(buf)-1);
-   ExecWait(Process, "ProxyAutoDetect", true);
-
-   if (res < 0)
-      return _error->Errno("read", "Failed to read");
-   if (res == 0)
-      return _error->Warning("ProxyAutoDetect returned no data");
-
-   // add trailing \0
-   buf[res] = 0;
-
-   if (Debug)
-      clog << "auto detect command returned: '" << buf << "'" << endl;
-
-   if (strstr(buf, "http://") == buf)
-      _config->Set("Acquire::http::proxy", _strstrip(buf));
-
    return true;
 }
 									/*}}}*/

+ 0 - 3
methods/http.h

@@ -124,9 +124,6 @@ class HttpMethod : public ServerMethod
    public:
    virtual void SendReq(FetchItem *Itm);
 
-   /** \brief Try to AutoDetect the proxy */
-   bool AutoDetectProxy();
-
    virtual bool Configuration(std::string Message);
 
    virtual ServerState * CreateServerState(URI uri);

+ 4 - 0
methods/https.cc

@@ -20,6 +20,7 @@
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/macros.h>
 #include <apt-pkg/strutl.h>
+#include <apt-pkg/proxy.h>
 
 #include <sys/stat.h>
 #include <sys/time.h>
@@ -107,6 +108,9 @@ void HttpsMethod::SetupProxy()  					/*{{{*/
 {
    URI ServerName = Queue->Uri;
 
+   // Determine the proxy setting
+   AutoDetectProxy(ServerName);
+
    // Curl should never read proxy settings from the environment, as
    // we determine which proxy to use.  Do this for consistency among
    // methods and prevent an environment variable overriding a

File diff suppressed because it is too large
+ 2229 - 2246
po/ar.po


File diff suppressed because it is too large
+ 2536 - 2553
po/ast.po


File diff suppressed because it is too large
+ 2563 - 2580
po/bg.po


File diff suppressed because it is too large
+ 2049 - 2066
po/bs.po


File diff suppressed because it is too large
+ 2560 - 2577
po/ca.po


File diff suppressed because it is too large
+ 2596 - 2586
po/cs.po


File diff suppressed because it is too large
+ 2541 - 2558
po/cy.po


File diff suppressed because it is too large
+ 2566 - 2583
po/da.po


File diff suppressed because it is too large
+ 2669 - 2644
po/de.po


File diff suppressed because it is too large
+ 2507 - 2524
po/dz.po


File diff suppressed because it is too large
+ 2510 - 2527
po/el.po


File diff suppressed because it is too large
+ 2575 - 2592
po/es.po


File diff suppressed because it is too large
+ 2516 - 2533
po/eu.po


File diff suppressed because it is too large
+ 2510 - 2527
po/fi.po


File diff suppressed because it is too large
+ 2656 - 2673
po/fr.po


File diff suppressed because it is too large
+ 2569 - 2586
po/gl.po


File diff suppressed because it is too large
+ 2554 - 2571
po/hu.po


File diff suppressed because it is too large
+ 2658 - 2675
po/it.po


File diff suppressed because it is too large
+ 2619 - 2636
po/ja.po


File diff suppressed because it is too large
+ 2498 - 2515
po/km.po


File diff suppressed because it is too large
+ 2514 - 2531
po/ko.po


File diff suppressed because it is too large
+ 2106 - 2123
po/ku.po


File diff suppressed because it is too large
+ 2259 - 2276
po/lt.po


File diff suppressed because it is too large
+ 2499 - 2516
po/mr.po


File diff suppressed because it is too large
+ 2530 - 2547
po/nb.po


File diff suppressed because it is too large
+ 2491 - 2508
po/ne.po


File diff suppressed because it is too large
+ 2567 - 2584
po/nl.po


File diff suppressed because it is too large
+ 2493 - 2510
po/nn.po


File diff suppressed because it is too large
+ 2614 - 2631
po/pl.po


File diff suppressed because it is too large
+ 2588 - 2605
po/pt.po


File diff suppressed because it is too large
+ 2529 - 2546
po/pt_BR.po


File diff suppressed because it is too large
+ 2524 - 2541
po/ro.po


File diff suppressed because it is too large
+ 2595 - 2612
po/ru.po


File diff suppressed because it is too large
+ 2556 - 2573
po/sk.po


File diff suppressed because it is too large
+ 2547 - 2564
po/sl.po


File diff suppressed because it is too large
+ 2558 - 2575
po/sv.po


File diff suppressed because it is too large
+ 2524 - 2541
po/th.po


File diff suppressed because it is too large
+ 2504 - 2521
po/tl.po


File diff suppressed because it is too large
+ 2614 - 2590
po/tr.po


File diff suppressed because it is too large
+ 2575 - 2592
po/uk.po


File diff suppressed because it is too large
+ 2626 - 2643
po/vi.po


File diff suppressed because it is too large
+ 2496 - 2513
po/zh_CN.po


File diff suppressed because it is too large
+ 2495 - 2512
po/zh_TW.po


+ 0 - 0
prepare-release


Some files were not shown because too many files changed in this diff