Explorar o código

merged from lp:~donkult/apt/sid

Michael Vogt %!s(int64=17) %!d(string=hai) anos
pai
achega
fe58cbc866

+ 1 - 1
apt-inst/contrib/arfile.cc

@@ -96,7 +96,7 @@ bool ARArchive::LoadHeaders()
 	 char S[300];
 	 char S[300];
 	 unsigned long Len;
 	 unsigned long Len;
 	 if (StrToNum(Head.Name+3,Len,sizeof(Head.Size)-3) == false ||
 	 if (StrToNum(Head.Name+3,Len,sizeof(Head.Size)-3) == false ||
-	     Len >= strlen(S))
+	     Len >= sizeof(S))
 	 {
 	 {
 	    delete Memb;
 	    delete Memb;
 	    return _error->Error(_("Invalid archive member header"));
 	    return _error->Error(_("Invalid archive member header"));

+ 39 - 34
apt-pkg/acquire-item.cc

@@ -15,6 +15,7 @@
 // Include Files							/*{{{*/
 // Include Files							/*{{{*/
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/acquire-item.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
+#include <apt-pkg/aptconfiguration.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/sourcelist.h>
 #include <apt-pkg/vendorlist.h>
 #include <apt-pkg/vendorlist.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/error.h>
@@ -551,13 +552,14 @@ pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
    if(comprExt.empty()) 
    if(comprExt.empty()) 
    {
    {
       // autoselect the compression method
       // autoselect the compression method
-      if(FileExists("/bin/bzip2")) 
-	 CompressionExtension = ".bz2";
-      else 
-	 CompressionExtension = ".gz";
-   } else {
-      CompressionExtension = (comprExt == "plain" ? "" : comprExt);
+      std::vector<std::string> types = APT::Configuration::getCompressionTypes();
+      if (types.empty() == true)
+	 comprExt = "plain";
+      else
+	 comprExt = "." + types[0];
    }
    }
+   CompressionExtension = ((comprExt == "plain" || comprExt == ".") ? "" : comprExt);
+
    Desc.URI = URI + CompressionExtension;
    Desc.URI = URI + CompressionExtension;
 
 
    Desc.Description = URIDesc;
    Desc.Description = URIDesc;
@@ -584,28 +586,31 @@ string pkgAcqIndex::Custom600Headers()
 									/*}}}*/
 									/*}}}*/
 void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)	/*{{{*/
 void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)	/*{{{*/
 {
 {
-   bool descChanged = false;
-   // no .bz2 found, retry with .gz
-   if(Desc.URI.substr(Desc.URI.size()-3) == "bz2") {
-      Desc.URI = Desc.URI.substr(0,Desc.URI.size()-3) + "gz";
-
-      new pkgAcqIndex(Owner, RealURI, Desc.Description,Desc.ShortDesc,
-		      ExpectedHash, string(".gz"));
-	  descChanged = true;
-   }
-   // no .gz found, retry with uncompressed
-   else if(Desc.URI.substr(Desc.URI.size()-2) == "gz") {
-      Desc.URI = Desc.URI.substr(0,Desc.URI.size()-2);
+   std::vector<std::string> types = APT::Configuration::getCompressionTypes();
 
 
-      new pkgAcqIndex(Owner, RealURI, Desc.Description,Desc.ShortDesc,
-		      ExpectedHash, string("plain"));
-	  descChanged = true;
-   }
-   if (descChanged) {
-      Status = StatDone;
-      Complete = false;
-      Dequeue();
-      return;
+   for (std::vector<std::string>::const_iterator t = types.begin();
+	t != types.end(); t++)
+   {
+      // jump over all already tried compression types
+      const unsigned int nameLen = Desc.URI.size() - (*t).size();
+      if(Desc.URI.substr(nameLen) != *t)
+	 continue;
+
+      // we want to try it with the next extension
+      t++;
+
+      if (t != types.end())
+      {
+	 Desc.URI = Desc.URI.substr(0, nameLen) + *t;
+
+	 new pkgAcqIndex(Owner, RealURI, Desc.Description, Desc.ShortDesc,
+			 ExpectedHash, string(".").append(*t));
+
+	 Status = StatDone;
+	 Complete = false;
+	 Dequeue();
+	 return;
+      }
    }
    }
 
 
    // on decompression failure, remove bad versions in partial/
    // on decompression failure, remove bad versions in partial/
@@ -698,11 +703,11 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
       Local = true;
       Local = true;
    
    
    string compExt = flExtension(flNotDir(URI(Desc.URI).Path));
    string compExt = flExtension(flNotDir(URI(Desc.URI).Path));
-   const char *decompProg;
-   if(compExt == "bz2") 
-      decompProg = "bzip2";
-   else if(compExt == "gz") 
-      decompProg = "gzip";
+   string decompProg;
+
+   // get the binary name for your used compression type
+   decompProg = _config->Find(string("Acquire::CompressionTypes::").append(compExt),"");
+   if(decompProg.empty() == false);
    // flExtensions returns the full name if no extension is found
    // flExtensions returns the full name if no extension is found
    // this is why we have this complicated compare operation here
    // this is why we have this complicated compare operation here
    // FIMXE: add a new flJustExtension() that return "" if no
    // FIMXE: add a new flJustExtension() that return "" if no
@@ -717,9 +722,9 @@ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
 
 
    Decompression = true;
    Decompression = true;
    DestFile += ".decomp";
    DestFile += ".decomp";
-   Desc.URI = string(decompProg) + ":" + FileName;
+   Desc.URI = decompProg + ":" + FileName;
    QueueURI(Desc);
    QueueURI(Desc);
-   Mode = decompProg;
+   Mode = decompProg.c_str();
 }
 }
 									/*}}}*/
 									/*}}}*/
 // AcqIndexTrans::pkgAcqIndexTrans - Constructor			/*{{{*/
 // AcqIndexTrans::pkgAcqIndexTrans - Constructor			/*{{{*/

+ 3 - 7
apt-pkg/acquire-item.h

@@ -540,7 +540,9 @@ class pkgAcqIndex : public pkgAcquire::Item
     *
     *
     *  \param compressExt The compression-related extension with which
     *  \param compressExt The compression-related extension with which
     *  this index file should be downloaded, or "" to autodetect
     *  this index file should be downloaded, or "" to autodetect
-    *  (".bz2" is used if bzip2 is installed, ".gz" otherwise).
+    *  Compression types can be set with config Acquire::CompressionTypes,
+    *  default is ".lzma" or ".bz2" (if the needed binaries are present)
+    *  fallback is ".gz" or none.
     */
     */
    pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
    pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
 	       string ShortDesc, HashString ExpectedHash, string compressExt="");
 	       string ShortDesc, HashString ExpectedHash, string compressExt="");
@@ -569,12 +571,6 @@ class pkgAcqIndexTrans : public pkgAcqIndex
     *  \param URIDesc A "URI-style" description of this index file.
     *  \param URIDesc A "URI-style" description of this index file.
     *
     *
     *  \param ShortDesc A brief description of this index file.
     *  \param ShortDesc A brief description of this index file.
-    *
-    *  \param ExpectedHash The expected hashsum of this index file.
-    *
-    *  \param compressExt The compression-related extension with which
-    *  this index file should be downloaded, or "" to autodetect
-    *  (".bz2" is used if bzip2 is installed, ".gz" otherwise).
     */
     */
    pkgAcqIndexTrans(pkgAcquire *Owner,string URI,string URIDesc,
    pkgAcqIndexTrans(pkgAcquire *Owner,string URI,string URIDesc,
 		    string ShortDesc);
 		    string ShortDesc);

+ 78 - 0
apt-pkg/aptconfiguration.cc

@@ -0,0 +1,78 @@
+// -*- mode: cpp; mode: fold -*-
+// Description								/*{{{*/
+/* ######################################################################
+
+   Provide access methods to various configuration settings,
+   setup defaults and returns validate settings.
+
+   ##################################################################### */
+									/*}}}*/
+// Include Files							/*{{{*/
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/aptconfiguration.h>
+#include <apt-pkg/configuration.h>
+
+#include <vector>
+#include <string>
+									/*}}}*/
+namespace APT {
+// getCompressionTypes - Return Vector of usbale compressiontypes	/*{{{*/
+// ---------------------------------------------------------------------
+/* return a vector of compression types in the prefered order. */
+std::vector<std::string>
+const Configuration::getCompressionTypes(bool const &Cached) {
+	static std::vector<std::string> types;
+	if (types.empty() == false) {
+		if (Cached == true)
+			return types;
+		else
+			types.clear();
+	}
+
+	// Set default application paths to check for optional compression types
+	_config->CndSet("Dir::Bin::lzma", "/usr/bin/lzma");
+	_config->CndSet("Dir::Bin::bzip2", "/bin/bzip2");
+
+	::Configuration::Item const *Opts = _config->Tree("Acquire::CompressionTypes");
+	if (Opts != 0)
+		Opts = Opts->Child;
+
+	// at first, move over the options to setup at least the default options
+	bool foundLzma=false, foundBzip2=false, foundGzip=false;
+	for (; Opts != 0; Opts = Opts->Next) {
+		if (Opts->Value == "lzma")
+			foundLzma = true;
+		else if (Opts->Value == "bz2")
+			foundBzip2 = true;
+		else if (Opts->Value == "gz")
+			foundGzip = true;
+	}
+
+	// setup the defaults now
+	if (!foundBzip2)
+		_config->Set("Acquire::CompressionTypes::bz2","bzip2");
+	if (!foundLzma)
+		_config->Set("Acquire::CompressionTypes::lzma","lzma");
+	if (!foundGzip)
+		_config->Set("Acquire::CompressionTypes::gz","gzip");
+
+	// move again over the option tree to finially calculate our result
+	::Configuration::Item const *Types = _config->Tree("Acquire::CompressionTypes");
+	if (Types != 0)
+		Types = Types->Child;
+
+	for (; Types != 0; Types = Types->Next) {
+		string const appsetting = string("Dir::Bin::").append(Types->Value);
+		// ignore compression types we have no app ready to use
+		if (appsetting.empty() == false && _config->Exists(appsetting) == true) {
+			std::string const app = _config->FindFile(appsetting.c_str(), "");
+			if (app.empty() == false && FileExists(app) == false)
+				continue;
+		}
+		types.push_back(Types->Tag);
+	}
+
+	return types;
+}
+									/*}}}*/
+}

+ 46 - 0
apt-pkg/aptconfiguration.h

@@ -0,0 +1,46 @@
+// -*- mode: cpp; mode: fold -*-
+// Description								/*{{{*/
+/** \class APT::Configuration
+ *  \brief Provide access methods to various configuration settings
+ *
+ *  This class and their methods providing a layer around the usual access
+ *  methods with _config to ensure that settings are correct and to be able
+ *  to set defaults without the need to recheck it in every method again.
+ */
+									/*}}}*/
+#ifndef APT_CONFIGURATION_H
+#define APT_CONFIGURATION_H
+// Include Files							/*{{{*/
+#include <string>
+#include <vector>
+									/*}}}*/
+namespace APT {
+class Configuration {							/*{{{*/
+public:									/*{{{*/
+	/** \brief Returns a vector of usable Compression Types
+	 *
+	 *  Files can be compressed in various ways to decrease the size of the
+	 *  download. Therefore the Acquiremethods support a few compression types
+	 *  and some archives provide also a few different types. This option
+	 *  group exists to give the user the choice to prefer one type over the
+	 *  other (some compression types are very resource intensive - great if you
+	 *  have a limited download, bad if you have a really lowpowered hardware.)
+	 *
+	 *  This method ensures that the defaults are set and checks at runtime
+	 *  if the type can be used. E.g. the current default is to prefer bzip2
+	 *  over lzma and gz - if the bzip2 binary is not available it has not much
+	 *  sense in downloading the bz2 file, therefore we will not return bz2 as
+	 *  a usable compression type. The availability is checked with the settings
+	 *  in the Dir::Bin group.
+	 *
+	 *  \param Cached saves the result so we need to calculated it only once
+	 *                this parameter should ony be used for testing purposes.
+	 *
+	 *  \return a vector of (all) Language Codes in the prefered usage order
+	 */
+	std::vector<std::string> static const getCompressionTypes(bool const &Cached = true);
+									/*}}}*/
+};
+									/*}}}*/
+}
+#endif

+ 2 - 0
apt-pkg/contrib/fileutl.cc

@@ -451,10 +451,12 @@ bool ExecWait(pid_t Pid,const char *Name,bool Reap)
       if (Reap == true)
       if (Reap == true)
 	 return false;
 	 return false;
       if (WIFSIGNALED(Status) != 0)
       if (WIFSIGNALED(Status) != 0)
+      {
 	 if( WTERMSIG(Status) == SIGSEGV)
 	 if( WTERMSIG(Status) == SIGSEGV)
 	    return _error->Error(_("Sub-process %s received a segmentation fault."),Name);
 	    return _error->Error(_("Sub-process %s received a segmentation fault."),Name);
 	 else 
 	 else 
 	    return _error->Error(_("Sub-process %s received signal %u."),Name, WTERMSIG(Status));
 	    return _error->Error(_("Sub-process %s received signal %u."),Name, WTERMSIG(Status));
+      }
 
 
       if (WIFEXITED(Status) != 0)
       if (WIFEXITED(Status) != 0)
 	 return _error->Error(_("Sub-process %s returned an error code (%u)"),Name,WEXITSTATUS(Status));
 	 return _error->Error(_("Sub-process %s returned an error code (%u)"),Name,WEXITSTATUS(Status));

+ 2 - 2
apt-pkg/contrib/strutl.cc

@@ -304,13 +304,13 @@ string SizeToStr(double Size)
    {
    {
       if (ASize < 100 && I != 0)
       if (ASize < 100 && I != 0)
       {
       {
-         sprintf(S,"%.1f%c",ASize,Ext[I]);
+         sprintf(S,"%'.1f%c",ASize,Ext[I]);
 	 break;
 	 break;
       }
       }
       
       
       if (ASize < 10000)
       if (ASize < 10000)
       {
       {
-         sprintf(S,"%.0f%c",ASize,Ext[I]);
+         sprintf(S,"%'.0f%c",ASize,Ext[I]);
 	 break;
 	 break;
       }
       }
       ASize /= 1000.0;
       ASize /= 1000.0;

+ 2 - 2
apt-pkg/depcache.cc

@@ -823,7 +823,7 @@ void pkgDepCache::MarkDelete(PkgIterator const &Pkg, bool rPurge,
 bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge,
 bool pkgDepCache::IsDeleteOk(PkgIterator const &Pkg,bool rPurge,
 			      unsigned long Depth, bool FromUser)
 			      unsigned long Depth, bool FromUser)
 {
 {
-   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
+   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold && _config->FindB("APT::Ignore-Hold",false) == false)
    {
    {
       if (DebugMarker == true)
       if (DebugMarker == true)
 	 std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl;
 	 std::clog << OutputInDepth(Depth) << "Hold prevents MarkDelete of " << Pkg << " FU=" << FromUser << std::endl;
@@ -1085,7 +1085,7 @@ void pkgDepCache::MarkInstall(PkgIterator const &Pkg,bool AutoInst,
 bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst,
 bool pkgDepCache::IsInstallOk(PkgIterator const &Pkg,bool AutoInst,
 			      unsigned long Depth, bool FromUser)
 			      unsigned long Depth, bool FromUser)
 {
 {
-   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold)
+   if (FromUser == false && Pkg->SelectedState == pkgCache::State::Hold && _config->FindB("APT::Ignore-Hold",false) == false)
    {
    {
       if (DebugMarker == true)
       if (DebugMarker == true)
 	 std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << " FU=" << FromUser << std::endl;
 	 std::clog << OutputInDepth(Depth) << "Hold prevents MarkInstall of " << Pkg << " FU=" << FromUser << std::endl;

+ 3 - 0
apt-pkg/indexcopy.cc

@@ -592,7 +592,10 @@ bool SigVerify::CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
 
 
       // a Release.gpg without a Release should never happen
       // a Release.gpg without a Release should never happen
       if(!FileExists(*I+"Release"))
       if(!FileExists(*I+"Release"))
+      {
+	 delete MetaIndex;
 	 continue;
 	 continue;
+      }
 
 
 
 
       // verify the gpg signature of "Release"
       // verify the gpg signature of "Release"

+ 1 - 1
apt-pkg/init.cc

@@ -103,7 +103,7 @@ bool pkgInitConfig(Configuration &Cnf)
 
 
    if (Res == false)
    if (Res == false)
       return false;
       return false;
-   
+
    if (Cnf.FindB("Debug::pkgInitConfig",false) == true)
    if (Cnf.FindB("Debug::pkgInitConfig",false) == true)
       Cnf.Dump();
       Cnf.Dump();
    
    

+ 3 - 2
apt-pkg/makefile

@@ -34,14 +34,15 @@ SOURCE+= pkgcache.cc version.cc depcache.cc \
 	 acquire-worker.cc acquire-method.cc init.cc clean.cc \
 	 acquire-worker.cc acquire-method.cc init.cc clean.cc \
 	 srcrecords.cc cachefile.cc versionmatch.cc policy.cc \
 	 srcrecords.cc cachefile.cc versionmatch.cc policy.cc \
 	 pkgsystem.cc indexfile.cc pkgcachegen.cc acquire-item.cc \
 	 pkgsystem.cc indexfile.cc pkgcachegen.cc acquire-item.cc \
-	 indexrecords.cc vendor.cc vendorlist.cc cdrom.cc indexcopy.cc
+	 indexrecords.cc vendor.cc vendorlist.cc cdrom.cc indexcopy.cc \
+	 aptconfiguration.cc
 HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \
 HEADERS+= algorithms.h depcache.h pkgcachegen.h cacheiterators.h \
 	  orderlist.h sourcelist.h packagemanager.h tagfile.h \
 	  orderlist.h sourcelist.h packagemanager.h tagfile.h \
 	  init.h pkgcache.h version.h progress.h pkgrecords.h \
 	  init.h pkgcache.h version.h progress.h pkgrecords.h \
 	  acquire.h acquire-worker.h acquire-item.h acquire-method.h \
 	  acquire.h acquire-worker.h acquire-item.h acquire-method.h \
 	  clean.h srcrecords.h cachefile.h versionmatch.h policy.h \
 	  clean.h srcrecords.h cachefile.h versionmatch.h policy.h \
 	  pkgsystem.h indexfile.h metaindex.h indexrecords.h vendor.h \
 	  pkgsystem.h indexfile.h metaindex.h indexrecords.h vendor.h \
-          vendorlist.h cdrom.h indexcopy.h
+          vendorlist.h cdrom.h indexcopy.h aptconfiguration.h
 
 
 # Source code for the debian specific components
 # Source code for the debian specific components
 # In theory the deb headers do not need to be exported..
 # In theory the deb headers do not need to be exported..

+ 5 - 1
cmdline/apt-cache.cc

@@ -929,7 +929,11 @@ bool XVcg(CommandLine &CmdL)
 		Shapes[ShapeMap[Pkg->ID]]);
 		Shapes[ShapeMap[Pkg->ID]]);
       
       
    }
    }
-   
+
+   delete[] Show;
+   delete[] Flags;
+   delete[] ShapeMap;
+
    printf("}\n");
    printf("}\n");
    return true;
    return true;
 }
 }

+ 74 - 32
cmdline/apt-get.cc

@@ -868,8 +868,11 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
       if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
       if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
       {
       {
          struct statfs Stat;
          struct statfs Stat;
-         if (statfs(OutputDir.c_str(),&Stat) != 0 ||
-			 unsigned(Stat.f_type) != RAMFS_MAGIC)
+         if (statfs(OutputDir.c_str(),&Stat) != 0
+#if HAVE_STRUCT_STATFS_F_TYPE
+             || unsigned(Stat.f_type) != RAMFS_MAGIC
+#endif
+             )
             return _error->Error(_("You don't have enough free space in %s."),
             return _error->Error(_("You don't have enough free space in %s."),
                 OutputDir.c_str());
                 OutputDir.c_str());
       }
       }
@@ -1217,17 +1220,25 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 {
 {
    // We want to pull the version off the package specification..
    // We want to pull the version off the package specification..
    string VerTag;
    string VerTag;
+   string DefRel;
    string TmpSrc = Name;
    string TmpSrc = Name;
-   string::size_type Slash = TmpSrc.rfind('=');
+   const size_t found = TmpSrc.find_last_of("/=");
 
 
    // honor default release
    // honor default release
-   string DefRel = _config->Find("APT::Default-Release");
+   if (found != string::npos && TmpSrc[found] == '/')
+   {
+      DefRel = TmpSrc.substr(found+1);
+      TmpSrc = TmpSrc.substr(0,found);
+   }
+   else
+      DefRel = _config->Find("APT::Default-Release");
+
    pkgCache::PkgIterator Pkg = Cache.FindPkg(TmpSrc);
    pkgCache::PkgIterator Pkg = Cache.FindPkg(TmpSrc);
 
 
-   if (Slash != string::npos)
+   if (found != string::npos && TmpSrc[found] == '=')
    {
    {
-      VerTag = string(TmpSrc.begin() + Slash + 1,TmpSrc.end());
-      TmpSrc = string(TmpSrc.begin(),TmpSrc.begin() + Slash);
+      VerTag = TmpSrc.substr(found+1);
+      TmpSrc = TmpSrc.substr(0,found);
    } 
    } 
    else  if(!Pkg.end() && DefRel.empty() == false)
    else  if(!Pkg.end() && DefRel.empty() == false)
    {
    {
@@ -1249,10 +1260,13 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 		pkgCache::Flag::NotSource && Pkg.CurrentVer() != Ver)
 		pkgCache::Flag::NotSource && Pkg.CurrentVer() != Ver)
 	    continue;
 	    continue;
 	    
 	    
-	    //std::cout << VF.File().Archive() << std::endl;
-	    if(VF.File().Archive() && (VF.File().Archive() == DefRel)) 
+	    if((VF.File().Archive() != 0 && VF.File().Archive() == DefRel) ||
+		(VF.File().Codename() != 0 && VF.File().Codename() == DefRel))
 	    {
 	    {
-	       VerTag = Ver.VerStr();
+	       pkgRecords::Parser &Parse = Recs.Lookup(VF);
+	       VerTag = Parse.SourceVer();
+	       if (VerTag.empty())
+		  VerTag = Ver.VerStr();
 	       break;
 	       break;
 	    }
 	    }
 	 }
 	 }
@@ -1306,7 +1320,7 @@ pkgSrcRecords::Parser *FindSrc(const char *Name,pkgRecords &Recs,
 
 
       // show name mismatches
       // show name mismatches
       if (IsMatch == true && Parse->Package() != Src)       
       if (IsMatch == true && Parse->Package() != Src)       
-	 ioprintf(c1out,  _("No source package '%s' picking '%s' instead\n"), Parse->Package().c_str(), Src.c_str());
+	 ioprintf(c1out,  _("No source package '%s' picking '%s' instead\n"), Src.c_str(), Parse->Package().c_str());
       
       
       if (VerTag.empty() == false)
       if (VerTag.empty() == false)
       {
       {
@@ -1400,20 +1414,29 @@ bool DoAutomaticRemove(CacheFile &Cache)
    bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
    bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
    bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
    bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
    bool hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove");
    bool hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove");
-   pkgDepCache::ActionGroup group(*Cache);
 
 
+   pkgDepCache::ActionGroup group(*Cache);
    if(Debug)
    if(Debug)
       std::cout << "DoAutomaticRemove()" << std::endl;
       std::cout << "DoAutomaticRemove()" << std::endl;
 
 
-   if (_config->FindB("APT::Get::Remove",true) == false &&
-       doAutoRemove == true)
+   // we don't want to autoremove and we don't want to see it, so why calculating?
+   if (doAutoRemove == false && hideAutoRemove == true)
+      return true;
+
+   if (doAutoRemove == true &&
+	_config->FindB("APT::Get::Remove",true) == false)
    {
    {
       c1out << _("We are not supposed to delete stuff, can't start "
       c1out << _("We are not supposed to delete stuff, can't start "
 		 "AutoRemover") << std::endl;
 		 "AutoRemover") << std::endl;
-      doAutoRemove = false;
+      return false;
    }
    }
 
 
+   bool purgePkgs = _config->FindB("APT::Get::Purge", false);
+   bool smallList = (hideAutoRemove == false &&
+	strcasecmp(_config->Find("APT::Get::HideAutoRemove","").c_str(),"small") == 0);
+
    string autoremovelist, autoremoveversions;
    string autoremovelist, autoremoveversions;
+   unsigned long autoRemoveCount = 0;
    // look over the cache to see what can be removed
    // look over the cache to see what can be removed
    for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg)
    for (pkgCache::PkgIterator Pkg = Cache->PkgBegin(); ! Pkg.end(); ++Pkg)
    {
    {
@@ -1422,30 +1445,43 @@ bool DoAutomaticRemove(CacheFile &Cache)
 	 if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install())
 	 if(Pkg.CurrentVer() != 0 || Cache[Pkg].Install())
 	    if(Debug)
 	    if(Debug)
 	       std::cout << "We could delete %s" <<  Pkg.Name() << std::endl;
 	       std::cout << "We could delete %s" <<  Pkg.Name() << std::endl;
-	  
-	 // only show stuff in the list that is not yet marked for removal
-	 if(Cache[Pkg].Delete() == false) 
-	 {
-	    autoremovelist += string(Pkg.Name()) + " ";
-	    autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
-	 }
+
 	 if (doAutoRemove)
 	 if (doAutoRemove)
 	 {
 	 {
 	    if(Pkg.CurrentVer() != 0 && 
 	    if(Pkg.CurrentVer() != 0 && 
 	       Pkg->CurrentState != pkgCache::State::ConfigFiles)
 	       Pkg->CurrentState != pkgCache::State::ConfigFiles)
-	       Cache->MarkDelete(Pkg, _config->FindB("APT::Get::Purge", false));
+	       Cache->MarkDelete(Pkg, purgePkgs);
 	    else
 	    else
 	       Cache->MarkKeep(Pkg, false, false);
 	       Cache->MarkKeep(Pkg, false, false);
 	 }
 	 }
+	 else
+	 {
+	    // only show stuff in the list that is not yet marked for removal
+	    if(Cache[Pkg].Delete() == false) 
+	    {
+	       // we don't need to fill the strings if we don't need them
+	       if (smallList == true)
+		  ++autoRemoveCount;
+	       else
+	       {
+		 autoremovelist += string(Pkg.Name()) + " ";
+		 autoremoveversions += string(Cache[Pkg].CandVersion) + "\n";
+	       }
+	    }
+	 }
       }
       }
    }
    }
-   if (!hideAutoRemove) 
-      ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
-   if (!doAutoRemove && !hideAutoRemove && autoremovelist.size() > 0)
+   // if we don't remove them, we should show them!
+   if (doAutoRemove == false && (autoremovelist.empty() == false || autoRemoveCount != 0))
+   {
+      if (smallList == false)
+	 ShowList(c1out, _("The following packages were automatically installed and are no longer required:"), autoremovelist, autoremoveversions);
+      else
+	 ioprintf(c1out, _("%lu packages were automatically installed and are no longer required.\n"), autoRemoveCount);
       c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl;
       c1out << _("Use 'apt-get autoremove' to remove them.") << std::endl;
-
-   // Now see if we destroyed anything
-   if (Cache->BrokenCount() != 0)
+   }
+   // Now see if we had destroyed anything (if we had done anything)
+   else if (Cache->BrokenCount() != 0)
    {
    {
       c1out << _("Hmm, seems like the AutoRemover destroyed something which really\n"
       c1out << _("Hmm, seems like the AutoRemover destroyed something which really\n"
 	         "shouldn't happen. Please file a bug report against apt.") << endl;
 	         "shouldn't happen. Please file a bug report against apt.") << endl;
@@ -2179,8 +2215,11 @@ bool DoSource(CommandLine &CmdL)
    if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
    if (unsigned(Buf.f_bfree) < (FetchBytes - FetchPBytes)/Buf.f_bsize)
      {
      {
        struct statfs Stat;
        struct statfs Stat;
-       if (statfs(OutputDir.c_str(),&Stat) != 0 || 
-           unsigned(Stat.f_type) != RAMFS_MAGIC) 
+       if (statfs(OutputDir.c_str(),&Stat) != 0
+#if HAVE_STRUCT_STATFS_F_TYPE
+           || unsigned(Stat.f_type) != RAMFS_MAGIC
+#endif
+           ) 
           return _error->Error(_("You don't have enough free space in %s"),
           return _error->Error(_("You don't have enough free space in %s"),
               OutputDir.c_str());
               OutputDir.c_str());
       }
       }
@@ -2550,7 +2589,10 @@ bool DoBuildDep(CommandLine &CmdL)
       
       
       // Now we check the state of the packages,
       // Now we check the state of the packages,
       if (Cache->BrokenCount() != 0)
       if (Cache->BrokenCount() != 0)
-         return _error->Error(_("Build-dependencies for %s could not be satisfied."),*I);
+      {
+	 ShowBroken(cout, Cache, false);
+	 return _error->Error(_("Build-dependencies for %s could not be satisfied."),*I);
+      }
    }
    }
   
   
    if (InstallPackages(Cache, false, true) == false)
    if (InstallPackages(Cache, false, true) == false)

+ 4 - 0
configure.in

@@ -112,6 +112,10 @@ if test x"$HAVE_STATVFS" != x"yes"; then
    ])
    ])
 fi
 fi
 
 
+AC_CHECK_MEMBERS([struct statfs.f_type],,,
+    [$ac_includes_default
+     #include <sys/vfs.h>])
+
 dnl We should use the real timegm function if we have it.
 dnl We should use the real timegm function if we have it.
 AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
 AC_CHECK_FUNC(timegm,AC_DEFINE(HAVE_TIMEGM))
 AC_SUBST(HAVE_TIMEGM)
 AC_SUBST(HAVE_TIMEGM)

+ 46 - 3
debian/changelog

@@ -8,7 +8,50 @@ apt (0.7.22.3) UNRELEASED; urgency=low
       mentioned above are not specified.
       mentioned above are not specified.
       (Closes: #445985, #157759, #320184, #365880, #479617)
       (Closes: #445985, #157759, #320184, #365880, #479617)
 
 
- -- Michael Vogt <mvo@debian.org>  Wed, 19 Aug 2009 11:14:15 +0200
+  [ David Kalnischkies ]
+  * cmdline/apt-get.cc:
+    - add APT::Get::HideAutoRemove=small to display only a short line
+      instead of the full package list. (Closes: #537450)
+    - ShowBroken() in build-dep (by Mike O'Connor, Closes: #145916)
+    - check for statfs.f_type (by Robert Millan, Closes: #509313)
+    - correct the order of picked package binary vs source in source
+    - use SourceVersion instead of the BinaryVersion to get the source
+      Patch by Matt Kraai, thanks! (Closes: #382826)
+    - add pkg/archive and codename in source (Closes: #414105, #441178)
+  * apt-pkg/contrib/strutl.cc:
+    - enable thousand separator according to the current locale
+      (by Luca Bruno, Closes: #223712)
+  * doc/apt.conf.5.xml:
+    - mention the apt.conf.d dir (by Vincent McIntyre, Closes: #520831)
+  * apt-inst/contrib/arfile.cc:
+    - use sizeof instead strlen (by Marius Vollmer, Closes: #504325)
+  * doc/apt-mark.8.xml:
+    - improve manpage based on patch by Carl Chenet (Closes: #510286)
+  * apt-pkg/acquire-item.cc:
+    - use configsettings for dynamic compression type use and order.
+      Based on a patch by Jyrki Muukkonen, thanks! (LP: #71746)
+  * apt-pkg/aptconfiguration.cc:
+    - add default configuration for compression types and add lzma
+      support. Order is now bzip2, lzma, gzip, none (Closes: #510526)
+  * ftparchive/writer.cc:
+    - add lzma support also here, patch for this (and inspiration for
+      the one above) by Robert Millan, thanks!
+  * apt-pkg/depcache.cc:
+    - restore the --ignore-hold effect in the Is{Delete,Install}Ok hooks
+  * doc/apt-get.8.xml:
+    - update the source description to reflect what it actually does
+      and how it can be used. (Closes: #413021)
+  * methods/http.cc:
+    - allow empty Reason-Phase in Status-Line to please squid,
+      thanks Modestas Vainius for noticing! (Closes: #531157, LP: #411435)
+
+  [ George Danchev ]
+  * cmdline/apt-cache.cc:
+    - fix a memory leak in the xvcg method (Closes: #511557)
+  * apt-pkg/indexcopy.cc:
+    - fix a memory leak then the Release file not exists (Closes: #511556)
+
+ -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 27 Aug 2009 14:15:39 +0200
 
 
 apt (0.7.22.2) unstable; urgency=low
 apt (0.7.22.2) unstable; urgency=low
 
 
@@ -96,7 +139,7 @@ apt (0.7.22) unstable; urgency=low
       (off by default)
       (off by default)
     - send "dpkg-exec" message on the status fd when dpkg is run
     - send "dpkg-exec" message on the status fd when dpkg is run
     - provide DPkg::Chroot-Directory config option (useful for testing)
     - provide DPkg::Chroot-Directory config option (useful for testing)
-    - fix potential hang when in a backgroud process group
+    - fix potential hang when in a background process group
   * apt-pkg/algorithms.cc:
   * apt-pkg/algorithms.cc:
     - consider recommends when making the scores for the problem 
     - consider recommends when making the scores for the problem 
       resolver
       resolver
@@ -125,7 +168,7 @@ apt (0.7.22) unstable; urgency=low
   * apt-pkg/deb/debsystem.cc:
   * apt-pkg/deb/debsystem.cc:
     - make strings i18n able 
     - make strings i18n able 
   * fix problematic use of tolower() when calculating the version 
   * fix problematic use of tolower() when calculating the version 
-    hash by using locale independant tolower_ascii() function. 
+    hash by using locale independent tolower_ascii() function. 
     Thanks to M. Vefa Bicakci (LP: #80248)
     Thanks to M. Vefa Bicakci (LP: #80248)
   * build fixes for g++-4.4
   * build fixes for g++-4.4
   * cmdline/apt-mark:
   * cmdline/apt-mark:

+ 29 - 10
doc/apt-get.8.xml

@@ -85,9 +85,19 @@
          <arg choice='plain'>purge <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg choice='plain'>purge <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg choice='plain'>source 
          <arg choice='plain'>source 
 			 <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable>
 			 <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable>
-				 <arg>
-					 =<replaceable>pkg_version_number</replaceable>
-				 </arg>
+				<arg>
+					<group choice='req'>
+						<arg choice='plain'>
+							=<replaceable>pkg_version_number</replaceable>
+						</arg>
+						<arg choice='plain'>
+							/<replaceable>target_release_name</replaceable>
+						</arg>
+						<arg choice='plain'>
+							/<replaceable>target_release_codename</replaceable>
+						</arg>
+					</group>
+				</arg>
 			 </arg>
 			 </arg>
 	     </arg>
 	     </arg>
          <arg choice='plain'>build-dep <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
          <arg choice='plain'>build-dep <arg choice="plain" rep="repeat"><replaceable>pkg</replaceable></arg></arg>
@@ -240,13 +250,22 @@
      <listitem><para><literal>source</literal> causes <command>apt-get</command> to fetch source packages. APT 
      <listitem><para><literal>source</literal> causes <command>apt-get</command> to fetch source packages. APT 
      will examine the available packages to decide which source package to 
      will examine the available packages to decide which source package to 
      fetch. It will then find and download into the current directory the 
      fetch. It will then find and download into the current directory the 
-     newest available version of that source package. Source packages are 
-     tracked separately from binary packages via <literal>deb-src</literal> type lines 
-     in the &sources-list; file. This probably will mean that you will not 
-     get the same source as the package you have installed or as you could 
-     install. If the --compile options is specified then the package will be 
-     compiled to a binary .deb using dpkg-buildpackage, if --download-only is 
-     specified then the source package will not be unpacked.</para>
+     newest available version of that source package while respect the
+     default release, set with the option <literal>APT::Default-Release</literal>,
+     the <option>-t</option> option or per package with with the
+     <literal>pkg/release</literal> syntax, if possible.</para>
+
+     <para>Source packages are tracked separately
+     from binary packages via <literal>deb-src</literal> type lines 
+     in the &sources-list; file. This means that you will need to add such a line
+     for each repository you want to get sources from. If you don't do this
+     you will properly get another (newer, older or none) source version than
+     the one you have installed or could install.</para>
+
+     <para>If the <option>--compile</option> options is specified
+     then the package will be compiled to a binary .deb using
+     <command>dpkg-buildpackage</command>, if <option>--download-only</option>
+     is specified then the source package will not be unpacked.</para>
 
 
      <para>A specific source version can be retrieved by postfixing the source name
      <para>A specific source version can be retrieved by postfixing the source name
      with an equals and then the version to fetch, similar to the mechanism
      with an equals and then the version to fetch, similar to the mechanism

+ 38 - 10
doc/apt-mark.8.xml

@@ -15,7 +15,7 @@
    &apt-email;
    &apt-email;
    &apt-product;
    &apt-product;
    <!-- The last update date -->
    <!-- The last update date -->
-   <date>2 November 2007</date>
+   <date>9 August 2009</date>
  </refentryinfo>
  </refentryinfo>
  
  
  <refmeta>
  <refmeta>
@@ -32,11 +32,19 @@
  <!-- Arguments -->
  <!-- Arguments -->
  <refsynopsisdiv>
  <refsynopsisdiv>
    <cmdsynopsis>
    <cmdsynopsis>
-      <command>apt-mark</command>
-      <arg><option>-hv</option></arg>
-      <arg><option>-f=<replaceable>FILENAME</replaceable></option></arg>
-      <group choice="req"><arg>markauto</arg><arg>unmarkauto</arg></group>
-      <arg choice="plain" rep="repeat"><replaceable>package</replaceable></arg>
+	<command>apt-mark</command>
+	<arg><option>-hv</option></arg>
+	<arg><option>-f=<replaceable>FILENAME</replaceable></option></arg>
+	<group choice="plain">
+		<arg choice="plain">
+			<group choice="req">
+				<arg choice="plain">markauto</arg>
+				<arg choice="plain">unmarkauto</arg>
+			</group>
+			<arg choice="plain" rep="repeat"><replaceable>package</replaceable></arg>
+		</arg>
+		<arg choice="plain">showauto</arg>
+	</group>
    </cmdsynopsis>
    </cmdsynopsis>
  </refsynopsisdiv>
  </refsynopsisdiv>
  
  
@@ -49,7 +57,8 @@
      other packages are installed to satisfy its dependencies, the
      other packages are installed to satisfy its dependencies, the
      dependencies are marked as being automatically installed.  Once
      dependencies are marked as being automatically installed.  Once
      these automatically installed packages are no longer depended on
      these automatically installed packages are no longer depended on
-     by any manually installed packages, they will be removed.
+     by any manually installed packages, they will be removed by e.g.
+     <command>apt-get</command> or <command>aptitude</command>.
    </para>
    </para>
      <variablelist>
      <variablelist>
        <varlistentry><term>markauto</term>
        <varlistentry><term>markauto</term>
@@ -67,16 +76,24 @@
      depend on it.
      depend on it.
        </para></listitem>
        </para></listitem>
        </varlistentry>
        </varlistentry>
+
+       <varlistentry><term>showauto</term>
+	 <listitem><para><literal>showauto</literal> is used to print a
+     list of manually installed packages with each package on a new line.
+       </para></listitem>
+       </varlistentry>
      </variablelist>
      </variablelist>
  </refsect1>
  </refsect1>
  
  
  <refsect1><title>options</title>
  <refsect1><title>options</title>
    
    
    <variablelist>
    <variablelist>
-     <varlistentry><term><option>-f=<filename>FILENAME</filename></option></term><term><option>--file=<filename>FILENAME</filename></option></term>
+	<varlistentry>
+		<term><option>-f=<filename><replaceable>FILENAME</replaceable></filename></option></term>
+		<term><option>--file=<filename><replaceable>FILENAME</replaceable></filename></option></term>
      <listitem><para>
      <listitem><para>
       
       
-     Read/Write package stats from <filename>FILENAME</filename>
+     Read/Write package stats from <filename><replaceable>FILENAME</replaceable></filename>
      instead of the default location, which
      instead of the default location, which
      is <filename>extended_status</filename> in the directory defined
      is <filename>extended_status</filename> in the directory defined
      by the Configuration Item: <literal>Dir::State</literal>.</para></listitem>
      by the Configuration Item: <literal>Dir::State</literal>.</para></listitem>
@@ -101,8 +118,19 @@
    </variablelist>
    </variablelist>
  </refsect1>
  </refsect1>
 
 
+ <refsect1><title>Files</title>
+   <variablelist>
+      <varlistentry><term><filename>/var/lib/apt/extended_states</filename></term>
+      <listitem><para>Status list of auto-installed packages.
+		      Configuration Item: <literal>Dir::State</literal>
+		      sets the path to the <filename>extended_states</filename> file.
+      </para></listitem>
+      </varlistentry>
+   </variablelist>
+ </refsect1>
+
  <refsect1><title>See Also</title>
  <refsect1><title>See Also</title>
-   <para>&apt-conf;</para>
+   <para>&apt-get;,&aptitude;,&apt-conf;</para>
  </refsect1>
  </refsect1>
 
 
  <refsect1><title>Diagnostics</title>
  <refsect1><title>Diagnostics</title>

+ 26 - 1
doc/apt.conf.5.xml

@@ -308,6 +308,20 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
      </para></listitem>
      </para></listitem>
      </varlistentry>
      </varlistentry>
 
 
+     <varlistentry><term>CompressionTypes</term>
+     <listitem><para>List of compression types which are understood by the acquire methods.
+     Files like <filename>Packages</filename> can be available in various compression formats.
+     This list defines in which order the acquire methods will try to download these files.
+     Per default <command>bzip2</command> compressed files will be prefered over
+     <command>lzma</command>, <command>gzip</command> and uncompressed files. The syntax for
+     the configuration fileentry is
+     <synopsis>Acquire::CompressionTypes::<replaceable>FileExtension</replaceable> "<replaceable>Methodname</replaceable>";</synopsis>
+     e.g. <synopsis>Acquire::CompressionTypes::bz2 "bzip2";</synopsis>
+     Note that at runtime the <literal>Dir::Bin::<replaceable>Methodname</replaceable></literal> will
+     be checked: If this setting exists the method will only be used if this file exists, e.g. for
+     the bzip2 method above (the inbuilt) setting is <literallayout>Dir::Bin::bzip2 "/bin/bzip2";</literallayout>
+     </para></listitem>
+     </varlistentry>
    </variablelist>
    </variablelist>
   </para>
   </para>
  </refsect1>
  </refsect1>
@@ -342,6 +356,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
 
 
    <para>Binary programs are pointed to by <literal>Dir::Bin</literal>. <literal>Dir::Bin::Methods</literal> 
    <para>Binary programs are pointed to by <literal>Dir::Bin</literal>. <literal>Dir::Bin::Methods</literal> 
    specifies the location of the method handlers and <literal>gzip</literal>, 
    specifies the location of the method handlers and <literal>gzip</literal>, 
+   <literal>bzip2</literal>, <literal>lzma</literal>,
    <literal>dpkg</literal>, <literal>apt-get</literal> <literal>dpkg-source</literal> 
    <literal>dpkg</literal>, <literal>apt-get</literal> <literal>dpkg-source</literal> 
    <literal>dpkg-buildpackage</literal> and <literal>apt-cache</literal> specify the location
    <literal>dpkg-buildpackage</literal> and <literal>apt-cache</literal> specify the location
    of the respective programs.</para>
    of the respective programs.</para>
@@ -827,7 +842,17 @@ is commented.
  </refsect1>
  </refsect1>
  
  
  <refsect1><title>Files</title>
  <refsect1><title>Files</title>
-   <para><filename>/etc/apt/apt.conf</filename></para>
+   <variablelist>
+      <varlistentry><term><filename>/etc/apt/apt.conf</filename></term>
+      <listitem><para>APT configuration file.
+      Configuration Item: <literal>Dir::Etc::Main</literal>.</para></listitem> 
+      </varlistentry>
+
+      <varlistentry><term><filename>/etc/apt/apt.conf.d/</filename></term>
+      <listitem><para>APT configuration file fragments.
+      Configuration Item: <literal>Dir::Etc::Parts</literal>.</para></listitem>
+      </varlistentry>
+   </variablelist>
  </refsect1>
  </refsect1>
  
  
  <refsect1><title>See Also</title>
  <refsect1><title>See Also</title>

+ 2 - 0
ftparchive/writer.cc

@@ -815,9 +815,11 @@ ReleaseWriter::ReleaseWriter(string DB)
    AddPattern("Packages");
    AddPattern("Packages");
    AddPattern("Packages.gz");
    AddPattern("Packages.gz");
    AddPattern("Packages.bz2");
    AddPattern("Packages.bz2");
+   AddPattern("Packages.lzma");
    AddPattern("Sources");
    AddPattern("Sources");
    AddPattern("Sources.gz");
    AddPattern("Sources.gz");
    AddPattern("Sources.bz2");
    AddPattern("Sources.bz2");
+   AddPattern("Sources.lzma");
    AddPattern("Release");
    AddPattern("Release");
    AddPattern("md5sum.txt");
    AddPattern("md5sum.txt");
 
 

+ 2 - 2
methods/http.cc

@@ -552,7 +552,7 @@ bool ServerState::HeaderLine(string Line)
       // Evil servers return no version
       // Evil servers return no version
       if (Line[4] == '/')
       if (Line[4] == '/')
       {
       {
-	 if (sscanf(Line.c_str(),"HTTP/%u.%u %u %[^\n]",&Major,&Minor,
+	 if (sscanf(Line.c_str(),"HTTP/%u.%u %u%[^\n]",&Major,&Minor,
 		    &Result,Code) != 4)
 		    &Result,Code) != 4)
 	    return _error->Error(_("The HTTP server sent an invalid reply header"));
 	    return _error->Error(_("The HTTP server sent an invalid reply header"));
       }
       }
@@ -560,7 +560,7 @@ bool ServerState::HeaderLine(string Line)
       {
       {
 	 Major = 0;
 	 Major = 0;
 	 Minor = 9;
 	 Minor = 9;
-	 if (sscanf(Line.c_str(),"HTTP %u %[^\n]",&Result,Code) != 2)
+	 if (sscanf(Line.c_str(),"HTTP %u%[^\n]",&Result,Code) != 2)
 	    return _error->Error(_("The HTTP server sent an invalid reply header"));
 	    return _error->Error(_("The HTTP server sent an invalid reply header"));
       }
       }
 
 

+ 142 - 135
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-07-26 01:10+0200\n"
+"POT-Creation-Date: 2009-08-21 11:35+0200\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"
@@ -21,8 +21,8 @@ msgid "Package %s version %s has an unmet dep:\n"
 msgstr ""
 msgstr ""
 
 
 #: cmdline/apt-cache.cc:181 cmdline/apt-cache.cc:550 cmdline/apt-cache.cc:644
 #: cmdline/apt-cache.cc:181 cmdline/apt-cache.cc:550 cmdline/apt-cache.cc:644
-#: cmdline/apt-cache.cc:797 cmdline/apt-cache.cc:1017
-#: cmdline/apt-cache.cc:1419 cmdline/apt-cache.cc:1571
+#: cmdline/apt-cache.cc:797 cmdline/apt-cache.cc:1021
+#: cmdline/apt-cache.cc:1423 cmdline/apt-cache.cc:1575
 #, c-format
 #, c-format
 msgid "Unable to locate package %s"
 msgid "Unable to locate package %s"
 msgstr ""
 msgstr ""
@@ -91,72 +91,72 @@ msgstr ""
 msgid "Total space accounted for: "
 msgid "Total space accounted for: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:469 cmdline/apt-cache.cc:1217
+#: cmdline/apt-cache.cc:469 cmdline/apt-cache.cc:1221
 #, c-format
 #, c-format
 msgid "Package file %s is out of sync."
 msgid "Package file %s is out of sync."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1293
+#: cmdline/apt-cache.cc:1297
 msgid "You must give exactly one pattern"
 msgid "You must give exactly one pattern"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1447
+#: cmdline/apt-cache.cc:1451
 msgid "No packages found"
 msgid "No packages found"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1524
+#: cmdline/apt-cache.cc:1528
 msgid "Package files:"
 msgid "Package files:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1531 cmdline/apt-cache.cc:1618
+#: cmdline/apt-cache.cc:1535 cmdline/apt-cache.cc:1622
 msgid "Cache is out of sync, can't x-ref a package file"
 msgid "Cache is out of sync, can't x-ref a package file"
 msgstr ""
 msgstr ""
 
 
 #. Show any packages have explicit pins
 #. Show any packages have explicit pins
-#: cmdline/apt-cache.cc:1545
+#: cmdline/apt-cache.cc:1549
 msgid "Pinned packages:"
 msgid "Pinned packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1557 cmdline/apt-cache.cc:1598
+#: cmdline/apt-cache.cc:1561 cmdline/apt-cache.cc:1602
 msgid "(not found)"
 msgid "(not found)"
 msgstr ""
 msgstr ""
 
 
 #. Installed version
 #. Installed version
-#: cmdline/apt-cache.cc:1578
+#: cmdline/apt-cache.cc:1582
 msgid "  Installed: "
 msgid "  Installed: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1580 cmdline/apt-cache.cc:1588
+#: cmdline/apt-cache.cc:1584 cmdline/apt-cache.cc:1592
 msgid "(none)"
 msgid "(none)"
 msgstr ""
 msgstr ""
 
 
 #. Candidate Version
 #. Candidate Version
-#: cmdline/apt-cache.cc:1585
+#: cmdline/apt-cache.cc:1589
 msgid "  Candidate: "
 msgid "  Candidate: "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1595
+#: cmdline/apt-cache.cc:1599
 msgid "  Package pin: "
 msgid "  Package pin: "
 msgstr ""
 msgstr ""
 
 
 #. Show the priority tables
 #. Show the priority tables
-#: cmdline/apt-cache.cc:1604
+#: cmdline/apt-cache.cc:1608
 msgid "  Version table:"
 msgid "  Version table:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1619
+#: cmdline/apt-cache.cc:1623
 #, c-format
 #, c-format
 msgid "       %4i %s\n"
 msgid "       %4i %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-cache.cc:1714 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:2584 cmdline/apt-sortpkgs.cc:144
+#: cmdline/apt-get.cc:2626 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 ""
 
 
-#: cmdline/apt-cache.cc:1721
+#: cmdline/apt-cache.cc:1725
 msgid ""
 msgid ""
 "Usage: apt-cache [options] command\n"
 "Usage: apt-cache [options] command\n"
 "       apt-cache [options] add file1 [file2 ...]\n"
 "       apt-cache [options] add file1 [file2 ...]\n"
@@ -549,7 +549,7 @@ msgstr ""
 msgid "Y"
 msgid "Y"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1659
+#: cmdline/apt-get.cc:149 cmdline/apt-get.cc:1695
 #, c-format
 #, c-format
 msgid "Regex compilation error - %s"
 msgid "Regex compilation error - %s"
 msgstr ""
 msgstr ""
@@ -692,7 +692,7 @@ msgstr ""
 msgid "Some packages could not be authenticated"
 msgid "Some packages could not be authenticated"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:734 cmdline/apt-get.cc:883
+#: cmdline/apt-get.cc:734 cmdline/apt-get.cc:886
 msgid "There are problems and -y was used without --force-yes"
 msgid "There are problems and -y was used without --force-yes"
 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:2001 cmdline/apt-get.cc:2034
+#: cmdline/apt-get.cc:811 cmdline/apt-get.cc:2037 cmdline/apt-get.cc:2070
 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:2082 cmdline/apt-get.cc:2328
+#: cmdline/apt-get.cc:821 cmdline/apt-get.cc:2118 cmdline/apt-get.cc:2367
 #: 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,25 +741,25 @@ 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:866 cmdline/apt-get.cc:2177
+#: cmdline/apt-get.cc:866 cmdline/apt-get.cc:2213
 #, c-format
 #, c-format
 msgid "Couldn't determine free space in %s"
 msgid "Couldn't determine free space in %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:873
+#: cmdline/apt-get.cc:876
 #, 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:889 cmdline/apt-get.cc:909
+#: cmdline/apt-get.cc:892 cmdline/apt-get.cc:912
 msgid "Trivial Only specified but this is not a trivial operation."
 msgid "Trivial Only specified but this is not a trivial operation."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:891
+#: cmdline/apt-get.cc:894
 msgid "Yes, do as I say!"
 msgid "Yes, do as I say!"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:893
+#: cmdline/apt-get.cc:896
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "You are about to do something potentially harmful.\n"
 "You are about to do something potentially harmful.\n"
@@ -767,74 +767,74 @@ msgid ""
 " ?] "
 " ?] "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:899 cmdline/apt-get.cc:918
+#: cmdline/apt-get.cc:902 cmdline/apt-get.cc:921
 msgid "Abort."
 msgid "Abort."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:914
+#: cmdline/apt-get.cc:917
 msgid "Do you want to continue [Y/n]? "
 msgid "Do you want to continue [Y/n]? "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:986 cmdline/apt-get.cc:2225 apt-pkg/algorithms.cc:1389
+#: cmdline/apt-get.cc:989 cmdline/apt-get.cc:2264 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 ""
 
 
-#: cmdline/apt-get.cc:1004
+#: cmdline/apt-get.cc:1007
 msgid "Some files failed to download"
 msgid "Some files failed to download"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1005 cmdline/apt-get.cc:2234
+#: cmdline/apt-get.cc:1008 cmdline/apt-get.cc:2273
 msgid "Download complete and in download only mode"
 msgid "Download complete and in download only mode"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1011
+#: cmdline/apt-get.cc:1014
 msgid ""
 msgid ""
 "Unable to fetch some archives, maybe run apt-get update or try with --fix-"
 "Unable to fetch some archives, maybe run apt-get update or try with --fix-"
 "missing?"
 "missing?"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1015
+#: cmdline/apt-get.cc:1018
 msgid "--fix-missing and media swapping is not currently supported"
 msgid "--fix-missing and media swapping is not currently supported"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1020
+#: cmdline/apt-get.cc:1023
 msgid "Unable to correct missing packages."
 msgid "Unable to correct missing packages."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1021
+#: cmdline/apt-get.cc:1024
 msgid "Aborting install."
 msgid "Aborting install."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1055
+#: cmdline/apt-get.cc:1058
 #, c-format
 #, c-format
 msgid "Note, selecting %s instead of %s\n"
 msgid "Note, selecting %s instead of %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1065
+#: cmdline/apt-get.cc:1068
 #, c-format
 #, c-format
 msgid "Skipping %s, it is already installed and upgrade is not set.\n"
 msgid "Skipping %s, it is already installed and upgrade is not set.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1083
+#: cmdline/apt-get.cc:1086
 #, c-format
 #, c-format
 msgid "Package %s is not installed, so not removed\n"
 msgid "Package %s is not installed, so not removed\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1094
+#: cmdline/apt-get.cc:1097
 #, c-format
 #, c-format
 msgid "Package %s is a virtual package provided by:\n"
 msgid "Package %s is a virtual package provided by:\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1106
+#: cmdline/apt-get.cc:1109
 msgid " [Installed]"
 msgid " [Installed]"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1111
+#: cmdline/apt-get.cc:1114
 msgid "You should explicitly select one to install."
 msgid "You should explicitly select one to install."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1116
+#: cmdline/apt-get.cc:1119
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "Package %s is not available, but is referred to by another package.\n"
 "Package %s is not available, but is referred to by another package.\n"
@@ -842,68 +842,73 @@ msgid ""
 "is only available from another source\n"
 "is only available from another source\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1135
+#: cmdline/apt-get.cc:1138
 msgid "However the following packages replace it:"
 msgid "However the following packages replace it:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1138
+#: cmdline/apt-get.cc:1141
 #, c-format
 #, c-format
 msgid "Package %s has no installation candidate"
 msgid "Package %s has no installation candidate"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1158
+#: cmdline/apt-get.cc:1161
 #, c-format
 #, c-format
 msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n"
 msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1166
+#: cmdline/apt-get.cc:1169
 #, c-format
 #, c-format
 msgid "%s is already the newest version.\n"
 msgid "%s is already the newest version.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1195
+#: cmdline/apt-get.cc:1198
 #, c-format
 #, c-format
 msgid "Release '%s' for '%s' was not found"
 msgid "Release '%s' for '%s' was not found"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1197
+#: cmdline/apt-get.cc:1200
 #, c-format
 #, c-format
 msgid "Version '%s' for '%s' was not found"
 msgid "Version '%s' for '%s' was not found"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1203
+#: cmdline/apt-get.cc:1206
 #, c-format
 #, c-format
 msgid "Selected version %s (%s) for %s\n"
 msgid "Selected version %s (%s) for %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1309
+#: cmdline/apt-get.cc:1323
 #, c-format
 #, c-format
 msgid "No source package '%s' picking '%s' instead\n"
 msgid "No source package '%s' picking '%s' instead\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1346
+#: cmdline/apt-get.cc:1360
 msgid "The update command takes no arguments"
 msgid "The update command takes no arguments"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1359
+#: cmdline/apt-get.cc:1373
 msgid "Unable to lock the list directory"
 msgid "Unable to lock the list directory"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1411
+#: cmdline/apt-get.cc:1429
 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:1443
+#: cmdline/apt-get.cc:1478
 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:1445
+#: cmdline/apt-get.cc:1480
+#, c-format
+msgid "%lu packages were automatically installed and are no longer required.\n"
+msgstr ""
+
+#: cmdline/apt-get.cc:1481
 msgid "Use 'apt-get autoremove' to remove them."
 msgid "Use 'apt-get autoremove' to remove them."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1450
+#: cmdline/apt-get.cc:1486
 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."
@@ -919,49 +924,49 @@ msgstr ""
 #. "that package should be filed.") << endl;
 #. "that package should be filed.") << endl;
 #. }
 #. }
 #.
 #.
-#: cmdline/apt-get.cc:1453 cmdline/apt-get.cc:1743
+#: cmdline/apt-get.cc:1489 cmdline/apt-get.cc:1779
 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:1457
+#: cmdline/apt-get.cc:1493
 msgid "Internal Error, AutoRemover broke stuff"
 msgid "Internal Error, AutoRemover broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1476
+#: cmdline/apt-get.cc:1512
 msgid "Internal error, AllUpgrade broke stuff"
 msgid "Internal error, AllUpgrade broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1531
+#: cmdline/apt-get.cc:1567
 #, c-format
 #, c-format
 msgid "Couldn't find task %s"
 msgid "Couldn't find task %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1646 cmdline/apt-get.cc:1682
+#: cmdline/apt-get.cc:1682 cmdline/apt-get.cc:1718
 #, c-format
 #, c-format
 msgid "Couldn't find package %s"
 msgid "Couldn't find package %s"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1669
+#: cmdline/apt-get.cc:1705
 #, 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:1700
+#: cmdline/apt-get.cc:1736
 #, c-format
 #, c-format
 msgid "%s set to manually installed.\n"
 msgid "%s set to manually installed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1713
+#: cmdline/apt-get.cc:1749
 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:1716
+#: cmdline/apt-get.cc:1752
 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:1728
+#: cmdline/apt-get.cc:1764
 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"
@@ -969,152 +974,152 @@ msgid ""
 "or been moved out of Incoming."
 "or been moved out of Incoming."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1746
+#: cmdline/apt-get.cc:1782
 msgid "Broken packages"
 msgid "Broken packages"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1775
+#: cmdline/apt-get.cc:1811
 msgid "The following extra packages will be installed:"
 msgid "The following extra packages will be installed:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1864
+#: cmdline/apt-get.cc:1900
 msgid "Suggested packages:"
 msgid "Suggested packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1865
+#: cmdline/apt-get.cc:1901
 msgid "Recommended packages:"
 msgid "Recommended packages:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1894
+#: cmdline/apt-get.cc:1930
 msgid "Calculating upgrade... "
 msgid "Calculating upgrade... "
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1897 methods/ftp.cc:702 methods/connect.cc:112
+#: cmdline/apt-get.cc:1933 methods/ftp.cc:702 methods/connect.cc:112
 msgid "Failed"
 msgid "Failed"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1902
+#: cmdline/apt-get.cc:1938
 msgid "Done"
 msgid "Done"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:1969 cmdline/apt-get.cc:1977
+#: cmdline/apt-get.cc:2005 cmdline/apt-get.cc:2013
 msgid "Internal error, problem resolver broke stuff"
 msgid "Internal error, problem resolver broke stuff"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2077
+#: cmdline/apt-get.cc:2113
 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:2107 cmdline/apt-get.cc:2346
+#: cmdline/apt-get.cc:2143 cmdline/apt-get.cc:2385
 #, 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:2156
+#: cmdline/apt-get.cc:2192
 #, c-format
 #, c-format
 msgid "Skipping already downloaded file '%s'\n"
 msgid "Skipping already downloaded file '%s'\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2184
+#: cmdline/apt-get.cc:2223
 #, 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:2190
+#: cmdline/apt-get.cc:2229
 #, 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:2193
+#: cmdline/apt-get.cc:2232
 #, 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:2199
+#: cmdline/apt-get.cc:2238
 #, c-format
 #, c-format
 msgid "Fetch source %s\n"
 msgid "Fetch source %s\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2230
+#: cmdline/apt-get.cc:2269
 msgid "Failed to fetch some archives."
 msgid "Failed to fetch some archives."
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2258
+#: cmdline/apt-get.cc:2297
 #, 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:2270
+#: cmdline/apt-get.cc:2309
 #, c-format
 #, c-format
 msgid "Unpack command '%s' failed.\n"
 msgid "Unpack command '%s' failed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2271
+#: cmdline/apt-get.cc:2310
 #, 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:2288
+#: cmdline/apt-get.cc:2327
 #, c-format
 #, c-format
 msgid "Build command '%s' failed.\n"
 msgid "Build command '%s' failed.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2307
+#: cmdline/apt-get.cc:2346
 msgid "Child process failed"
 msgid "Child process failed"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2323
+#: cmdline/apt-get.cc:2362
 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:2351
+#: cmdline/apt-get.cc:2390
 #, 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:2371
+#: cmdline/apt-get.cc:2410
 #, c-format
 #, c-format
 msgid "%s has no build depends.\n"
 msgid "%s has no build depends.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2423
+#: cmdline/apt-get.cc:2462
 #, 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:2476
+#: cmdline/apt-get.cc:2515
 #, 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:2512
+#: cmdline/apt-get.cc:2551
 #, 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:2539
+#: cmdline/apt-get.cc:2578
 #, 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:2553
+#: cmdline/apt-get.cc:2594
 #, 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:2557
+#: cmdline/apt-get.cc:2599
 msgid "Failed to process build dependencies"
 msgid "Failed to process build dependencies"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2589
+#: cmdline/apt-get.cc:2631
 msgid "Supported modules:"
 msgid "Supported modules:"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2630
+#: cmdline/apt-get.cc:2672
 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"
@@ -1158,7 +1163,7 @@ msgid ""
 "                       This APT has Super Cow Powers.\n"
 "                       This APT has Super Cow Powers.\n"
 msgstr ""
 msgstr ""
 
 
-#: cmdline/apt-get.cc:2797
+#: cmdline/apt-get.cc:2839
 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"
@@ -1381,9 +1386,11 @@ msgstr ""
 msgid "File %s/%s overwrites the one in the package %s"
 msgid "File %s/%s overwrites the one in the package %s"
 msgstr ""
 msgstr ""
 
 
+#. Only warn if there are no sources.list.d.
+#. Only warn if there is no sources.list file.
 #: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822
 #: apt-inst/extract.cc:464 apt-pkg/contrib/configuration.cc:822
-#: apt-pkg/contrib/cdromutl.cc:157 apt-pkg/sourcelist.cc:163
-#: apt-pkg/sourcelist.cc:169 apt-pkg/sourcelist.cc:324 apt-pkg/acquire.cc:419
+#: 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/init.cc:89 apt-pkg/init.cc:97 apt-pkg/clean.cc:33
 #: apt-pkg/init.cc:89 apt-pkg/init.cc:97 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
@@ -1610,7 +1617,7 @@ msgstr ""
 msgid "Server closed the connection"
 msgid "Server closed the connection"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:541 methods/rsh.cc:190
+#: methods/ftp.cc:338 apt-pkg/contrib/fileutl.cc:543 methods/rsh.cc:190
 msgid "Read error"
 msgid "Read error"
 msgstr ""
 msgstr ""
 
 
@@ -1622,7 +1629,7 @@ msgstr ""
 msgid "Protocol corruption"
 msgid "Protocol corruption"
 msgstr ""
 msgstr ""
 
 
-#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:580 methods/rsh.cc:232
+#: methods/ftp.cc:446 apt-pkg/contrib/fileutl.cc:582 methods/rsh.cc:232
 msgid "Write error"
 msgid "Write error"
 msgstr ""
 msgstr ""
 
 
@@ -2075,50 +2082,50 @@ msgstr ""
 msgid "Waited for %s but it wasn't there"
 msgid "Waited for %s but it wasn't there"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:455
+#: apt-pkg/contrib/fileutl.cc:456
 #, c-format
 #, c-format
 msgid "Sub-process %s received a segmentation fault."
 msgid "Sub-process %s received a segmentation fault."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:457
+#: apt-pkg/contrib/fileutl.cc:458
 #, c-format
 #, c-format
 msgid "Sub-process %s received signal %u."
 msgid "Sub-process %s received signal %u."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:460
+#: apt-pkg/contrib/fileutl.cc:462
 #, c-format
 #, c-format
 msgid "Sub-process %s returned an error code (%u)"
 msgid "Sub-process %s returned an error code (%u)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:462
+#: apt-pkg/contrib/fileutl.cc:464
 #, c-format
 #, c-format
 msgid "Sub-process %s exited unexpectedly"
 msgid "Sub-process %s exited unexpectedly"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:506
+#: apt-pkg/contrib/fileutl.cc:508
 #, c-format
 #, c-format
 msgid "Could not open file %s"
 msgid "Could not open file %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:562
+#: apt-pkg/contrib/fileutl.cc:564
 #, c-format
 #, c-format
 msgid "read, still have %lu to read but none left"
 msgid "read, still have %lu to read but none left"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:592
+#: apt-pkg/contrib/fileutl.cc:594
 #, c-format
 #, c-format
 msgid "write, still have %lu to write but couldn't"
 msgid "write, still have %lu to write but couldn't"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:667
+#: apt-pkg/contrib/fileutl.cc:669
 msgid "Problem closing the file"
 msgid "Problem closing the file"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:673
+#: apt-pkg/contrib/fileutl.cc:675
 msgid "Problem unlinking the file"
 msgid "Problem unlinking the file"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/contrib/fileutl.cc:684
+#: apt-pkg/contrib/fileutl.cc:686
 msgid "Problem syncing the file"
 msgid "Problem syncing the file"
 msgstr ""
 msgstr ""
 
 
@@ -2211,16 +2218,16 @@ msgstr ""
 msgid "Dependency generation"
 msgid "Dependency generation"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/depcache.cc:173 apt-pkg/depcache.cc:192 apt-pkg/depcache.cc:196
+#: apt-pkg/depcache.cc:173 apt-pkg/depcache.cc:193 apt-pkg/depcache.cc:197
 msgid "Reading state information"
 msgid "Reading state information"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/depcache.cc:220
+#: apt-pkg/depcache.cc:223
 #, c-format
 #, c-format
 msgid "Failed to open StateFile %s"
 msgid "Failed to open StateFile %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/depcache.cc:226
+#: apt-pkg/depcache.cc:229
 #, c-format
 #, c-format
 msgid "Failed to write temporary StateFile %s"
 msgid "Failed to write temporary StateFile %s"
 msgstr ""
 msgstr ""
@@ -2260,27 +2267,27 @@ msgstr ""
 msgid "Malformed line %lu in source list %s (dist parse)"
 msgid "Malformed line %lu in source list %s (dist parse)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/sourcelist.cc:203
+#: apt-pkg/sourcelist.cc:206
 #, c-format
 #, c-format
 msgid "Opening %s"
 msgid "Opening %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/sourcelist.cc:220 apt-pkg/cdrom.cc:445
+#: apt-pkg/sourcelist.cc:223 apt-pkg/cdrom.cc:445
 #, c-format
 #, c-format
 msgid "Line %u too long in source list %s."
 msgid "Line %u too long in source list %s."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/sourcelist.cc:240
+#: apt-pkg/sourcelist.cc:243
 #, c-format
 #, c-format
 msgid "Malformed line %u in source list %s (type)"
 msgid "Malformed line %u in source list %s (type)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/sourcelist.cc:244
+#: apt-pkg/sourcelist.cc:247
 #, c-format
 #, c-format
 msgid "Type '%s' is not known on line %u in source list %s"
 msgid "Type '%s' is not known on line %u in source list %s"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/sourcelist.cc:252 apt-pkg/sourcelist.cc:255
+#: apt-pkg/sourcelist.cc:255 apt-pkg/sourcelist.cc:258
 #, c-format
 #, c-format
 msgid "Malformed line %u in source list %s (vendor id)"
 msgid "Malformed line %u in source list %s (vendor id)"
 msgstr ""
 msgstr ""
@@ -2490,44 +2497,44 @@ msgstr ""
 msgid "IO Error saving source cache"
 msgid "IO Error saving source cache"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:127
+#: apt-pkg/acquire-item.cc:128
 #, c-format
 #, c-format
 msgid "rename failed, %s (%s -> %s)."
 msgid "rename failed, %s (%s -> %s)."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:394
+#: apt-pkg/acquire-item.cc:395
 msgid "MD5Sum mismatch"
 msgid "MD5Sum mismatch"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:644 apt-pkg/acquire-item.cc:1406
+#: apt-pkg/acquire-item.cc:649 apt-pkg/acquire-item.cc:1411
 msgid "Hash Sum mismatch"
 msgid "Hash Sum mismatch"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:1101
+#: apt-pkg/acquire-item.cc:1106
 msgid "There is no public key available for the following key IDs:\n"
 msgid "There is no public key available for the following key IDs:\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:1211
+#: apt-pkg/acquire-item.cc:1216
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "I wasn't able to locate a file for the %s package. This might mean you need "
 "I wasn't able to locate a file for the %s package. This might mean you need "
 "to manually fix this package. (due to missing arch)"
 "to manually fix this package. (due to missing arch)"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:1270
+#: apt-pkg/acquire-item.cc:1275
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "I wasn't able to locate file for the %s package. This might mean you need to "
 "I wasn't able to locate file for the %s package. This might mean you need to "
 "manually fix this package."
 "manually fix this package."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:1311
+#: apt-pkg/acquire-item.cc:1316
 #, c-format
 #, c-format
 msgid ""
 msgid ""
 "The package index files are corrupted. No Filename: field for package %s."
 "The package index files are corrupted. No Filename: field for package %s."
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/acquire-item.cc:1398
+#: apt-pkg/acquire-item.cc:1403
 msgid "Size mismatch"
 msgid "Size mismatch"
 msgstr ""
 msgstr ""
 
 
@@ -2634,22 +2641,22 @@ msgstr ""
 msgid "Source list entries for this disc are:\n"
 msgid "Source list entries for this disc are:\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:832
+#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:835
 #, c-format
 #, c-format
 msgid "Wrote %i records.\n"
 msgid "Wrote %i records.\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:834
+#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:837
 #, c-format
 #, c-format
 msgid "Wrote %i records with %i missing files.\n"
 msgid "Wrote %i records with %i missing files.\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:837
+#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:840
 #, c-format
 #, c-format
 msgid "Wrote %i records with %i mismatched files\n"
 msgid "Wrote %i records with %i mismatched files\n"
 msgstr ""
 msgstr ""
 
 
-#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:840
+#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:843
 #, c-format
 #, c-format
 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 ""