Pārlūkot izejas kodu

merge with lp:~mvo/apt/debian-sid : move all my ABI break changes
to the "new" 0.7.26 version

David Kalnischkies 16 gadi atpakaļ
vecāks
revīzija
f932cd7c75
31 mainītis faili ar 2641 papildinājumiem un 2697 dzēšanām
  1. 211 0
      apt-pkg/contrib/netrc.cc
  2. 29 0
      apt-pkg/contrib/netrc.h
  3. 1 0
      apt-pkg/deb/dpkgpm.cc
  4. 1 1
      apt-pkg/depcache.cc
  5. 3 3
      apt-pkg/indexcopy.cc
  6. 1 0
      apt-pkg/init.cc
  7. 1 1
      apt-pkg/init.h
  8. 3 3
      apt-pkg/makefile
  9. 10 0
      apt-pkg/packagemanager.cc
  10. 6 4
      buildlib/configure.mak
  11. 137 125
      cmdline/apt-get.cc
  12. 11 7
      cmdline/apt-key
  13. 1 0
      debian/apt.conf.autoremove
  14. 73 37
      debian/changelog
  15. 2 0
      doc/examples/configure-index
  16. 146 165
      doc/po/apt-doc.pot
  17. 139 139
      doc/po/de.po
  18. 143 139
      doc/po/es.po
  19. 144 255
      doc/po/fr.po
  20. 139 139
      doc/po/it.po
  21. 139 330
      doc/po/ja.po
  22. 139 139
      doc/po/pl.po
  23. 139 139
      doc/po/pt_BR.po
  24. 4 1
      methods/ftp.cc
  25. 5 2
      methods/http.cc
  26. 7 2
      methods/https.cc
  27. 2 0
      methods/https.h
  28. 154 134
      po/apt-all.pot
  29. 197 226
      po/it.po
  30. 225 252
      po/sk.po
  31. 429 454
      po/zh_CN.po

+ 211 - 0
apt-pkg/contrib/netrc.cc

@@ -0,0 +1,211 @@
+// -*- mode: cpp; mode: fold -*-
+// Description								/*{{{*/
+// $Id: netrc.c,v 1.38 2007-11-07 09:21:35 bagder Exp $
+/* ######################################################################
+
+   netrc file parser - returns the login and password of a give host in
+                       a specified netrc-type file
+
+   Originally written by Daniel Stenberg, <daniel@haxx.se>, et al. and
+   placed into the Public Domain, do with it what you will.
+
+   ##################################################################### */
+									/*}}}*/
+
+#include <apt-pkg/configuration.h>
+#include <apt-pkg/fileutl.h>
+#include <iostream>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <pwd.h>
+
+#include "netrc.h"
+
+
+/* Get user and password from .netrc when given a machine name */
+
+enum {
+  NOTHING,
+  HOSTFOUND,    /* the 'machine' keyword was found */
+  HOSTCOMPLETE, /* the machine name following the keyword was found too */
+  HOSTVALID,    /* this is "our" machine! */
+  HOSTEND /* LAST enum */
+};
+
+/* make sure we have room for at least this size: */
+#define LOGINSIZE 64
+#define PASSWORDSIZE 64
+#define NETRC DOT_CHAR "netrc"
+
+/* returns -1 on failure, 0 if the host is found, 1 is the host isn't found */
+int parsenetrc (char *host, char *login, char *password, char *netrcfile = NULL)
+{
+  FILE *file;
+  int retcode = 1;
+  int specific_login = (login[0] != 0);
+  char *home = NULL;
+  bool netrc_alloc = false;
+  int state = NOTHING;
+
+  char state_login = 0;        /* Found a login keyword */
+  char state_password = 0;     /* Found a password keyword */
+  int state_our_login = false;  /* With specific_login,
+                                   found *our* login name */
+
+  if (!netrcfile) {
+    home = getenv ("HOME"); /* portable environment reader */
+
+    if (!home) {
+      struct passwd *pw;
+      pw = getpwuid (geteuid ());
+      if(pw)
+        home = pw->pw_dir;
+    }
+
+    if (!home)
+      return -1;
+
+    asprintf (&netrcfile, "%s%s%s", home, DIR_CHAR, NETRC);
+    if(!netrcfile)
+      return -1;
+    else
+      netrc_alloc = true;
+  }
+
+  file = fopen (netrcfile, "r");
+  if(file) {
+    char *tok;
+    char *tok_buf;
+    bool done = false;
+    char netrcbuffer[256];
+
+    while (!done && fgets(netrcbuffer, sizeof (netrcbuffer), file)) {
+      tok = strtok_r (netrcbuffer, " \t\n", &tok_buf);
+      while (!done && tok) {
+        if(login[0] && password[0]) {
+          done = true;
+          break;
+        }
+
+        switch(state) {
+        case NOTHING:
+          if (!strcasecmp ("machine", tok)) {
+            /* the next tok is the machine name, this is in itself the
+               delimiter that starts the stuff entered for this machine,
+               after this we need to search for 'login' and
+               'password'. */
+            state = HOSTFOUND;
+          }
+          break;
+        case HOSTFOUND:
+	   /* extended definition of a "machine" if we have a "/"
+	      we match the start of the string (host.startswith(token) */
+	  if ((strchr(host, '/') && strstr(host, tok) == host) ||
+	      (!strcasecmp (host, tok))) {
+            /* and yes, this is our host! */
+            state = HOSTVALID;
+            retcode = 0; /* we did find our host */
+          }
+          else
+            /* not our host */
+            state = NOTHING;
+          break;
+        case HOSTVALID:
+          /* we are now parsing sub-keywords concerning "our" host */
+          if (state_login) {
+            if (specific_login)
+              state_our_login = !strcasecmp (login, tok);
+            else
+              strncpy (login, tok, LOGINSIZE - 1);
+            state_login = 0;
+          } else if (state_password) {
+            if (state_our_login || !specific_login)
+              strncpy (password, tok, PASSWORDSIZE - 1);
+            state_password = 0;
+          } else if (!strcasecmp ("login", tok))
+            state_login = 1;
+          else if (!strcasecmp ("password", tok))
+            state_password = 1;
+          else if(!strcasecmp ("machine", tok)) {
+            /* ok, there's machine here go => */
+            state = HOSTFOUND;
+            state_our_login = false;
+          }
+          break;
+        } /* switch (state) */
+
+        tok = strtok_r (NULL, " \t\n", &tok_buf);
+      } /* while(tok) */
+    } /* while fgets() */
+
+    fclose(file);
+  }
+
+  if (netrc_alloc)
+    free(netrcfile);
+
+  return retcode;
+}
+
+void maybe_add_auth (URI &Uri, string NetRCFile)
+{
+  if (_config->FindB("Debug::Acquire::netrc", false) == true)
+     std::clog << "maybe_add_auth: " << (string)Uri 
+	       << " " << NetRCFile << std::endl;
+  if (Uri.Password.empty () == true || Uri.User.empty () == true)
+  {
+    if (NetRCFile.empty () == false)
+    {
+      char login[64] = "";
+      char password[64] = "";
+      char *netrcfile = strdupa (NetRCFile.c_str ());
+
+      // first check for a generic host based netrc entry
+      char *host = strdupa (Uri.Host.c_str ());
+      if (host && parsenetrc (host, login, password, netrcfile) == 0)
+      {
+	 if (_config->FindB("Debug::Acquire::netrc", false) == true)
+	    std::clog << "host: " << host 
+		      << " user: " << login
+		      << " pass-size: " << strlen(password)
+		      << std::endl;
+        Uri.User = string (login);
+        Uri.Password = string (password);
+	return;
+      }
+
+      // if host did not work, try Host+Path next, this will trigger
+      // a lookup uri.startswith(host) in the netrc file parser (because
+      // of the "/"
+      char *hostpath = strdupa (string(Uri.Host+Uri.Path).c_str ());
+      if (hostpath && parsenetrc (hostpath, login, password, netrcfile) == 0)
+      {
+	 if (_config->FindB("Debug::Acquire::netrc", false) == true)
+	    std::clog << "hostpath: " << hostpath
+		      << " user: " << login
+		      << " pass-size: " << strlen(password)
+		      << std::endl;
+	 Uri.User = string (login);
+	 Uri.Password = string (password);
+	 return;
+      }
+    }
+  }
+}
+
+#ifdef DEBUG
+int main(int argc, char* argv[])
+{
+  char login[64] = "";
+  char password[64] = "";
+
+  if(argc < 2)
+    return -1;
+
+  if(0 == parsenetrc (argv[1], login, password, argv[2])) {
+    printf("HOST: %s LOGIN: %s PASSWORD: %s\n", argv[1], login, password);
+  }
+}
+#endif

+ 29 - 0
apt-pkg/contrib/netrc.h

@@ -0,0 +1,29 @@
+// -*- mode: cpp; mode: fold -*-
+// Description								/*{{{*/
+// $Id: netrc.h,v 1.11 2004/01/07 09:19:35 bagder Exp $
+/* ######################################################################
+
+   netrc file parser - returns the login and password of a give host in
+                       a specified netrc-type file
+
+   Originally written by Daniel Stenberg, <daniel@haxx.se>, et al. and
+   placed into the Public Domain, do with it what you will.
+
+   ##################################################################### */
+									/*}}}*/
+#ifndef NETRC_H
+#define NETRC_H
+
+#include <apt-pkg/strutl.h>
+
+#define DOT_CHAR "."
+#define DIR_CHAR "/"
+
+// Assume: password[0]=0, host[0] != 0.
+// If login[0] = 0, search for login and password within a machine section
+// in the netrc.
+// If login[0] != 0, search for password within machine and login.
+int parsenetrc (char *host, char *login, char *password, char *filename);
+
+void maybe_add_auth (URI &Uri, string NetRCFile);
+#endif

+ 1 - 0
apt-pkg/deb/dpkgpm.cc

@@ -49,6 +49,7 @@ namespace
     std::make_pair("install",   N_("Installing %s")),
     std::make_pair("install",   N_("Installing %s")),
     std::make_pair("configure", N_("Configuring %s")),
     std::make_pair("configure", N_("Configuring %s")),
     std::make_pair("remove",    N_("Removing %s")),
     std::make_pair("remove",    N_("Removing %s")),
+    std::make_pair("purge",    N_("Completely removing %s")),
     std::make_pair("trigproc",  N_("Running post-installation trigger %s"))
     std::make_pair("trigproc",  N_("Running post-installation trigger %s"))
   };
   };
 
 

+ 1 - 1
apt-pkg/depcache.cc

@@ -243,7 +243,7 @@ bool pkgDepCache::writeStateFile(OpProgress *prog, bool InstalledOnly)	/*{{{*/
 	    continue;
 	    continue;
 	 bool newAuto = (PkgState[pkg->ID].Flags & Flag::Auto);
 	 bool newAuto = (PkgState[pkg->ID].Flags & Flag::Auto);
 	 if(_config->FindB("Debug::pkgAutoRemove",false))
 	 if(_config->FindB("Debug::pkgAutoRemove",false))
-	    std::clog << "Update exisiting AutoInstall info: " 
+	    std::clog << "Update existing AutoInstall info: " 
 		      << pkg.Name() << std::endl;
 		      << pkg.Name() << std::endl;
 	 TFRewriteData rewrite[2];
 	 TFRewriteData rewrite[2];
 	 rewrite[0].Tag = "Auto-Installed";
 	 rewrite[0].Tag = "Auto-Installed";

+ 3 - 3
apt-pkg/indexcopy.cc

@@ -527,19 +527,19 @@ bool SigVerify::Verify(string prefix, string file, indexRecords *MetaIndex)
    // (non-existing files are not considered a error)
    // (non-existing files are not considered a error)
    if(!FileExists(prefix+file))
    if(!FileExists(prefix+file))
    {
    {
-      _error->Warning("Skipping non-exisiting file %s", string(prefix+file).c_str());
+      _error->Warning(_("Skipping nonexistent file %s"), string(prefix+file).c_str());
       return true;
       return true;
    }
    }
 
 
    if (!Record) 
    if (!Record) 
    {
    {
-      _error->Warning("Can't find authentication record for: %s",file.c_str());
+      _error->Warning(_("Can't find authentication record for: %s"), file.c_str());
       return false;
       return false;
    }
    }
 
 
    if (!Record->Hash.VerifyFile(prefix+file))
    if (!Record->Hash.VerifyFile(prefix+file))
    {
    {
-      _error->Warning("Hash mismatch for: %s",file.c_str());
+      _error->Warning(_("Hash mismatch for: %s"),file.c_str());
       return false;
       return false;
    }
    }
 
 

+ 1 - 0
apt-pkg/init.cc

@@ -65,6 +65,7 @@ bool pkgInitConfig(Configuration &Cnf)
    Cnf.Set("Dir::Etc::vendorlist","vendors.list");
    Cnf.Set("Dir::Etc::vendorlist","vendors.list");
    Cnf.Set("Dir::Etc::vendorparts","vendors.list.d");
    Cnf.Set("Dir::Etc::vendorparts","vendors.list.d");
    Cnf.Set("Dir::Etc::main","apt.conf");
    Cnf.Set("Dir::Etc::main","apt.conf");
+   Cnf.Set("Dir::ETc::netrc", "auth.conf");
    Cnf.Set("Dir::Etc::parts","apt.conf.d");
    Cnf.Set("Dir::Etc::parts","apt.conf.d");
    Cnf.Set("Dir::Etc::preferences","preferences");
    Cnf.Set("Dir::Etc::preferences","preferences");
    Cnf.Set("Dir::Etc::preferencesparts","preferences.d");
    Cnf.Set("Dir::Etc::preferencesparts","preferences.d");

+ 1 - 1
apt-pkg/init.h

@@ -22,7 +22,7 @@
 // Non-ABI-Breaks should only increase RELEASE number.
 // Non-ABI-Breaks should only increase RELEASE number.
 // See also buildlib/libversion.mak
 // See also buildlib/libversion.mak
 #define APT_PKG_MAJOR 4
 #define APT_PKG_MAJOR 4
-#define APT_PKG_MINOR 9
+#define APT_PKG_MINOR 8
 #define APT_PKG_RELEASE 0
 #define APT_PKG_RELEASE 0
     
     
 extern const char *pkgVersion;
 extern const char *pkgVersion;

+ 3 - 3
apt-pkg/makefile

@@ -21,10 +21,10 @@ APT_DOMAIN:=libapt-pkg$(LIBAPTPKG_MAJOR)
 SOURCE = contrib/mmap.cc contrib/error.cc contrib/strutl.cc \
 SOURCE = contrib/mmap.cc contrib/error.cc contrib/strutl.cc \
          contrib/configuration.cc contrib/progress.cc contrib/cmndline.cc \
          contrib/configuration.cc contrib/progress.cc contrib/cmndline.cc \
 	 contrib/md5.cc contrib/sha1.cc contrib/sha256.cc contrib/hashes.cc \
 	 contrib/md5.cc contrib/sha1.cc contrib/sha256.cc contrib/hashes.cc \
-	 contrib/cdromutl.cc contrib/crc-16.cc \
+	 contrib/cdromutl.cc contrib/crc-16.cc contrib/netrc.cc \
 	 contrib/fileutl.cc 
 	 contrib/fileutl.cc 
-HEADERS = mmap.h error.h configuration.h fileutl.h  cmndline.h \
-	  md5.h crc-16.h cdromutl.h strutl.h sptr.h sha1.h sha256.h hashes.h
+HEADERS = mmap.h error.h configuration.h fileutl.h  cmndline.h netrc.h\
+	  md5.h crc-16.h cdromutl.h strutl.h sptr.h sha1.h sha256.h hashes.h 
 
 
 # Source code for the core main library
 # Source code for the core main library
 SOURCE+= pkgcache.cc version.cc depcache.cc \
 SOURCE+= pkgcache.cc version.cc depcache.cc \

+ 10 - 0
apt-pkg/packagemanager.cc

@@ -293,6 +293,9 @@ bool pkgPackageManager::ConfigureAll()
    of it's dependents. */
    of it's dependents. */
 bool pkgPackageManager::SmartConfigure(PkgIterator Pkg)
 bool pkgPackageManager::SmartConfigure(PkgIterator Pkg)
 {
 {
+   if (Debug == true)
+      clog << "SmartConfigure " << Pkg.Name() << endl;
+
    pkgOrderList OList(&Cache);
    pkgOrderList OList(&Cache);
 
 
    if (DepAdd(OList,Pkg) == false)
    if (DepAdd(OList,Pkg) == false)
@@ -489,6 +492,9 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
       
       
       while (End->Type == pkgCache::Dep::PreDepends)
       while (End->Type == pkgCache::Dep::PreDepends)
       {
       {
+	 if (Debug == true)
+	    clog << "PreDepends order for " << Pkg.Name() << std::endl;
+
 	 // Look for possible ok targets.
 	 // Look for possible ok targets.
 	 SPtrArray<Version *> VList = Start.AllTargets();
 	 SPtrArray<Version *> VList = Start.AllTargets();
 	 bool Bad = true;
 	 bool Bad = true;
@@ -502,6 +508,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
 		Pkg.State() == PkgIterator::NeedsNothing)
 		Pkg.State() == PkgIterator::NeedsNothing)
 	    {
 	    {
 	       Bad = false;
 	       Bad = false;
+	       if (Debug == true)
+		  clog << "Found ok package " << Pkg.Name() << endl;
 	       continue;
 	       continue;
 	    }
 	    }
 	 }
 	 }
@@ -517,6 +525,8 @@ bool pkgPackageManager::SmartUnPack(PkgIterator Pkg)
 		(Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing))
 		(Cache[Pkg].Keep() == true && Pkg.State() == PkgIterator::NeedsNothing))
 	       continue;
 	       continue;
 
 
+	    if (Debug == true)
+	       clog << "Trying to SmartConfigure " << Pkg.Name() << endl;
 	    Bad = !SmartConfigure(Pkg);
 	    Bad = !SmartConfigure(Pkg);
 	 }
 	 }
 
 

+ 6 - 4
buildlib/configure.mak

@@ -15,11 +15,13 @@ BUILDDIR=build
 .PHONY: startup
 .PHONY: startup
 startup: configure $(BUILDDIR)/config.status $(addprefix $(BUILDDIR)/,$(CONVERTED))
 startup: configure $(BUILDDIR)/config.status $(addprefix $(BUILDDIR)/,$(CONVERTED))
 
 
-configure: aclocal.m4 configure.in
-	# use the files provided from the system instead of carry around
-	# and use (most of the time outdated) copycats
+# use the files provided from the system instead of carry around
+# and use (most of the time outdated) copycats
+buildlib/config.sub:
 	ln -sf /usr/share/misc/config.sub buildlib/config.sub
 	ln -sf /usr/share/misc/config.sub buildlib/config.sub
-	ln -sf /usr/share/misc/config.guess buildlib/config.guess
+buildlib/config.guess:
+	ln -sf /usr/share/misc/config.guess buildlib/config.guess	
+configure: aclocal.m4 configure.in buildlib/config.guess buildlib/config.sub
 	autoconf
 	autoconf
 
 
 aclocal.m4: $(wildcard buildlib/*.m4)
 aclocal.m4: $(wildcard buildlib/*.m4)

+ 137 - 125
cmdline/apt-get.cc

@@ -1247,131 +1247,143 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 			       pkgSrcRecords &SrcRecs,string &Src,
 			       pkgSrcRecords &SrcRecs,string &Src,
 			       pkgDepCache &Cache)
 			       pkgDepCache &Cache)
 {
 {
-	string VerTag;
-	string DefRel = _config->Find("APT::Default-Release");
-	string TmpSrc = Name;
-	const size_t found = TmpSrc.find_last_of("/=");
-
-	// extract the version/release from the pkgname
-	if (found != string::npos) {
-		if (TmpSrc[found] == '/')
-			DefRel = TmpSrc.substr(found+1);
-		else
-			VerTag = TmpSrc.substr(found+1);
-		TmpSrc = TmpSrc.substr(0,found);
-	}
-
-	/* Lookup the version of the package we would install if we were to
-	   install a version and determine the source package name, then look
-	   in the archive for a source package of the same name. */
-	bool MatchSrcOnly = _config->FindB("APT::Get::Only-Source");
-	const pkgCache::PkgIterator Pkg = Cache.FindPkg(TmpSrc);
-	if (MatchSrcOnly == false && Pkg.end() == false) {
-		if(VerTag.empty() == false || DefRel.empty() == false) {
-			// we have a default release, try to locate the pkg. we do it like
-			// this because GetCandidateVer() will not "downgrade", that means
-			// "apt-get source -t stable apt" won't work on a unstable system
-			for (pkgCache::VerIterator Ver = Pkg.VersionList();
-			     Ver.end() == false; Ver++) {
-				for (pkgCache::VerFileIterator VF = Ver.FileList();
-				     VF.end() == false; VF++) {
-					/* If this is the status file, and the current version is not the
-					   version in the status file (ie it is not installed, or somesuch)
-					   then it is not a candidate for installation, ever. This weeds
-					   out bogus entries that may be due to config-file states, or
-					   other. */
-					if ((VF.File()->Flags & pkgCache::Flag::NotSource) ==
-					    pkgCache::Flag::NotSource && Pkg.CurrentVer() != Ver)
-						continue;
-
-					// We match against a concrete version (or a part of this version)
-					if (VerTag.empty() == false && strncmp(VerTag.c_str(), Ver.VerStr(), VerTag.size()) != 0)
-						continue;
-
-					// or we match against a release
-					if(VerTag.empty() == false ||
-					   (VF.File().Archive() != 0 && VF.File().Archive() == DefRel) ||
-					   (VF.File().Codename() != 0 && VF.File().Codename() == DefRel)) {
-						pkgRecords::Parser &Parse = Recs.Lookup(VF);
-						Src = Parse.SourcePkg();
-						if (VerTag.empty() == true)
-							VerTag = Parse.SourceVer();
-						break;
-					}
-				}
-			}
-			if (Src.empty() == true) {
-				if (VerTag.empty() == false)
-					_error->Warning(_("Ignore unavailable version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str());
-				else
-					_error->Warning(_("Ignore unavailable target release '%s' of package '%s'"), DefRel.c_str(), TmpSrc.c_str());
-				VerTag.clear();
-				DefRel.clear();
-			}
-		}
-		if (VerTag.empty() == true && DefRel.empty() == true) {
-			// if we don't have a version or default release, use the CandidateVer to find the Source
-			pkgCache::VerIterator Ver = Cache.GetCandidateVer(Pkg);
-			if (Ver.end() == false) {
-				pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList());
-				Src = Parse.SourcePkg();
-				VerTag = Parse.SourceVer();
-			}
-		}
-	}
-
-	if (Src.empty() == true)
-		Src = TmpSrc;
-	else {
-		/* if we have a source pkg name, make sure to only search
-		   for srcpkg names, otherwise apt gets confused if there
-		   is a binary package "pkg1" and a source package "pkg1"
-		   with the same name but that comes from different packages */
-		MatchSrcOnly = true;
-		if (Src != TmpSrc) {
-			ioprintf(c1out, _("Picking '%s' as source package instead of '%s'\n"), Src.c_str(), TmpSrc.c_str());
-		}
-	}
-
-	// The best hit
-	pkgSrcRecords::Parser *Last = 0;
-	unsigned long Offset = 0;
-	string Version;
-
-	/* Iterate over all of the hits, which includes the resulting
-	   binary packages in the search */
-	pkgSrcRecords::Parser *Parse;
-	while (true) {
-		SrcRecs.Restart();
-		while ((Parse = SrcRecs.Find(Src.c_str(), MatchSrcOnly)) != 0) {
-			const string Ver = Parse->Version();
-
-			// Ignore all versions which doesn't fit
-			if (VerTag.empty() == false && strncmp(VerTag.c_str(), Ver.c_str(), VerTag.size()) != 0)
-				continue;
-
-			// Newer version or an exact match? Save the hit
-			if (Last == 0 || Cache.VS().CmpVersion(Version,Ver) < 0) {
-				Last = Parse;
-				Offset = Parse->Offset();
-				Version = Ver;
-			}
-
-			// was the version check above an exact match? If so, we don't need to look further
-			if (VerTag.empty() == false && VerTag.size() == Ver.size())
-				break;
-		}
-		if (Last != 0 || VerTag.empty() == true)
-			break;
-		//if (VerTag.empty() == false && Last == 0)
-		_error->Warning(_("Ignore unavailable version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str());
-		VerTag.clear();
-	}
-
-	if (Last == 0 || Last->Jump(Offset) == false)
-		return 0;
-
-	return Last;
+   string VerTag;
+   string DefRel = _config->Find("APT::Default-Release");
+   string TmpSrc = Name;
+
+   // extract the version/release from the pkgname
+   const size_t found = TmpSrc.find_last_of("/=");
+   if (found != string::npos) {
+      if (TmpSrc[found] == '/')
+	 DefRel = TmpSrc.substr(found+1);
+      else
+	 VerTag = TmpSrc.substr(found+1);
+      TmpSrc = TmpSrc.substr(0,found);
+   }
+
+   /* Lookup the version of the package we would install if we were to
+      install a version and determine the source package name, then look
+      in the archive for a source package of the same name. */
+   bool MatchSrcOnly = _config->FindB("APT::Get::Only-Source");
+   const pkgCache::PkgIterator Pkg = Cache.FindPkg(TmpSrc);
+   if (MatchSrcOnly == false && Pkg.end() == false) 
+   {
+      if(VerTag.empty() == false || DefRel.empty() == false) 
+      {
+	 // we have a default release, try to locate the pkg. we do it like
+	 // this because GetCandidateVer() will not "downgrade", that means
+	 // "apt-get source -t stable apt" won't work on a unstable system
+	 for (pkgCache::VerIterator Ver = Pkg.VersionList();
+	      Ver.end() == false; Ver++) 
+	 {
+	    for (pkgCache::VerFileIterator VF = Ver.FileList();
+		 VF.end() == false; VF++) 
+	    {
+	       /* If this is the status file, and the current version is not the
+		  version in the status file (ie it is not installed, or somesuch)
+		  then it is not a candidate for installation, ever. This weeds
+		  out bogus entries that may be due to config-file states, or
+		  other. */
+	       if ((VF.File()->Flags & pkgCache::Flag::NotSource) ==
+		   pkgCache::Flag::NotSource && Pkg.CurrentVer() != Ver)
+		  continue;
+
+	       // We match against a concrete version (or a part of this version)
+	       if (VerTag.empty() == false && strncmp(VerTag.c_str(), Ver.VerStr(), VerTag.size()) != 0)
+		  continue;
+
+	       // or we match against a release
+	       if(VerTag.empty() == false ||
+		  (VF.File().Archive() != 0 && VF.File().Archive() == DefRel) ||
+		  (VF.File().Codename() != 0 && VF.File().Codename() == DefRel)) 
+	       {
+		  pkgRecords::Parser &Parse = Recs.Lookup(VF);
+		  Src = Parse.SourcePkg();
+		  if (VerTag.empty() == true)
+		     VerTag = Parse.SourceVer();
+		  break;
+	       }
+	    }
+	 }
+	 if (Src.empty() == true) 
+	 {
+	    if (VerTag.empty() == false)
+	       _error->Warning(_("Ignore unavailable version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str());
+	    else
+	       _error->Warning(_("Ignore unavailable target release '%s' of package '%s'"), DefRel.c_str(), TmpSrc.c_str());
+	    VerTag.clear();
+	    DefRel.clear();
+	 }
+      }
+      if (VerTag.empty() == true && DefRel.empty() == true) 
+      {
+	 // if we don't have a version or default release, use the CandidateVer to find the Source
+	 pkgCache::VerIterator Ver = Cache.GetCandidateVer(Pkg);
+	 if (Ver.end() == false) 
+	 {
+	    pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList());
+	    Src = Parse.SourcePkg();
+	    VerTag = Parse.SourceVer();
+	 }
+      }
+   }
+
+   if (Src.empty() == true)
+      Src = TmpSrc;
+   else 
+   {
+      /* if we have a source pkg name, make sure to only search
+	 for srcpkg names, otherwise apt gets confused if there
+	 is a binary package "pkg1" and a source package "pkg1"
+	 with the same name but that comes from different packages */
+      MatchSrcOnly = true;
+      if (Src != TmpSrc) 
+      {
+	 ioprintf(c1out, _("Picking '%s' as source package instead of '%s'\n"), Src.c_str(), TmpSrc.c_str());
+      }
+   }
+
+   // The best hit
+   pkgSrcRecords::Parser *Last = 0;
+   unsigned long Offset = 0;
+   string Version;
+
+   /* Iterate over all of the hits, which includes the resulting
+      binary packages in the search */
+   pkgSrcRecords::Parser *Parse;
+   while (true) 
+   {
+      SrcRecs.Restart();
+      while ((Parse = SrcRecs.Find(Src.c_str(), MatchSrcOnly)) != 0) 
+      {
+	 const string Ver = Parse->Version();
+
+	 // Ignore all versions which doesn't fit
+	 if (VerTag.empty() == false && strncmp(VerTag.c_str(), Ver.c_str(), VerTag.size()) != 0)
+	    continue;
+
+	 // Newer version or an exact match? Save the hit
+	 if (Last == 0 || Cache.VS().CmpVersion(Version,Ver) < 0) {
+	    Last = Parse;
+	    Offset = Parse->Offset();
+	    Version = Ver;
+	 }
+
+	 // was the version check above an exact match? If so, we don't need to look further
+	 if (VerTag.empty() == false && VerTag.size() == Ver.size())
+	    break;
+      }
+      if (Last != 0 || VerTag.empty() == true)
+	 break;
+      //if (VerTag.empty() == false && Last == 0)
+      _error->Warning(_("Ignore unavailable version '%s' of package '%s'"), VerTag.c_str(), TmpSrc.c_str());
+      VerTag.clear();
+   }
+
+   if (Last == 0 || Last->Jump(Offset) == false)
+      return 0;
+
+   return Last;
 }
 }
 									/*}}}*/
 									/*}}}*/
 // DoUpdate - Update the package lists					/*{{{*/
 // DoUpdate - Update the package lists					/*{{{*/

+ 11 - 7
cmdline/apt-key

@@ -93,13 +93,17 @@ update() {
     # add any security. we *need* this check on net-update though
     # add any security. we *need* this check on net-update though
     $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
     $GPG_CMD --quiet --batch --keyring $ARCHIVE_KEYRING --export | $GPG --import
 
 
-    # remove no-longer supported/used keys
-    keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5`
-    for key in $keys; do
-	if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then
-	    $GPG --quiet --batch --delete-key --yes ${key}
-	fi
-    done
+    if [ -r "$REMOVED_KEYS" ]; then
+	# remove no-longer supported/used keys
+	keys=`$GPG_CMD --keyring $REMOVED_KEYS --with-colons --list-keys | grep ^pub | cut -d: -f5`
+	for key in $keys; do
+	    if $GPG --list-keys --with-colons | grep ^pub | cut -d: -f5 | grep -q $key; then
+		$GPG --quiet --batch --delete-key --yes ${key}
+	    fi
+	done
+    else
+	echo "Warning: removed keys keyring  $REMOVED_KEYS missing or not readable" >&2
+    fi
 }
 }
 
 
 
 

+ 1 - 0
debian/apt.conf.autoremove

@@ -4,5 +4,6 @@ APT
   { 
   { 
 	"^linux-image.*";  
 	"^linux-image.*";  
 	"^linux-restricted-modules.*";
 	"^linux-restricted-modules.*";
+	"^kfreebsd-image.*";  
   };
   };
 };
 };

+ 73 - 37
debian/changelog

@@ -1,3 +1,45 @@
+apt (0.7.26) UNRELEASED; urgency=low
+
+  [ David Kalnischkies ]
+  * [BREAK] add possibility to download and use multiply
+    Translation files, configurable with Acquire::Translation
+    (Closes: #444222, #448216, #550564)
+  * Ignore :qualifiers after package name in build dependencies
+    for now as long we don't understand them (Closes: #558103)
+  * doc/apt.conf.5.xml:
+    - briefly document the behaviour of the new https options
+  * methods/connect.cc:
+    - add AI_ADDRCONFIG to ai_flags as suggested by Aurelien Jarno
+      in response to Bernhard R. Link, thanks! (Closes: #505020)
+  * methods/rred.cc:
+    - rewrite to be able to handle even big patch files
+    - adopt optional mmap+iovec patch from Morten Hustveit
+      (Closes: #463354) which should speed up a bit. Thanks!
+  * apt-pkg/contrib/mmap.{cc,h}:
+    - extend it to have a growable flag - unused now but maybe...
+  * apt-pkg/pkgcache.h:
+    - use long instead of short for {Ver,Desc}File size,
+      patch from Víctor Manuel Jáquez Leal, thanks! (Closes: #538917)
+  * apt-pkg/acquire-item.cc:
+    - allow also to skip the last patch if target is reached,
+      thanks Bernhard R. Link! (Closes: #545699)
+  * methods/http{,s}.cc
+    - add config setting for User-Agent to the Acquire group,
+      thanks Timothy J. Miller! (Closes: #355782)
+    - add https options which default to http ones (Closes: #557085)
+  * ftparchive/writer.{cc,h}:
+    - add APT::FTPArchive::AlwaysStat to disable the too aggressive
+      caching if versions are build multiply times (not recommend)
+      Patch by Christoph Goehre, thanks! (Closes: #463260)
+  * ftparchive/*:
+    - fix a few typos in strings, comments and manpage,
+      thanks Karl Goetz! (Closes: #558757)
+  * debian/apt.cron.daily:
+    - check cache size even if we do nothing else otherwise, thanks
+      Francesco Poli for patch(s) and patience! (Closes: #459344)
+
+ -- Michael Vogt <mvo@debian.org>  Thu, 10 Dec 2009 22:02:38 +0100
+
 apt (0.7.25) UNRELEASED; urgency=low
 apt (0.7.25) UNRELEASED; urgency=low
 
 
   [ Christian Perrier ]
   [ Christian Perrier ]
@@ -17,13 +59,36 @@ apt (0.7.25) UNRELEASED; urgency=low
     Closes: #552606
     Closes: #552606
   * Italian translation update by Milo Casagrande
   * Italian translation update by Milo Casagrande
     Closes: #555797
     Closes: #555797
+  * Simplified Chinese translation update by Aron Xu 
+    Closes: #558737
+  * Slovak translation update by Ivan Masár
+    Closes: #559277
+  
+  [ Michael Vogt ]
+  * apt-pkg/packagemanager.cc:
+    - add output about pre-depends configuring when debug::pkgPackageManager
+      is used
+  * methods/https.cc:
+    - fix incorrect use of CURLOPT_TIMEOUT, closes: #497983, LP: #354972
+      thanks to Brian Thomason for the patch
+  * merge lp:~mvo/apt/netrc branch, this adds support for a
+    /etc/apt/auth.conf that can be used to store username/passwords
+    in a "netrc" style file (with the extension that it supports "/"
+    in a machine definition). Based on the maemo git branch (Closes: #518473)
+    (thanks also to Jussi Hakala and Julian Andres Klode)
+  * apt-pkg/deb/dpkgpm.cc:
+    - add "purge" to list of known actions
+
+  [ Brian Murray ]
+  * apt-pkg/depcache.cc, apt-pkg/indexcopy.cc:
+    - typo fix (LP: #462328)
+  
+  [ Loïc Minier ]
+  * cmdline/apt-key:
+    - Emit a warning if removed keys keyring is missing and skip associated
+      checks (LP: #218971)
 
 
   [ David Kalnischkies ]
   [ David Kalnischkies ]
-  * [BREAK] add possibility to download and use multiply
-    Translation files, configurable with Acquire::Translation
-    (Closes: #444222, #448216, #550564)
-  * Ignore :qualifiers after package name in build dependencies
-    for now as long we don't understand them (Closes: #558103)
   * apt-pkg/packagemanager.cc:
   * apt-pkg/packagemanager.cc:
     - better debug output for ImmediateAdd with depth and why
     - better debug output for ImmediateAdd with depth and why
     - improve the message shown for failing immediate configuration
     - improve the message shown for failing immediate configuration
@@ -31,7 +96,6 @@ apt (0.7.25) UNRELEASED; urgency=low
   * doc/po4a.conf: activate translation of guide.sgml and offline.sgml
   * doc/po4a.conf: activate translation of guide.sgml and offline.sgml
   * doc/apt.conf.5.xml:
   * doc/apt.conf.5.xml:
     - provide a few more details about APT::Immediate-Configure
     - provide a few more details about APT::Immediate-Configure
-    - briefly document the behaviour of the new https options
   * doc/sources.list.5.xml:
   * doc/sources.list.5.xml:
     - add note about additional apt-transport-methods
     - add note about additional apt-transport-methods
   * doc/apt-mark.8.xml:
   * doc/apt-mark.8.xml:
@@ -44,8 +108,6 @@ apt (0.7.25) UNRELEASED; urgency=low
     - add --debian-only as alias for --diff-only
     - add --debian-only as alias for --diff-only
   * methods/connect.cc:
   * methods/connect.cc:
     - display also strerror of "wicked" getaddrinfo errors
     - display also strerror of "wicked" getaddrinfo errors
-    - add AI_ADDRCONFIG to ai_flags as suggested by Aurelien Jarno
-      in response to Bernhard R. Link, thanks! (Closes: #505020)
   * buildlib/configure.mak, buildlib/config.{sub,guess}:
   * buildlib/configure.mak, buildlib/config.{sub,guess}:
     - remove (outdated) config.{sub,guess} and use the ones provided
     - remove (outdated) config.{sub,guess} and use the ones provided
       by the new added build-dependency autotools-dev instead
       by the new added build-dependency autotools-dev instead
@@ -59,40 +121,15 @@ apt (0.7.25) UNRELEASED; urgency=low
     - bump policy to 3.8.3 as we have no outdated manpages anymore
     - bump policy to 3.8.3 as we have no outdated manpages anymore
   * debian/NEWS:
   * debian/NEWS:
     - fix a typo in 0.7.24: Allready -> Already (Closes: #557674)
     - fix a typo in 0.7.24: Allready -> Already (Closes: #557674)
-  * methods/rred.cc:
-    - rewrite to be able to handle even big patch files
-    - adopt optional mmap+iovec patch from Morten Hustveit
-      (Closes: #463354) which should speed up a bit. Thanks!
-  * apt-pkg/contrib/mmap.{cc,h}:
-    - extend it to have a growable flag - unused now but maybe...
-  * apt-pkg/pkgcache.h:
-    - use long instead of short for {Ver,Desc}File size,
-      patch from Víctor Manuel Jáquez Leal, thanks! (Closes: #538917)
-  * apt-pkg/acquire-item.cc:
-    - allow also to skip the last patch if target is reached,
-      thanks Bernhard R. Link! (Closes: #545699)
   * cmdline/apt-mark:
   * cmdline/apt-mark:
     - print an error if a new state file can't be created,
     - print an error if a new state file can't be created,
       thanks Carl Chenet! (Closes: #521289)
       thanks Carl Chenet! (Closes: #521289)
     - print an error and exit if python-apt is not installed,
     - print an error and exit if python-apt is not installed,
       thanks Carl Chenet! (Closes: #521284)
       thanks Carl Chenet! (Closes: #521284)
-  * methods/http{,s}.cc
-    - add config setting for User-Agent to the Acquire group,
-      thanks Timothy J. Miller! (Closes: #355782)
-    - add https options which default to http ones (Closes: #557085)
   * ftparchive/writer.{cc,h}:
   * ftparchive/writer.{cc,h}:
     - add APT::FTPArchive::LongDescription to be able to disable them
     - add APT::FTPArchive::LongDescription to be able to disable them
-    - add APT::FTPArchive::AlwaysStat to disable the too aggressive
-      caching if versions are build multiply times (not recommend)
-      Patch by Christoph Goehre, thanks! (Closes: #463260)
-  * ftparchive/*:
-    - fix a few typos in strings, comments and manpage,
-      thanks Karl Goetz! (Closes: #558757)
   * apt-pkg/deb/debsrcrecords.cc:
   * apt-pkg/deb/debsrcrecords.cc:
     - use "diff" filetype for .debian.tar.* files (Closes: #554898)
     - use "diff" filetype for .debian.tar.* files (Closes: #554898)
-  * debian/apt.cron.daily:
-    - check cache size even if we do nothing else otherwise, thanks
-      Francesco Poli for patch(s) and patience! (Closes: #459344)
 
 
   [ Chris Leick ]
   [ Chris Leick ]
   * doc/ various manpages:
   * doc/ various manpages:
@@ -113,13 +150,12 @@ apt (0.7.25) UNRELEASED; urgency=low
     - Restrict option names to alphanumerical characters and "/-:._+".
     - Restrict option names to alphanumerical characters and "/-:._+".
     - Deprecate #include, we have apt.conf.d nowadays which should be
     - Deprecate #include, we have apt.conf.d nowadays which should be
       sufficient.
       sufficient.
-  * methods/https.cc:
-    - Add support for authentication using netrc (Closes: #518473), patch
-      by Jussi Hakala <jussi.hakala@hut.fi>.
   * ftparchive/apt-ftparchive.cc:
   * ftparchive/apt-ftparchive.cc:
     - Call setlocale() so translations are actually used.
     - Call setlocale() so translations are actually used.
+  * debian/apt.conf.autoremove:
+    - Add kfreebsd-image-* to the list (Closes: #558803)
 
 
- -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 29 Sep 2009 15:51:34 +0200
+ -- Michael Vogt <mvo@debian.org>  Thu, 10 Dec 2009 22:02:38 +0100
 
 
 apt (0.7.24) unstable; urgency=low
 apt (0.7.24) unstable; urgency=low
 
 

+ 2 - 0
doc/examples/configure-index

@@ -309,6 +309,7 @@ Dir "/"
   // Config files
   // Config files
   Etc "etc/apt/" {
   Etc "etc/apt/" {
      Main "apt.conf";
      Main "apt.conf";
+     Netrc "auth.conf";
      Parts "apt.conf.d/";
      Parts "apt.conf.d/";
      Preferences "preferences";
      Preferences "preferences";
      PreferencesParts "preferences.d";
      PreferencesParts "preferences.d";
@@ -407,6 +408,7 @@ Debug
   Acquire::gpgv "false";   // Show the gpgv traffic
   Acquire::gpgv "false";   // Show the gpgv traffic
   aptcdrom "false";        // Show found package files
   aptcdrom "false";        // Show found package files
   IdentCdrom "false";
   IdentCdrom "false";
+  acquire::netrc "false";  // netrc parser
   
   
 }
 }
 
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 146 - 165
doc/po/apt-doc.pot


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 139 - 139
doc/po/de.po


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 143 - 139
doc/po/es.po


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 144 - 255
doc/po/fr.po


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 139 - 139
doc/po/it.po


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 139 - 330
doc/po/ja.po


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 139 - 139
doc/po/pl.po


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 139 - 139
doc/po/pt_BR.po


+ 4 - 1
methods/ftp.cc

@@ -19,6 +19,7 @@
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
+#include <apt-pkg/netrc.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/time.h>
@@ -982,7 +983,9 @@ bool FtpMethod::Fetch(FetchItem *Itm)
    FetchResult Res;
    FetchResult Res;
    Res.Filename = Itm->DestFile;
    Res.Filename = Itm->DestFile;
    Res.IMSHit = false;
    Res.IMSHit = false;
-   
+
+   maybe_add_auth (Get, _config->FindFile("Dir::Etc::netrc"));
+
    // Connect to the server
    // Connect to the server
    if (Server == 0 || Server->Comp(Get) == false)
    if (Server == 0 || Server->Comp(Get) == false)
    {
    {

+ 5 - 2
methods/http.cc

@@ -29,6 +29,7 @@
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
+#include <apt-pkg/netrc.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/time.h>
@@ -42,6 +43,7 @@
 #include <map>
 #include <map>
 #include <apti18n.h>
 #include <apti18n.h>
 
 
+
 // Internet stuff
 // Internet stuff
 #include <netdb.h>
 #include <netdb.h>
 
 
@@ -49,7 +51,6 @@
 #include "connect.h"
 #include "connect.h"
 #include "rfc2553emu.h"
 #include "rfc2553emu.h"
 #include "http.h"
 #include "http.h"
-
 									/*}}}*/
 									/*}}}*/
 using namespace std;
 using namespace std;
 
 
@@ -724,10 +725,12 @@ void HttpMethod::SendReq(FetchItem *Itm,CircleBuf &Out)
       Req += string("Proxy-Authorization: Basic ") + 
       Req += string("Proxy-Authorization: Basic ") + 
           Base64Encode(Proxy.User + ":" + Proxy.Password) + "\r\n";
           Base64Encode(Proxy.User + ":" + Proxy.Password) + "\r\n";
 
 
+   maybe_add_auth (Uri, _config->FindFile("Dir::Etc::netrc"));
    if (Uri.User.empty() == false || Uri.Password.empty() == false)
    if (Uri.User.empty() == false || Uri.Password.empty() == false)
+   {
       Req += string("Authorization: Basic ") + 
       Req += string("Authorization: Basic ") + 
           Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
           Base64Encode(Uri.User + ":" + Uri.Password) + "\r\n";
-   
+   }
    Req += "User-Agent: " + _config->Find("Acquire::http::User-Agent",
    Req += "User-Agent: " + _config->Find("Acquire::http::User-Agent",
 		"Debian APT-HTTP/1.3 ("VERSION")") + "\r\n\r\n";
 		"Debian APT-HTTP/1.3 ("VERSION")") + "\r\n\r\n";
    
    

+ 7 - 2
methods/https.cc

@@ -14,6 +14,7 @@
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/hashes.h>
 #include <apt-pkg/hashes.h>
+#include <apt-pkg/netrc.h>
 
 
 #include <sys/stat.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <sys/time.h>
@@ -110,8 +111,10 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
    curl_easy_reset(curl);
    curl_easy_reset(curl);
    SetupProxy();
    SetupProxy();
 
 
+   maybe_add_auth (Uri, _config->FindFile("Dir::Etc::netrc"));
+
    // callbacks
    // callbacks
-   curl_easy_setopt(curl, CURLOPT_URL, Itm->Uri.c_str());
+   curl_easy_setopt(curl, CURLOPT_URL, static_cast<string>(Uri).c_str());
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
    curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_data);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
    curl_easy_setopt(curl, CURLOPT_WRITEDATA, this);
    curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
    curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
@@ -119,7 +122,6 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
    curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false);
    curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false);
    curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
    curl_easy_setopt(curl, CURLOPT_FAILONERROR, true);
    curl_easy_setopt(curl, CURLOPT_FILETIME, true);
    curl_easy_setopt(curl, CURLOPT_FILETIME, true);
-   curl_easy_setopt(curl, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
 
 
    // SSL parameters are set by default to the common (non mirror-specific) value
    // SSL parameters are set by default to the common (non mirror-specific) value
    // if available (or a default one) and gets overload by mirror-specific ones.
    // if available (or a default one) and gets overload by mirror-specific ones.
@@ -207,6 +209,9 @@ bool HttpsMethod::Fetch(FetchItem *Itm)
 		_config->FindI("Acquire::http::Timeout",120));
 		_config->FindI("Acquire::http::Timeout",120));
    curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
    curl_easy_setopt(curl, CURLOPT_TIMEOUT, timeout);
    curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout);
    curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, timeout);
+   //set really low lowspeed timeout (see #497983)
+   curl_easy_setopt(curl, CURLOPT_LOW_SPEED_LIMIT, DL_MIN_SPEED);
+   curl_easy_setopt(curl, CURLOPT_LOW_SPEED_TIME, timeout);
 
 
    // set redirect options and default to 10 redirects
    // set redirect options and default to 10 redirects
    bool AllowRedirect = _config->FindB("Acquire::https::AllowRedirect",
    bool AllowRedirect = _config->FindB("Acquire::https::AllowRedirect",

+ 2 - 0
methods/https.h

@@ -24,6 +24,8 @@ class HttpsMethod;
 
 
 class HttpsMethod : public pkgAcqMethod
 class HttpsMethod : public pkgAcqMethod
 {
 {
+   // minimum speed in bytes/se that triggers download timeout handling
+   static const int DL_MIN_SPEED = 10;
 
 
    virtual bool Fetch(FetchItem *);
    virtual bool Fetch(FetchItem *);
    static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);
    static size_t write_data(void *buffer, size_t size, size_t nmemb, void *userp);

+ 154 - 134
po/apt-all.pot

@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-11-28 02:10+0100\n"
+"POT-Creation-Date: 2009-12-10 23:01+0100\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -151,7 +151,7 @@ msgstr ""
 
 
 #: cmdline/apt-cache.cc:1718 cmdline/apt-cdrom.cc:134 cmdline/apt-config.cc:70
 #: cmdline/apt-cache.cc:1718 cmdline/apt-cdrom.cc:134 cmdline/apt-config.cc:70
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547
 #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:547
-#: cmdline/apt-get.cc:2653 cmdline/apt-sortpkgs.cc:144
+#: cmdline/apt-get.cc:2665 cmdline/apt-sortpkgs.cc:144
 #, c-format
 #, c-format
 msgid "%s %s for %s compiled on %s %s\n"
 msgid "%s %s for %s compiled on %s %s\n"
 msgstr ""
 msgstr ""
@@ -342,7 +342,7 @@ msgstr ""
 
 
 #: ftparchive/cachedb.cc:72
 #: ftparchive/cachedb.cc:72
 msgid ""
 msgid ""
-"DB format is invalid. If you upgraded from a older version of apt, please "
+"DB format is invalid. If you upgraded from an older version of apt, please "
 "remove and re-create the database."
 "remove and re-create the database."
 msgstr ""
 msgstr ""
 
 
@@ -549,7 +549,7 @@ msgstr ""
 msgid "Y"
 msgid "Y"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1718
+#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1730
 #, c-format
 #, c-format
 msgid "Regex compilation error - %s"
 msgid "Regex compilation error - %s"
 msgstr ""
 msgstr ""
@@ -708,11 +708,11 @@ msgstr ""
 msgid "Internal error, Ordering didn't finish"
 msgid "Internal error, Ordering didn't finish"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:811 cmdline/apt-get.cc:2060 cmdline/apt-get.cc:2093
+#: cmdline/apt-get.cc:811 cmdline/apt-get.cc:2072 cmdline/apt-get.cc:2105
 msgid "Unable to lock the download directory"
 msgid "Unable to lock the download directory"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:821 cmdline/apt-get.cc:2141 cmdline/apt-get.cc:2394
+#: cmdline/apt-get.cc:821 cmdline/apt-get.cc:2153 cmdline/apt-get.cc:2406
 #: apt-pkg/cachefile.cc:65
 #: apt-pkg/cachefile.cc:65
 msgid "The list of sources could not be read."
 msgid "The list of sources could not be read."
 msgstr ""
 msgstr ""
@@ -741,8 +741,8 @@ msgstr ""
 msgid "After this operation, %sB disk space will be freed.\n"
 msgid "After this operation, %sB disk space will be freed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:867 cmdline/apt-get.cc:870 cmdline/apt-get.cc:2237
-#: cmdline/apt-get.cc:2240
+#: cmdline/apt-get.cc:867 cmdline/apt-get.cc:870 cmdline/apt-get.cc:2249
+#: cmdline/apt-get.cc:2252
 #, c-format
 #, c-format
 msgid "Couldn't determine free space in %s"
 msgid "Couldn't determine free space in %s"
 msgstr ""
 msgstr ""
@@ -776,7 +776,7 @@ msgstr ""
 msgid "Do you want to continue [Y/n]? "
 msgid "Do you want to continue [Y/n]? "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:993 cmdline/apt-get.cc:2291 apt-pkg/algorithms.cc:1389
+#: cmdline/apt-get.cc:993 cmdline/apt-get.cc:2303 apt-pkg/algorithms.cc:1389
 #, c-format
 #, c-format
 msgid "Failed to fetch %s  %s\n"
 msgid "Failed to fetch %s  %s\n"
 msgstr ""
 msgstr ""
@@ -785,7 +785,7 @@ msgstr ""
 msgid "Some files failed to download"
 msgid "Some files failed to download"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1012 cmdline/apt-get.cc:2300
+#: cmdline/apt-get.cc:1012 cmdline/apt-get.cc:2312
 msgid "Download complete and in download only mode"
 msgid "Download complete and in download only mode"
 msgstr ""
 msgstr ""
 
 
@@ -878,49 +878,49 @@ msgid "Selected version %s (%s) for %s\n"
 msgstr ""
 msgstr ""
 
 
 #. if (VerTag.empty() == false && Last == 0)
 #. if (VerTag.empty() == false && Last == 0)
-#: cmdline/apt-get.cc:1305 cmdline/apt-get.cc:1367
+#: cmdline/apt-get.cc:1311 cmdline/apt-get.cc:1379
 #, c-format
 #, c-format
 msgid "Ignore unavailable version '%s' of package '%s'"
 msgid "Ignore unavailable version '%s' of package '%s'"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1307
+#: cmdline/apt-get.cc:1313
 #, c-format
 #, c-format
 msgid "Ignore unavailable target release '%s' of package '%s'"
 msgid "Ignore unavailable target release '%s' of package '%s'"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1332
+#: cmdline/apt-get.cc:1342
 #, c-format
 #, c-format
 msgid "Picking '%s' as source package instead of '%s'\n"
 msgid "Picking '%s' as source package instead of '%s'\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1383
+#: cmdline/apt-get.cc:1395
 msgid "The update command takes no arguments"
 msgid "The update command takes no arguments"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1396
+#: cmdline/apt-get.cc:1408
 msgid "Unable to lock the list directory"
 msgid "Unable to lock the list directory"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1452
+#: cmdline/apt-get.cc:1464
 msgid "We are not supposed to delete stuff, can't start AutoRemover"
 msgid "We are not supposed to delete stuff, can't start AutoRemover"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1501
+#: cmdline/apt-get.cc:1513
 msgid ""
 msgid ""
 "The following packages were automatically installed and are no longer "
 "The following packages were automatically installed and are no longer "
 "required:"
 "required:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1503
+#: cmdline/apt-get.cc:1515
 #, c-format
 #, c-format
 msgid "%lu packages were automatically installed and are no longer required.\n"
 msgid "%lu packages were automatically installed and are no longer required.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1504
+#: cmdline/apt-get.cc:1516
 msgid "Use 'apt-get autoremove' to remove them."
 msgid "Use 'apt-get autoremove' to remove them."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1509
+#: cmdline/apt-get.cc:1521
 msgid ""
 msgid ""
 "Hmm, seems like the AutoRemover destroyed something which really\n"
 "Hmm, seems like the AutoRemover destroyed something which really\n"
 "shouldn't happen. Please file a bug report against apt."
 "shouldn't happen. Please file a bug report against apt."
@@ -936,49 +936,49 @@ msgstr ""
 #. "that package should be filed.") << endl;
 #. "that package should be filed.") << endl;
 #. }
 #. }
 #.
 #.
-#: cmdline/apt-get.cc:1512 cmdline/apt-get.cc:1802
+#: cmdline/apt-get.cc:1524 cmdline/apt-get.cc:1814
 msgid "The following information may help to resolve the situation:"
 msgid "The following information may help to resolve the situation:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1516
+#: cmdline/apt-get.cc:1528
 msgid "Internal Error, AutoRemover broke stuff"
 msgid "Internal Error, AutoRemover broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1535
+#: cmdline/apt-get.cc:1547
 msgid "Internal error, AllUpgrade broke stuff"
 msgid "Internal error, AllUpgrade broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1590
+#: cmdline/apt-get.cc:1602
 #, c-format
 #, c-format
 msgid "Couldn't find task %s"
 msgid "Couldn't find task %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1705 cmdline/apt-get.cc:1741
+#: cmdline/apt-get.cc:1717 cmdline/apt-get.cc:1753
 #, c-format
 #, c-format
 msgid "Couldn't find package %s"
 msgid "Couldn't find package %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1728
+#: cmdline/apt-get.cc:1740
 #, c-format
 #, c-format
 msgid "Note, selecting %s for regex '%s'\n"
 msgid "Note, selecting %s for regex '%s'\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1759
+#: cmdline/apt-get.cc:1771
 #, c-format
 #, c-format
 msgid "%s set to manually installed.\n"
 msgid "%s set to manually installed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1772
+#: cmdline/apt-get.cc:1784
 msgid "You might want to run `apt-get -f install' to correct these:"
 msgid "You might want to run `apt-get -f install' to correct these:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1775
+#: cmdline/apt-get.cc:1787
 msgid ""
 msgid ""
 "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
 "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
 "solution)."
 "solution)."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1787
+#: cmdline/apt-get.cc:1799
 msgid ""
 msgid ""
 "Some packages could not be installed. This may mean that you have\n"
 "Some packages could not be installed. This may mean that you have\n"
 "requested an impossible situation or if you are using the unstable\n"
 "requested an impossible situation or if you are using the unstable\n"
@@ -986,152 +986,152 @@ msgid ""
 "or been moved out of Incoming."
 "or been moved out of Incoming."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1805
+#: cmdline/apt-get.cc:1817
 msgid "Broken packages"
 msgid "Broken packages"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1834
+#: cmdline/apt-get.cc:1846
 msgid "The following extra packages will be installed:"
 msgid "The following extra packages will be installed:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1923
+#: cmdline/apt-get.cc:1935
 msgid "Suggested packages:"
 msgid "Suggested packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1924
+#: cmdline/apt-get.cc:1936
 msgid "Recommended packages:"
 msgid "Recommended packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1953
+#: cmdline/apt-get.cc:1965
 msgid "Calculating upgrade... "
 msgid "Calculating upgrade... "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1956 methods/ftp.cc:707 methods/connect.cc:112
+#: cmdline/apt-get.cc:1968 methods/ftp.cc:708 methods/connect.cc:112
 msgid "Failed"
 msgid "Failed"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1961
+#: cmdline/apt-get.cc:1973
 msgid "Done"
 msgid "Done"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2028 cmdline/apt-get.cc:2036
+#: cmdline/apt-get.cc:2040 cmdline/apt-get.cc:2048
 msgid "Internal error, problem resolver broke stuff"
 msgid "Internal error, problem resolver broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2136
+#: cmdline/apt-get.cc:2148
 msgid "Must specify at least one package to fetch source for"
 msgid "Must specify at least one package to fetch source for"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2166 cmdline/apt-get.cc:2412
+#: cmdline/apt-get.cc:2178 cmdline/apt-get.cc:2424
 #, c-format
 #, c-format
 msgid "Unable to find a source package for %s"
 msgid "Unable to find a source package for %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2215
+#: cmdline/apt-get.cc:2227
 #, c-format
 #, c-format
 msgid "Skipping already downloaded file '%s'\n"
 msgid "Skipping already downloaded file '%s'\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2250
+#: cmdline/apt-get.cc:2262
 #, c-format
 #, c-format
 msgid "You don't have enough free space in %s"
 msgid "You don't have enough free space in %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2256
+#: cmdline/apt-get.cc:2268
 #, c-format
 #, c-format
 msgid "Need to get %sB/%sB of source archives.\n"
 msgid "Need to get %sB/%sB of source archives.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2259
+#: cmdline/apt-get.cc:2271
 #, c-format
 #, c-format
 msgid "Need to get %sB of source archives.\n"
 msgid "Need to get %sB of source archives.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2265
+#: cmdline/apt-get.cc:2277
 #, c-format
 #, c-format
 msgid "Fetch source %s\n"
 msgid "Fetch source %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2296
+#: cmdline/apt-get.cc:2308
 msgid "Failed to fetch some archives."
 msgid "Failed to fetch some archives."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2324
+#: cmdline/apt-get.cc:2336
 #, c-format
 #, c-format
 msgid "Skipping unpack of already unpacked source in %s\n"
 msgid "Skipping unpack of already unpacked source in %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2336
+#: cmdline/apt-get.cc:2348
 #, c-format
 #, c-format
 msgid "Unpack command '%s' failed.\n"
 msgid "Unpack command '%s' failed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2337
+#: cmdline/apt-get.cc:2349
 #, c-format
 #, c-format
 msgid "Check if the 'dpkg-dev' package is installed.\n"
 msgid "Check if the 'dpkg-dev' package is installed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2354
+#: cmdline/apt-get.cc:2366
 #, c-format
 #, c-format
 msgid "Build command '%s' failed.\n"
 msgid "Build command '%s' failed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2373
+#: cmdline/apt-get.cc:2385
 msgid "Child process failed"
 msgid "Child process failed"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2389
+#: cmdline/apt-get.cc:2401
 msgid "Must specify at least one package to check builddeps for"
 msgid "Must specify at least one package to check builddeps for"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2417
+#: cmdline/apt-get.cc:2429
 #, c-format
 #, c-format
 msgid "Unable to get build-dependency information for %s"
 msgid "Unable to get build-dependency information for %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2437
+#: cmdline/apt-get.cc:2449
 #, c-format
 #, c-format
 msgid "%s has no build depends.\n"
 msgid "%s has no build depends.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2489
+#: cmdline/apt-get.cc:2501
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "%s dependency for %s cannot be satisfied because the package %s cannot be "
 "%s dependency for %s cannot be satisfied because the package %s cannot be "
 "found"
 "found"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2542
+#: cmdline/apt-get.cc:2554
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "%s dependency for %s cannot be satisfied because no available versions of "
 "%s dependency for %s cannot be satisfied because no available versions of "
 "package %s can satisfy version requirements"
 "package %s can satisfy version requirements"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2578
+#: cmdline/apt-get.cc:2590
 #, c-format
 #, c-format
 msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
 msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2605
+#: cmdline/apt-get.cc:2617
 #, c-format
 #, c-format
 msgid "Failed to satisfy %s dependency for %s: %s"
 msgid "Failed to satisfy %s dependency for %s: %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2621
+#: cmdline/apt-get.cc:2633
 #, c-format
 #, c-format
 msgid "Build-dependencies for %s could not be satisfied."
 msgid "Build-dependencies for %s could not be satisfied."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2626
+#: cmdline/apt-get.cc:2638
 msgid "Failed to process build dependencies"
 msgid "Failed to process build dependencies"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2658
+#: cmdline/apt-get.cc:2670
 msgid "Supported modules:"
 msgid "Supported modules:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2699
+#: cmdline/apt-get.cc:2711
 msgid ""
 msgid ""
 "Usage: apt-get [options] command\n"
 "Usage: apt-get [options] command\n"
 "       apt-get [options] install|remove pkg1 [pkg2 ...]\n"
 "       apt-get [options] install|remove pkg1 [pkg2 ...]\n"
@@ -1175,7 +1175,7 @@ msgid ""
 "                       This APT has Super Cow Powers.\n"
 "                       This APT has Super Cow Powers.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2867
+#: cmdline/apt-get.cc:2879
 msgid ""
 msgid ""
 "NOTE: This is only a simulation!\n"
 "NOTE: This is only a simulation!\n"
 "      apt-get needs root privileges for real execution.\n"
 "      apt-get needs root privileges for real execution.\n"
@@ -1408,7 +1408,7 @@ msgstr ""
 #: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:843
 #: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:843
 #: apt-pkg/contrib/cdromutl.cc:157 apt-pkg/sourcelist.cc:166
 #: apt-pkg/contrib/cdromutl.cc:157 apt-pkg/sourcelist.cc:166
 #: apt-pkg/sourcelist.cc:172 apt-pkg/sourcelist.cc:327 apt-pkg/acquire.cc:419
 #: apt-pkg/sourcelist.cc:172 apt-pkg/sourcelist.cc:327 apt-pkg/acquire.cc:419
-#: apt-pkg/init.cc:89 apt-pkg/init.cc:97 apt-pkg/clean.cc:33
+#: apt-pkg/init.cc:90 apt-pkg/init.cc:98 apt-pkg/clean.cc:33
 #: apt-pkg/policy.cc:281 apt-pkg/policy.cc:287
 #: apt-pkg/policy.cc:281 apt-pkg/policy.cc:287
 #, c-format
 #, c-format
 msgid "Unable to read %s"
 msgid "Unable to read %s"
@@ -1583,147 +1583,147 @@ msgid "Invalid URI, local URIS must not start with //"
 msgstr ""
 msgstr ""
 
 
 #. Login must be before getpeername otherwise dante won't work.
 #. Login must be before getpeername otherwise dante won't work.
-#: methods/ftp.cc:167
+#: methods/ftp.cc:168
 msgid "Logging in"
 msgid "Logging in"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:173
+#: methods/ftp.cc:174
 msgid "Unable to determine the peer name"
 msgid "Unable to determine the peer name"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:178
+#: methods/ftp.cc:179
 msgid "Unable to determine the local name"
 msgid "Unable to determine the local name"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:209 methods/ftp.cc:237
+#: methods/ftp.cc:210 methods/ftp.cc:238
 #, c-format
 #, c-format
 msgid "The server refused the connection and said: %s"
 msgid "The server refused the connection and said: %s"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:215
+#: methods/ftp.cc:216
 #, c-format
 #, c-format
 msgid "USER failed, server said: %s"
 msgid "USER failed, server said: %s"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:222
+#: methods/ftp.cc:223
 #, c-format
 #, c-format
 msgid "PASS failed, server said: %s"
 msgid "PASS failed, server said: %s"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:242
+#: methods/ftp.cc:243
 msgid ""
 msgid ""
 "A proxy server was specified but no login script, Acquire::ftp::ProxyLogin "
 "A proxy server was specified but no login script, Acquire::ftp::ProxyLogin "
 "is empty."
 "is empty."
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:270
+#: methods/ftp.cc:271
 #, c-format
 #, c-format
 msgid "Login script command '%s' failed, server said: %s"
 msgid "Login script command '%s' failed, server said: %s"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:296
+#: methods/ftp.cc:297
 #, c-format
 #, c-format
 msgid "TYPE failed, server said: %s"
 msgid "TYPE failed, server said: %s"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:334 methods/ftp.cc:445 methods/rsh.cc:183 methods/rsh.cc:226
+#: methods/ftp.cc:335 methods/ftp.cc:446 methods/rsh.cc:183 methods/rsh.cc:226
 msgid "Connection timeout"
 msgid "Connection timeout"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:340
+#: methods/ftp.cc:341
 msgid "Server closed the connection"
 msgid "Server closed the connection"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:343 apt-pkg/contrib/fileutl.cc:543 methods/rsh.cc:190
+#: methods/ftp.cc:344 apt-pkg/contrib/fileutl.cc:543 methods/rsh.cc:190
 msgid "Read error"
 msgid "Read error"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:350 methods/rsh.cc:197
+#: methods/ftp.cc:351 methods/rsh.cc:197
 msgid "A response overflowed the buffer."
 msgid "A response overflowed the buffer."
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:367 methods/ftp.cc:379
+#: methods/ftp.cc:368 methods/ftp.cc:380
 msgid "Protocol corruption"
 msgid "Protocol corruption"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:451 apt-pkg/contrib/fileutl.cc:582 methods/rsh.cc:232
+#: methods/ftp.cc:452 apt-pkg/contrib/fileutl.cc:582 methods/rsh.cc:232
 msgid "Write error"
 msgid "Write error"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:692 methods/ftp.cc:698 methods/ftp.cc:734
+#: methods/ftp.cc:693 methods/ftp.cc:699 methods/ftp.cc:735
 msgid "Could not create a socket"
 msgid "Could not create a socket"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:703
+#: methods/ftp.cc:704
 msgid "Could not connect data socket, connection timed out"
 msgid "Could not connect data socket, connection timed out"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:709
+#: methods/ftp.cc:710
 msgid "Could not connect passive socket."
 msgid "Could not connect passive socket."
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:727
+#: methods/ftp.cc:728
 msgid "getaddrinfo was unable to get a listening socket"
 msgid "getaddrinfo was unable to get a listening socket"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:741
+#: methods/ftp.cc:742
 msgid "Could not bind a socket"
 msgid "Could not bind a socket"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:745
+#: methods/ftp.cc:746
 msgid "Could not listen on the socket"
 msgid "Could not listen on the socket"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:752
+#: methods/ftp.cc:753
 msgid "Could not determine the socket's name"
 msgid "Could not determine the socket's name"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:784
+#: methods/ftp.cc:785
 msgid "Unable to send PORT command"
 msgid "Unable to send PORT command"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:794
+#: methods/ftp.cc:795
 #, c-format
 #, c-format
 msgid "Unknown address family %u (AF_*)"
 msgid "Unknown address family %u (AF_*)"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:803
+#: methods/ftp.cc:804
 #, c-format
 #, c-format
 msgid "EPRT failed, server said: %s"
 msgid "EPRT failed, server said: %s"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:823
+#: methods/ftp.cc:824
 msgid "Data socket connect timed out"
 msgid "Data socket connect timed out"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:830
+#: methods/ftp.cc:831
 msgid "Unable to accept connection"
 msgid "Unable to accept connection"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:869 methods/http.cc:997 methods/rsh.cc:303
+#: methods/ftp.cc:870 methods/http.cc:1000 methods/rsh.cc:303
 msgid "Problem hashing file"
 msgid "Problem hashing file"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:882
+#: methods/ftp.cc:883
 #, c-format
 #, c-format
 msgid "Unable to fetch file, server said '%s'"
 msgid "Unable to fetch file, server said '%s'"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:897 methods/rsh.cc:322
+#: methods/ftp.cc:898 methods/rsh.cc:322
 msgid "Data socket timed out"
 msgid "Data socket timed out"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:927
+#: methods/ftp.cc:928
 #, c-format
 #, c-format
 msgid "Data transfer failed, server said '%s'"
 msgid "Data transfer failed, server said '%s'"
 msgstr ""
 msgstr ""
 
 
 #. Get the files information
 #. Get the files information
-#: methods/ftp.cc:1002
+#: methods/ftp.cc:1005
 msgid "Query"
 msgid "Query"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:1114
+#: methods/ftp.cc:1117
 msgid "Unable to invoke "
 msgid "Unable to invoke "
 msgstr ""
 msgstr ""
 
 
@@ -1831,80 +1831,80 @@ msgstr ""
 msgid "Read error from %s process"
 msgid "Read error from %s process"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:384
+#: methods/http.cc:385
 msgid "Waiting for headers"
 msgid "Waiting for headers"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:530
+#: methods/http.cc:531
 #, c-format
 #, c-format
 msgid "Got a single header line over %u chars"
 msgid "Got a single header line over %u chars"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:538
+#: methods/http.cc:539
 msgid "Bad header line"
 msgid "Bad header line"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:557 methods/http.cc:564
+#: methods/http.cc:558 methods/http.cc:565
 msgid "The HTTP server sent an invalid reply header"
 msgid "The HTTP server sent an invalid reply header"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:593
+#: methods/http.cc:594
 msgid "The HTTP server sent an invalid Content-Length header"
 msgid "The HTTP server sent an invalid Content-Length header"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:608
+#: methods/http.cc:609
 msgid "The HTTP server sent an invalid Content-Range header"
 msgid "The HTTP server sent an invalid Content-Range header"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:610
+#: methods/http.cc:611
 msgid "This HTTP server has broken range support"
 msgid "This HTTP server has broken range support"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:634
+#: methods/http.cc:635
 msgid "Unknown date format"
 msgid "Unknown date format"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:788
+#: methods/http.cc:791
 msgid "Select failed"
 msgid "Select failed"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:793
+#: methods/http.cc:796
 msgid "Connection timed out"
 msgid "Connection timed out"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:816
+#: methods/http.cc:819
 msgid "Error writing to output file"
 msgid "Error writing to output file"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:847
+#: methods/http.cc:850
 msgid "Error writing to file"
 msgid "Error writing to file"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:875
+#: methods/http.cc:878
 msgid "Error writing to the file"
 msgid "Error writing to the file"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:889
+#: methods/http.cc:892
 msgid "Error reading from server. Remote end closed connection"
 msgid "Error reading from server. Remote end closed connection"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:891
+#: methods/http.cc:894
 msgid "Error reading from server"
 msgid "Error reading from server"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:982 apt-pkg/contrib/mmap.cc:233
+#: methods/http.cc:985 apt-pkg/contrib/mmap.cc:233
 msgid "Failed to truncate file"
 msgid "Failed to truncate file"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:1147
+#: methods/http.cc:1150
 msgid "Bad header data"
 msgid "Bad header data"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:1164 methods/http.cc:1219
+#: methods/http.cc:1167 methods/http.cc:1222
 msgid "Connection failed"
 msgid "Connection failed"
 msgstr ""
 msgstr ""
 
 
-#: methods/http.cc:1311
+#: methods/http.cc:1314
 msgid "Internal error"
 msgid "Internal error"
 msgstr ""
 msgstr ""
 
 
@@ -2316,14 +2316,14 @@ msgstr ""
 msgid "Malformed line %u in source list %s (vendor id)"
 msgid "Malformed line %u in source list %s (vendor id)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/packagemanager.cc:321 apt-pkg/packagemanager.cc:576
+#: apt-pkg/packagemanager.cc:324 apt-pkg/packagemanager.cc:586
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "Could not perform immediate configuration on '%s'.Please see man 5 apt.conf "
 "Could not perform immediate configuration on '%s'.Please see man 5 apt.conf "
 "under APT::Immediate-Configure for details. (%d)"
 "under APT::Immediate-Configure for details. (%d)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/packagemanager.cc:437
+#: apt-pkg/packagemanager.cc:440
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "This installation run will require temporarily removing the essential "
 "This installation run will require temporarily removing the essential "
@@ -2331,7 +2331,7 @@ msgid ""
 "you really want to do it, activate the APT::Force-LoopBreak option."
 "you really want to do it, activate the APT::Force-LoopBreak option."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/packagemanager.cc:475
+#: apt-pkg/packagemanager.cc:478
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "Could not perform immediate configuration on already unpacked '%s'.Please "
 "Could not perform immediate configuration on already unpacked '%s'.Please "
@@ -2402,12 +2402,12 @@ msgstr ""
 msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
 msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/init.cc:132
+#: apt-pkg/init.cc:133
 #, c-format
 #, c-format
 msgid "Packaging system '%s' is not supported"
 msgid "Packaging system '%s' is not supported"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/init.cc:148
+#: apt-pkg/init.cc:149
 msgid "Unable to determine a suitable packaging system type"
 msgid "Unable to determine a suitable packaging system type"
 msgstr ""
 msgstr ""
 
 
@@ -2699,76 +2699,96 @@ msgstr ""
 msgid "Wrote %i records with %i missing files and %i mismatched files\n"
 msgid "Wrote %i records with %i missing files and %i mismatched files\n"
 msgstr ""
 msgstr ""
 
 
+#: apt-pkg/indexcopy.cc:530
+#, c-format
+msgid "Skipping nonexistent file %s"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:536
+#, c-format
+msgid "Can't find authentication record for: %s"
+msgstr ""
+
+#: apt-pkg/indexcopy.cc:542
+#, c-format
+msgid "Hash mismatch for: %s"
+msgstr ""
+
 #: apt-pkg/deb/dpkgpm.cc:49
 #: apt-pkg/deb/dpkgpm.cc:49
 #, c-format
 #, c-format
 msgid "Installing %s"
 msgid "Installing %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:50 apt-pkg/deb/dpkgpm.cc:660
+#: apt-pkg/deb/dpkgpm.cc:50 apt-pkg/deb/dpkgpm.cc:661
 #, c-format
 #, c-format
 msgid "Configuring %s"
 msgid "Configuring %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:51 apt-pkg/deb/dpkgpm.cc:667
+#: apt-pkg/deb/dpkgpm.cc:51 apt-pkg/deb/dpkgpm.cc:668
 #, c-format
 #, c-format
 msgid "Removing %s"
 msgid "Removing %s"
 msgstr ""
 msgstr ""
 
 
 #: apt-pkg/deb/dpkgpm.cc:52
 #: apt-pkg/deb/dpkgpm.cc:52
 #, c-format
 #, c-format
+msgid "Completely removing %s"
+msgstr ""
+
+#: apt-pkg/deb/dpkgpm.cc:53
+#, c-format
 msgid "Running post-installation trigger %s"
 msgid "Running post-installation trigger %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:557
+#: apt-pkg/deb/dpkgpm.cc:558
 #, c-format
 #, c-format
 msgid "Directory '%s' missing"
 msgid "Directory '%s' missing"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:653
+#: apt-pkg/deb/dpkgpm.cc:654
 #, c-format
 #, c-format
 msgid "Preparing %s"
 msgid "Preparing %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:654
+#: apt-pkg/deb/dpkgpm.cc:655
 #, c-format
 #, c-format
 msgid "Unpacking %s"
 msgid "Unpacking %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:659
+#: apt-pkg/deb/dpkgpm.cc:660
 #, c-format
 #, c-format
 msgid "Preparing to configure %s"
 msgid "Preparing to configure %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:661
+#: apt-pkg/deb/dpkgpm.cc:662
 #, c-format
 #, c-format
 msgid "Installed %s"
 msgid "Installed %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:666
+#: apt-pkg/deb/dpkgpm.cc:667
 #, c-format
 #, c-format
 msgid "Preparing for removal of %s"
 msgid "Preparing for removal of %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:668
+#: apt-pkg/deb/dpkgpm.cc:669
 #, c-format
 #, c-format
 msgid "Removed %s"
 msgid "Removed %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:673
+#: apt-pkg/deb/dpkgpm.cc:674
 #, c-format
 #, c-format
 msgid "Preparing to completely remove %s"
 msgid "Preparing to completely remove %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:674
+#: apt-pkg/deb/dpkgpm.cc:675
 #, c-format
 #, c-format
 msgid "Completely removed %s"
 msgid "Completely removed %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:878
+#: apt-pkg/deb/dpkgpm.cc:879
 msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n"
 msgid "Can not write log, openpty() failed (/dev/pts not mounted?)\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/deb/dpkgpm.cc:907
+#: apt-pkg/deb/dpkgpm.cc:908
 msgid "Running dpkg"
 msgid "Running dpkg"
 msgstr ""
 msgstr ""
 
 

Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 197 - 226
po/it.po


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 225 - 252
po/sk.po


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 429 - 454
po/zh_CN.po