]> git.saurik.com Git - apt.git/commitdiff
* merged with the apt--mvo branch
authorMichael Vogt <egon@bottom>
Wed, 2 May 2007 11:54:10 +0000 (13:54 +0200)
committerMichael Vogt <egon@bottom>
Wed, 2 May 2007 11:54:10 +0000 (13:54 +0200)
1  2 
apt-pkg/acquire-item.cc
apt-pkg/acquire.h
apt-pkg/cdrom.cc
apt-pkg/contrib/cdromutl.h
apt-pkg/init.h
apt-pkg/makefile
configure.in
debian/changelog
doc/apt_preferences.5.xml
methods/makefile
po/apt-all.pot

diff --combined apt-pkg/acquire-item.cc
index 020047c06e1d66d438d7c8d62756713f7a096847,f566b16b803775abfb54995a1d025331b5f4f6de..3fd2304d2cd9b8e0182a4bebd3ca7abc21dba910
@@@ -24,8 -24,6 +24,8 @@@
  #include <apt-pkg/strutl.h>
  #include <apt-pkg/fileutl.h>
  #include <apt-pkg/md5.h>
 +#include <apt-pkg/sha1.h>
 +#include <apt-pkg/tagfile.h>
  
  #include <apti18n.h>
      
@@@ -33,7 -31,6 +33,7 @@@
  #include <unistd.h>
  #include <errno.h>
  #include <string>
 +#include <sstream>
  #include <stdio.h>
                                                                        /*}}}*/
  
@@@ -78,7 -75,7 +78,7 @@@ void pkgAcquire::Item::Failed(string Me
         Dequeue();
         return;
        }
 -      
 +
        Status = StatError;
        Dequeue();
     }   
@@@ -103,8 -100,7 +103,8 @@@ void pkgAcquire::Item::Done(string Mess
  {
     // We just downloaded something..
     string FileName = LookupTag(Message,"Filename");
 -   if (Complete == false && FileName == DestFile)
 +   // we only inform the Log class if it was actually not a local thing
 +   if (Complete == false && !Local && FileName == DestFile)
     {
        if (Owner->Log != 0)
         Owner->Log->Fetched(Size,atoi(LookupTag(Message,"Resume-Point","0").c_str()));
@@@ -135,433 -131,14 +135,433 @@@ void pkgAcquire::Item::Rename(string Fr
  }
                                                                        /*}}}*/
  
 +
 +// AcqDiffIndex::AcqDiffIndex - Constructor                   
 +// ---------------------------------------------------------------------
 +/* Get the DiffIndex file first and see if there are patches availabe 
 + * If so, create a pkgAcqIndexDiffs fetcher that will get and apply the
 + * patches. If anything goes wrong in that process, it will fall back to
 + * the original packages file
 + */
 +pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
 +                               string URI,string URIDesc,string ShortDesc,
 +                               string ExpectedMD5)
 +   : Item(Owner), RealURI(URI), ExpectedMD5(ExpectedMD5), Description(URIDesc)
 +{
 +   
 +   Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
 +
 +   Desc.Description = URIDesc + "/DiffIndex";
 +   Desc.Owner = this;
 +   Desc.ShortDesc = ShortDesc;
 +   Desc.URI = URI + ".diff/Index";
 +
 +   DestFile = _config->FindDir("Dir::State::lists") + "partial/";
 +   DestFile += URItoFileName(URI) + string(".DiffIndex");
 +
 +   if(Debug)
 +      std::clog << "pkgAcqDiffIndex: " << Desc.URI << std::endl;
 +
 +   // look for the current package file
 +   CurrentPackagesFile = _config->FindDir("Dir::State::lists");
 +   CurrentPackagesFile += URItoFileName(RealURI);
 +
 +   // FIXME: this file:/ check is a hack to prevent fetching
 +   //        from local sources. this is really silly, and
 +   //        should be fixed cleanly as soon as possible
 +   if(!FileExists(CurrentPackagesFile) || 
 +      Desc.URI.substr(0,strlen("file:/")) == "file:/")
 +   {
 +      // we don't have a pkg file or we don't want to queue
 +      if(Debug)
 +       std::clog << "No index file, local or canceld by user" << std::endl;
 +      Failed("", NULL);
 +      return;
 +   }
 +
 +   if(Debug) 
 +      std::clog << "pkgAcqIndexDiffs::pkgAcqIndexDiffs(): " 
 +              << CurrentPackagesFile << std::endl;
 +   
 +   QueueURI(Desc);
 +
 +}
 +
 +// AcqIndex::Custom600Headers - Insert custom request headers         /*{{{*/
 +// ---------------------------------------------------------------------
 +/* The only header we use is the last-modified header. */
 +string pkgAcqDiffIndex::Custom600Headers()
 +{
 +   string Final = _config->FindDir("Dir::State::lists");
 +   Final += URItoFileName(RealURI) + string(".IndexDiff");
 +   
 +   if(Debug)
 +      std::clog << "Custom600Header-IMS: " << Final << std::endl;
 +
 +   struct stat Buf;
 +   if (stat(Final.c_str(),&Buf) != 0)
 +      return "\nIndex-File: true";
 +   
 +   return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
 +}
 +
 +
 +bool pkgAcqDiffIndex::ParseDiffIndex(string IndexDiffFile)
 +{
 +   if(Debug)
 +      std::clog << "pkgAcqIndexDiffs::ParseIndexDiff() " << IndexDiffFile 
 +              << std::endl;
 +
 +   pkgTagSection Tags;
 +   string ServerSha1;
 +   vector<DiffInfo> available_patches;
 +   
 +   FileFd Fd(IndexDiffFile,FileFd::ReadOnly);
 +   pkgTagFile TF(&Fd);
 +   if (_error->PendingError() == true)
 +      return false;
 +
 +   if(TF.Step(Tags) == true)
 +   {
 +      string local_sha1;
 +      bool found = false;
 +      DiffInfo d;
 +      string size;
 +
 +      string tmp = Tags.FindS("SHA1-Current");
 +      std::stringstream ss(tmp);
 +      ss >> ServerSha1;
 +
 +      FileFd fd(CurrentPackagesFile, FileFd::ReadOnly);
 +      SHA1Summation SHA1;
 +      SHA1.AddFD(fd.Fd(), fd.Size());
 +      local_sha1 = string(SHA1.Result());
 +
 +      if(local_sha1 == ServerSha1) 
 +      {
 +       // we have the same sha1 as the server
 +       if(Debug)
 +          std::clog << "Package file is up-to-date" << std::endl;
 +       // set found to true, this will queue a pkgAcqIndexDiffs with
 +       // a empty availabe_patches
 +       found = true;
 +      } 
 +      else 
 +      {
 +       if(Debug)
 +          std::clog << "SHA1-Current: " << ServerSha1 << std::endl;
 +
 +       // check the historie and see what patches we need
 +       string history = Tags.FindS("SHA1-History");     
 +       std::stringstream hist(history);
 +       while(hist >> d.sha1 >> size >> d.file) 
 +       {
 +          d.size = atoi(size.c_str());
 +          // read until the first match is found
 +          if(d.sha1 == local_sha1) 
 +             found=true;
 +          // from that point on, we probably need all diffs
 +          if(found) 
 +          {
 +             if(Debug)
 +                std::clog << "Need to get diff: " << d.file << std::endl;
 +             available_patches.push_back(d);
 +          }
 +       }
 +      }
 +
 +      // we have something, queue the next diff
 +      if(found) 
 +      {
 +       // queue the diffs
 +      int last_space = Description.rfind(" ");
 +      if(last_space != string::npos)
 +        Description.erase(last_space, Description.size()-last_space);
 +       new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
 +                            ExpectedMD5, available_patches);
 +       Complete = false;
 +       Status = StatDone;
 +       Dequeue();
 +       return true;
 +      }
 +   }
 +
 +   // Nothing found, report and return false
 +   // Failing here is ok, if we return false later, the full
 +   // IndexFile is queued
 +   if(Debug)
 +      std::clog << "Can't find a patch in the index file" << std::endl;
 +   return false;
 +}
 +
 +void pkgAcqDiffIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
 +{
 +   if(Debug)
 +      std::clog << "pkgAcqDiffIndex failed: " << Desc.URI << std::endl
 +              << "Falling back to normal index file aquire" << std::endl;
 +
 +   new pkgAcqIndex(Owner, RealURI, Description, Desc.ShortDesc, 
 +                 ExpectedMD5);
 +
 +   Complete = false;
 +   Status = StatDone;
 +   Dequeue();
 +}
 +
 +void pkgAcqDiffIndex::Done(string Message,unsigned long Size,string Md5Hash,
 +                         pkgAcquire::MethodConfig *Cnf)
 +{
 +   if(Debug)
 +      std::clog << "pkgAcqDiffIndex::Done(): " << Desc.URI << std::endl;
 +
 +   Item::Done(Message,Size,Md5Hash,Cnf);
 +
 +   string FinalFile;
 +   FinalFile = _config->FindDir("Dir::State::lists")+URItoFileName(RealURI);
 +
 +   // sucess in downloading the index
 +   // rename the index
 +   FinalFile += string(".IndexDiff");
 +   if(Debug)
 +      std::clog << "Renaming: " << DestFile << " -> " << FinalFile 
 +              << std::endl;
 +   Rename(DestFile,FinalFile);
 +   chmod(FinalFile.c_str(),0644);
 +   DestFile = FinalFile;
 +
 +   if(!ParseDiffIndex(DestFile))
 +      return Failed("", NULL);
 +
 +   Complete = true;
 +   Status = StatDone;
 +   Dequeue();
 +   return;
 +}
 +
 +
 +
 +// AcqIndexDiffs::AcqIndexDiffs - Constructor                 
 +// ---------------------------------------------------------------------
 +/* The package diff is added to the queue. one object is constructed
 + * for each diff and the index
 + */
 +pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
 +                                 string URI,string URIDesc,string ShortDesc,
 +                                 string ExpectedMD5, vector<DiffInfo> diffs)
 +   : Item(Owner), RealURI(URI), ExpectedMD5(ExpectedMD5), 
 +     available_patches(diffs)
 +{
 +   
 +   DestFile = _config->FindDir("Dir::State::lists") + "partial/";
 +   DestFile += URItoFileName(URI);
 +
 +   Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
 +
 +   Description = URIDesc;
 +   Desc.Owner = this;
 +   Desc.ShortDesc = ShortDesc;
 +
 +   if(available_patches.size() == 0) 
 +   {
 +      // we are done (yeah!)
 +      Finish(true);
 +   }
 +   else
 +   {
 +      // get the next diff
 +      State = StateFetchDiff;
 +      QueueNextDiff();
 +   }
 +}
 +
 +
 +void pkgAcqIndexDiffs::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
 +{
 +   if(Debug)
 +      std::clog << "pkgAcqIndexDiffs failed: " << Desc.URI << std::endl
 +              << "Falling back to normal index file aquire" << std::endl;
 +   new pkgAcqIndex(Owner, RealURI, Description,Desc.ShortDesc, 
 +                 ExpectedMD5);
 +   Finish();
 +}
 +
 +
 +// helper that cleans the item out of the fetcher queue
 +void pkgAcqIndexDiffs::Finish(bool allDone)
 +{
 +   // we restore the original name, this is required, otherwise
 +   // the file will be cleaned
 +   if(allDone) 
 +   {
 +      DestFile = _config->FindDir("Dir::State::lists");
 +      DestFile += URItoFileName(RealURI);
 +
 +      // do the final md5sum checking
 +      MD5Summation sum;
 +      FileFd Fd(DestFile, FileFd::ReadOnly);
 +      sum.AddFD(Fd.Fd(), Fd.Size());
 +      Fd.Close();
 +      string MD5 = (string)sum.Result();
 +
 +      if (!ExpectedMD5.empty() && MD5 != ExpectedMD5)
 +      {
 +       Status = StatAuthError;
 +       ErrorText = _("MD5Sum mismatch");
 +       Rename(DestFile,DestFile + ".FAILED");
 +       Dequeue();
 +       return;
 +      }
 +
 +      // this is for the "real" finish
 +      Complete = true;
 +      Status = StatDone;
 +      Dequeue();
 +      if(Debug)
 +       std::clog << "\n\nallDone: " << DestFile << "\n" << std::endl;
 +      return;
 +   }
 +
 +   if(Debug)
 +      std::clog << "Finishing: " << Desc.URI << std::endl;
 +   Complete = false;
 +   Status = StatDone;
 +   Dequeue();
 +   return;
 +}
 +
 +
 +
 +bool pkgAcqIndexDiffs::QueueNextDiff()
 +{
 +
 +   // calc sha1 of the just patched file
 +   string FinalFile = _config->FindDir("Dir::State::lists");
 +   FinalFile += URItoFileName(RealURI);
 +
 +   FileFd fd(FinalFile, FileFd::ReadOnly);
 +   SHA1Summation SHA1;
 +   SHA1.AddFD(fd.Fd(), fd.Size());
 +   string local_sha1 = string(SHA1.Result());
 +   if(Debug)
 +      std::clog << "QueueNextDiff: " 
 +              << FinalFile << " (" << local_sha1 << ")"<<std::endl;
 +
 +   // remove all patches until the next matching patch is found
 +   // this requires the Index file to be ordered
 +   for(vector<DiffInfo>::iterator I=available_patches.begin();
 +       available_patches.size() > 0 && 
 +        I != available_patches.end() &&
 +        (*I).sha1 != local_sha1; 
 +       I++) 
 +   {
 +      available_patches.erase(I);
 +   }
 +
 +   // error checking and falling back if no patch was found
 +   if(available_patches.size() == 0) 
 +   { 
 +      Failed("", NULL);
 +      return false;
 +   }
 +
 +   // queue the right diff
 +   Desc.URI = string(RealURI) + ".diff/" + available_patches[0].file + ".gz";
 +   Desc.Description = Description + " " + available_patches[0].file + string(".pdiff");
 +
 +   DestFile = _config->FindDir("Dir::State::lists") + "partial/";
 +   DestFile += URItoFileName(RealURI + ".diff/" + available_patches[0].file);
 +
 +   if(Debug)
 +      std::clog << "pkgAcqIndexDiffs::QueueNextDiff(): " << Desc.URI << std::endl;
 +   
 +   QueueURI(Desc);
 +
 +   return true;
 +}
 +
 +
 +
 +void pkgAcqIndexDiffs::Done(string Message,unsigned long Size,string Md5Hash,
 +                          pkgAcquire::MethodConfig *Cnf)
 +{
 +   if(Debug)
 +      std::clog << "pkgAcqIndexDiffs::Done(): " << Desc.URI << std::endl;
 +
 +   Item::Done(Message,Size,Md5Hash,Cnf);
 +
 +   string FinalFile;
 +   FinalFile = _config->FindDir("Dir::State::lists")+URItoFileName(RealURI);
 +
 +   // sucess in downloading a diff, enter ApplyDiff state
 +   if(State == StateFetchDiff) 
 +   {
 +
 +      if(Debug)
 +       std::clog << "Sending to gzip method: " << FinalFile << std::endl;
 +
 +      string FileName = LookupTag(Message,"Filename");
 +      State = StateUnzipDiff;
 +      Local = true;
 +      Desc.URI = "gzip:" + FileName;
 +      DestFile += ".decomp";
 +      QueueURI(Desc);
 +      Mode = "gzip";
 +      return;
 +   } 
 +
 +   // sucess in downloading a diff, enter ApplyDiff state
 +   if(State == StateUnzipDiff) 
 +   {
 +
 +      // rred excepts the patch as $FinalFile.ed
 +      Rename(DestFile,FinalFile+".ed");
 +
 +      if(Debug)
 +       std::clog << "Sending to rred method: " << FinalFile << std::endl;
 +
 +      State = StateApplyDiff;
 +      Local = true;
 +      Desc.URI = "rred:" + FinalFile;
 +      QueueURI(Desc);
 +      Mode = "rred";
 +      return;
 +   } 
 +
 +
 +   // success in download/apply a diff, queue next (if needed)
 +   if(State == StateApplyDiff)
 +   {
 +      // remove the just applied patch
 +      available_patches.erase(available_patches.begin());
 +
 +      // move into place
 +      if(Debug) 
 +      {
 +       std::clog << "Moving patched file in place: " << std::endl
 +                 << DestFile << " -> " << FinalFile << std::endl;
 +      }
 +      Rename(DestFile,FinalFile);
 +      chmod(FinalFile.c_str(),0644);
 +
 +      // see if there is more to download
 +      if(available_patches.size() > 0) {
 +       new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
 +                            ExpectedMD5, available_patches);
 +       return Finish();
 +      } else 
 +       return Finish(true);
 +   }
 +}
 +
 +
  // AcqIndex::AcqIndex - Constructor                                   /*{{{*/
  // ---------------------------------------------------------------------
  /* The package file is added to the queue and a second class is 
     instantiated to fetch the revision file */   
  pkgAcqIndex::pkgAcqIndex(pkgAcquire *Owner,
                         string URI,string URIDesc,string ShortDesc,
 -                       string ExpectedMD5, string comprExt) :
 -   Item(Owner), RealURI(URI), ExpectedMD5(ExpectedMD5)
 +                       string ExpectedMD5, string comprExt)
 +   Item(Owner), RealURI(URI), ExpectedMD5(ExpectedMD5)
  {
     Decompression = false;
     Erase = false;
@@@ -606,6 -183,7 +606,7 @@@ string pkgAcqIndex::Custom600Headers(
  
  void pkgAcqIndex::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
  {
     // 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"; 
        Complete = false;
        Dequeue();
        return;
+    } 
+    
+    // on decompression failure, remove bad versions in partial/
+    if(Decompression && Erase) {
+       string s = _config->FindDir("Dir::State::lists") + "partial/";
+       s += URItoFileName(RealURI);
+       unlink(s.c_str());
     }
  
-    
     Item::Failed(Message,Cnf);
  }
  
@@@ -731,35 -315,6 +738,35 @@@ void pkgAcqIndex::Done(string Message,u
     Mode = decompProg;
  }
  
 +// AcqIndexTrans::pkgAcqIndexTrans - Constructor                      /*{{{*/
 +// ---------------------------------------------------------------------
 +/* The Translation file is added to the queue */
 +pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner,
 +                          string URI,string URIDesc,string ShortDesc) :
 +                      pkgAcqIndex(Owner, URI, URIDesc, ShortDesc, "", "")
 +{
 +}
 +
 +                                                                      /*}}}*/
 +// AcqIndexTrans::Failed - Silence failure messages for missing files /*{{{*/
 +// ---------------------------------------------------------------------
 +/* */
 +void pkgAcqIndexTrans::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
 +{
 +   if (Cnf->LocalOnly == true || 
 +       StringToBool(LookupTag(Message,"Transient-Failure"),false) == false)
 +   {      
 +      // Ignore this
 +      Status = StatDone;
 +      Complete = false;
 +      Dequeue();
 +      return;
 +   }
 +   
 +   Item::Failed(Message,Cnf);
 +}
 +                                                                      /*}}}*/
 +
  pkgAcqMetaSig::pkgAcqMetaSig(pkgAcquire *Owner,
                             string URI,string URIDesc,string ShortDesc,
                             string MetaIndexURI, string MetaIndexURIDesc,
     DestFile = _config->FindDir("Dir::State::lists") + "partial/";
     DestFile += URItoFileName(URI);
  
 -   // remove any partial downloaded sig-file. it may confuse proxies
 -   // and is too small to warrant a partial download anyway
 +   // remove any partial downloaded sig-file in partial/. 
 +   // it may confuse proxies and is too small to warrant a 
 +   // partial download anyway
     unlink(DestFile.c_str());
  
     // Create the item
@@@ -842,22 -396,17 +849,22 @@@ void pkgAcqMetaSig::Done(string Message
                                                                        /*}}}*/
  void pkgAcqMetaSig::Failed(string Message,pkgAcquire::MethodConfig *Cnf)
  {
 +   string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
  
     // if we get a network error we fail gracefully
 -   if(LookupTag(Message,"FailReason") == "Timeout" || 
 -      LookupTag(Message,"FailReason") == "TmpResolveFailure" ||
 -      LookupTag(Message,"FailReason") == "ConnectionRefused") {
 +   if(Status == StatTransientNetworkError)
 +   {
        Item::Failed(Message,Cnf);
 +      // move the sigfile back on network failures (and re-authenticated?)
 +      if(FileExists(DestFile))
 +       Rename(DestFile,Final);
 +
 +      // set the status back to , Item::Failed likes to reset it
 +      Status = pkgAcquire::Item::StatTransientNetworkError;
        return;
     }
  
     // Delete any existing sigfile when the acquire failed
 -   string Final = _config->FindDir("Dir::State::lists") + URItoFileName(RealURI);
     unlink(Final.c_str());
  
     // queue a pkgAcqMetaIndex with no sigfile
@@@ -990,7 -539,6 +997,7 @@@ void pkgAcqMetaIndex::RetrievalDone(str
        // Move it into position
        Rename(DestFile,FinalFile);
     }
 +   chmod(FinalFile.c_str(),0644);
     DestFile = FinalFile;
  }
  
@@@ -1060,14 -608,9 +1067,14 @@@ void pkgAcqMetaIndex::QueueIndexes(boo
           }
        }
        
 -      // Queue Packages file
 -      new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description,
 -                      (*Target)->ShortDesc, ExpectedIndexMD5);
 +      // Queue Packages file (either diff or full packages files, depending
 +      // on the users option)
 +      if(_config->FindB("Acquire::PDiffs",true) == true) 
 +       new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description,
 +                           (*Target)->ShortDesc, ExpectedIndexMD5);
 +      else 
 +       new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description,
 +                          (*Target)->ShortDesc, ExpectedIndexMD5);
     }
  }
  
diff --combined apt-pkg/acquire.h
index d73a52c7a2ccdb4aeaeb93b4735b21cfee6a836e,1d5daf12e5b56afc61051251eda3d0f4215b5a07..1de6f5e4471de5f2f20bf9fcc9a432160f24efaa
     
     ##################################################################### */
                                                                        /*}}}*/
 +
 +/** \defgroup acquire Acquire system
 + *
 + *  \brief The Acquire system is responsible for retrieving files from
 + *  local or remote URIs and postprocessing them (for instance,
 + *  verifying their authenticity).  The core class in this system is
 + *  pkgAcquire, which is responsible for managing the download queues
 + *  during the download.  There is at least one download queue for
 + *  each supported protocol; protocols such as http may provide one
 + *  queue per host.
 + *
 + *  Each file to download is represented by a subclass of
 + *  pkgAcquire::Item.  The files add themselves to the download
 + *  queue(s) by providing their URI information to
 + *  pkgAcquire::Item::QueueURI, which calls pkgAcquire::Enqueue.
 + *
 + *  Once the system is set up, the Run method will spawn subprocesses
 + *  to handle the enqueued URIs; the scheduler will then take items
 + *  from the queues and feed them into the handlers until the queues
 + *  are empty.
 + *
 + *  \todo Acquire supports inserting an object into several queues at
 + *  once, but it is not clear what its behavior in this case is, and
 + *  no subclass of pkgAcquire::Item seems to actually use this
 + *  capability.
 + */
 +
 +/** \addtogroup acquire
 + *
 + *  @{
 + *
 + *  \file acquire.h
 + */
 +
  #ifndef PKGLIB_ACQUIRE_H
  #define PKGLIB_ACQUIRE_H
  
  using std::vector;
  using std::string;
  
 -#ifdef __GNUG__
 -#pragma interface "apt-pkg/acquire.h"
 -#endif 
  
  #include <sys/time.h>
  #include <unistd.h>
  
  class pkgAcquireStatus;
 +
 +/** \brief The core download scheduler.
 + *
 + *  This class represents an ongoing download.  It manages the lists
 + *  of active and pending downloads and handles setting up and tearing
 + *  down download-related structures.
 + *
 + *  \todo Why all the protected data items and methods?
 + */
  class pkgAcquire
  {   
     public:
  
     typedef vector<Item *>::iterator ItemIterator;
     typedef vector<Item *>::const_iterator ItemCIterator;
 -   
 +
     protected:
     
 -   // List of items to fetch
 +   /** \brief A list of items to download.
 +    *
 +    *  This is built monotonically as items are created and only
 +    *  emptied when the download shuts down.
 +    */
     vector<Item *> Items;
     
 -   // List of active queues and fetched method configuration parameters
 +   /** \brief The head of the list of active queues.
 +    *
 +    *  \todo why a hand-managed list of queues instead of std::list or
 +    *  std::set?
 +    */
     Queue *Queues;
 +
 +   /** \brief The head of the list of active workers.
 +    *
 +    *  \todo why a hand-managed list of workers instead of std::list
 +    *  or std::set?
 +    */
     Worker *Workers;
 +
 +   /** \brief The head of the list of acquire method configurations.
 +    *
 +    *  Each protocol (http, ftp, gzip, etc) via which files can be
 +    *  fetched can have a representation in this list.  The
 +    *  configuration data is filled in by parsing the 100 Capabilities
 +    *  string output by a method on startup (see
 +    *  pkgAcqMethod::pkgAcqMethod and pkgAcquire::GetConfig).
 +    *
 +    *  \todo why a hand-managed config dictionary instead of std::map?
 +    */
     MethodConfig *Configs;
 +
 +   /** \brief The progress indicator for this download. */
     pkgAcquireStatus *Log;
 +
 +   /** \brief The total size of the files which are to be fetched.
 +    *
 +    *  This is not necessarily the total number of bytes to download
 +    *  when, e.g., download resumption and list updates via patches
 +    *  are taken into account.
 +    */
     unsigned long ToFetch;
  
 -   // Configurable parameters for the schedular
 -   enum {QueueHost,QueueAccess} QueueMode;
 +   // Configurable parameters for the scheduler
 +
 +   /** \brief Represents the queuing strategy for remote URIs. */
 +   enum QueueStrategy {
 +     /** \brief Generate one queue for each protocol/host combination; downloads from 
 +      *  multiple hosts can proceed in parallel.
 +      */
 +     QueueHost,
 +     /** \brief Generate a single queue for each protocol; serialize
 +      *  downloads from multiple hosts.
 +      */
 +     QueueAccess} QueueMode;
 +
 +   /** \brief If \b true, debugging information will be dumped to std::clog. */
     bool Debug;
 +   /** \brief If \b true, a download is currently in progress. */
     bool Running;
 -   
 +
 +   /** \brief Add the given item to the list of items. */
     void Add(Item *Item);
 +
 +   /** \brief Remove the given item from the list of items. */
     void Remove(Item *Item);
 +
 +   /** \brief Add the given worker to the list of workers. */
     void Add(Worker *Work);
 +
 +   /** \brief Remove the given worker from the list of workers. */
     void Remove(Worker *Work);
     
 +   /** \brief Insert the given fetch request into the appropriate queue.
 +    *
 +    *  \param Item The URI to download and the item to download it
 +    *  for.  Copied by value into the queue; no reference to Item is
 +    *  retained.
 +    */
     void Enqueue(ItemDesc &Item);
 +
 +   /** \brief Remove all fetch requests for this item from all queues. */
     void Dequeue(Item *Item);
 +
 +   /** \brief Determine the fetch method and queue of a URI.
 +    *
 +    *  \param URI The URI to fetch.
 +    *
 +    *  \param[out] Config A location in which to place the method via
 +    *  which the URI is to be fetched.
 +    *
 +    *  \return the string-name of the queue in which a fetch request
 +    *  for the given URI should be placed.
 +    */
     string QueueName(string URI,MethodConfig const *&Config);
  
 -   // FDSET managers for derived classes
 +   /** \brief Build up the set of file descriptors upon which select() should
 +    *  block.
 +    *
 +    *  The default implementation inserts the file descriptors
 +    *  corresponding to active downloads.
 +    *
 +    *  \param[out] Fd The largest file descriptor in the generated sets.
 +    *
 +    *  \param[out] RSet The set of file descriptors that should be
 +    *  watched for input.
 +    *
 +    *  \param[out] WSet The set of file descriptors that should be
 +    *  watched for output.
 +    */
     virtual void SetFds(int &Fd,fd_set *RSet,fd_set *WSet);
 +
 +   /** Handle input from and output to file descriptors which select()
 +    *  has determined are ready.  The default implementation
 +    *  dispatches to all active downloads.
 +    *
 +    *  \param RSet The set of file descriptors that are ready for
 +    *  input.
 +    *
 +    *  \param WSet The set of file descriptors that are ready for
 +    *  output.
 +    */
     virtual void RunFds(fd_set *RSet,fd_set *WSet);   
  
 -   // A queue calls this when it dequeues an item
 +   /** \brief Check for idle queues with ready-to-fetch items.
 +    *
 +    *  Called by pkgAcquire::Queue::Done each time an item is dequeued
 +    *  but remains on some queues; i.e., another queue should start
 +    *  fetching it.
 +    */
     void Bump();
     
     public:
  
 +   /** \brief Retrieve information about a fetch method by name.
 +    *
 +    *  \param Access The name of the method to look up.
 +    *
 +    *  \return the method whose name is Access, or \b NULL if no such method exists.
 +    */
     MethodConfig *GetConfig(string Access);
  
 -   enum RunResult {Continue,Failed,Cancelled};
 +   /** \brief Provides information on how a download terminated. */
 +   enum RunResult {
 +     /** \brief All files were fetched successfully. */
 +     Continue,
 +
 +     /** \brief Some files failed to download. */
 +     Failed,
 +
 +     /** \brief The download was cancelled by the user (i.e., #Log's
 +      *  pkgAcquireStatus::Pulse() method returned \b false).
 +      */
 +     Cancelled};
  
 -   RunResult Run(int PulseIntervall=500000);
 +   /** \brief Download all the items that have been Add()ed to this
 +    *  download process.
 +    *
 +    *  This method will block until the download completes, invoking
 +    *  methods on #Log to report on the progress of the download.
 +    *
 +    *  \param PulseInterval The method pkgAcquireStatus::Pulse will be
 +    *  invoked on #Log at intervals of PulseInterval milliseconds.
 +    *
 +    *  \return the result of the download.
 +    */
 +   RunResult Run(int PulseInterval=500000);
 +
 +   /** \brief Remove all items from this download process, terminate
 +    *  all download workers, and empty all queues.
 +    */
     void Shutdown();
     
 -   // Simple iteration mechanism
 +   /** \brief Get the first #Worker object.
 +    *
 +    *  \return the first active worker in this download process.
 +    */
     inline Worker *WorkersBegin() {return Workers;};
 +
 +   /** \brief Advance to the next #Worker object.
 +    *
 +    *  \return the worker immediately following I, or \b NULL if none
 +    *  exists.
 +    */
     Worker *WorkerStep(Worker *I);
 +
 +   /** \brief Get the head of the list of items. */
     inline ItemIterator ItemsBegin() {return Items.begin();};
 +
 +   /** \brief Get the end iterator of the list of items. */
     inline ItemIterator ItemsEnd() {return Items.end();};
     
     // Iterate over queued Item URIs
     class UriIterator;
 +   /** \brief Get the head of the list of enqueued item URIs.
 +    *
 +    *  This iterator will step over every element of every active
 +    *  queue.
 +    */
     UriIterator UriBegin();
 +   /** \brief Get the end iterator of the list of enqueued item URIs. */
     UriIterator UriEnd();
     
 -   // Cleans out the download dir
 +   /** Deletes each entry in the given directory that is not being
 +    *  downloaded by this object.  For instance, when downloading new
 +    *  list files, calling Clean() will delete the old ones.
 +    *
 +    *  \param Dir The directory to be cleaned out.
 +    *
 +    *  \return \b true if the directory exists and is readable.
 +    */
     bool Clean(string Dir);
  
 -   // Returns the size of the total download set
 +   /** \return the total size in bytes of all the items included in
 +    *  this download.
 +    */
     double TotalNeeded();
 +
 +   /** \return the size in bytes of all non-local items included in
 +    *  this download.
 +    */
     double FetchNeeded();
 +
 +   /** \return the amount of data to be fetched that is already
 +    *  present on the filesystem.
 +    */
     double PartialPresent();
  
 +   /** \brief Construct a new pkgAcquire.
 +    *
 +    *  \param Log The progress indicator associated with this
 +    *  download, or \b NULL for none.  This object is not owned by the
 +    *  download process and will not be deleted when the pkgAcquire
 +    *  object is destroyed.  Naturally, it should live for at least as
 +    *  long as the pkgAcquire object does.
 +    */
     pkgAcquire(pkgAcquireStatus *Log = 0);
 +
 +   /** \brief Destroy this pkgAcquire object.
 +    *
 +    *  Destroys all queue, method, and item objects associated with
 +    *  this download.
 +    */
     virtual ~pkgAcquire();
  };
  
 -// Description of an Item+URI
 +/** \brief Represents a single download source from which an item
 + *  should be downloaded.
 + *
 + *  An item may have several assocated ItemDescs over its lifetime.
 + */
  struct pkgAcquire::ItemDesc
  {
 +   /** \brief The URI from which to download this item. */
     string URI;
 +   /** brief A description of this item. */
     string Description;
 +   /** brief A shorter description of this item. */
     string ShortDesc;
 +   /** brief The underlying item which is to be downloaded. */
     Item *Owner;
  };
  
 -// List of possible items queued for download.
 +/** \brief A single download queue in a pkgAcquire object.
 + *
 + *  \todo Why so many protected values?
 + */
  class pkgAcquire::Queue
  {
     friend class pkgAcquire;
     friend class pkgAcquire::UriIterator;
     friend class pkgAcquire::Worker;
 +
 +   /** \brief The next queue in the pkgAcquire object's list of queues. */
     Queue *Next;
     
     protected:
  
 -   // Queued item
 +   /** \brief A single item placed in this queue. */
     struct QItem : pkgAcquire::ItemDesc
     {
 -      QItem *Next;      
 +      /** \brief The next item in the queue. */
 +      QItem *Next;
 +      /** \brief The worker associated with this item, if any. */
        pkgAcquire::Worker *Worker;
 -      
 +
 +      /** \brief Assign the ItemDesc portion of this QItem from
 +       *  another ItemDesc
 +       */
        void operator =(pkgAcquire::ItemDesc const &I)
        {
         URI = I.URI;
        };
     };
     
 -   // Name of the queue
 +   /** \brief The name of this queue. */
     string Name;
  
 -   // Items queued into this queue
 +   /** \brief The head of the list of items contained in this queue.
 +    *
 +    *  \todo why a by-hand list instead of an STL structure?
 +    */
     QItem *Items;
 +
 +   /** \brief The head of the list of workers associated with this queue.
 +    *
 +    *  \todo This is plural because support exists in Queue for
 +    *  multiple workers.  However, it does not appear that there is
 +    *  any way to actually associate more than one worker with a
 +    *  queue.
 +    *
 +    *  \todo Why not just use a std::set?
 +    */
     pkgAcquire::Worker *Workers;
 +
 +   /** \brief the download scheduler with which this queue is associated. */
     pkgAcquire *Owner;
 +
 +   /** \brief The number of entries in this queue that are currently
 +    *  being downloaded.
 +    */
     signed long PipeDepth;
 +
 +   /** \brief The maximum number of entries that this queue will
 +    *  attempt to download at once.
 +    */
     unsigned long MaxPipeDepth;
     
     public:
     
-    /** \brief Insert the given fetch request into this queue. */
-    void Enqueue(ItemDesc &Item);
 -   // Put an item into this queue
++   /** \brief Insert the given fetch request into this queue. 
++    *
++    *  \return \b true if the queuing was successful. May return
++    *  \b false if the Item is already in the queue
++    */
+    bool Enqueue(ItemDesc &Item);
 +
 +   /** \brief Remove all fetch requests for the given item from this queue.
 +    *
 +    *  \return \b true if at least one request was removed from the queue.
 +    */
     bool Dequeue(Item *Owner);
  
 -   // Find a Queued item
 +   /** \brief Locate an item in this queue.
 +    *
 +    *  \param URI A URI to match against.
 +    *  \param Owner A pkgAcquire::Worker to match against.
 +    *
 +    *  \return the first item in the queue whose URI is #URI and that
 +    *  is being downloaded by #Owner.
 +    */
     QItem *FindItem(string URI,pkgAcquire::Worker *Owner);
 +
 +   /** Presumably this should start downloading an item?
 +    *
 +    *  \todo Unimplemented.  Implement it or remove?
 +    */
     bool ItemStart(QItem *Itm,unsigned long Size);
 +
 +   /** \brief Remove the given item from this queue and set its state
 +    *  to pkgAcquire::Item::StatDone.
 +    *
 +    *  If this is the only queue containing the item, the item is also
 +    *  removed from the main queue by calling pkgAcquire::Dequeue.
 +    *
 +    *  \param Itm The item to remove.
 +    *
 +    *  \return \b true if no errors are encountered.
 +    */
     bool ItemDone(QItem *Itm);
     
 +   /** \brief Start the worker process associated with this queue.
 +    *
 +    *  If a worker process is already associated with this queue,
 +    *  this is equivalent to calling Cycle().
 +    *
 +    *  \return \b true if the startup was successful.
 +    */
     bool Startup();
 +
 +   /** \brief Shut down the worker process associated with this queue.
 +    *
 +    *  \param Final If \b true, then the process is stopped unconditionally.
 +    *               Otherwise, it is only stopped if it does not need cleanup
 +    *               as indicated by the pkgAcqMethod::NeedsCleanup member of
 +    *               its configuration.
 +    *
 +    *  \return \b true.
 +    */
     bool Shutdown(bool Final);
 +
 +   /** \brief Send idle items to the worker process.
 +    *
 +    *  Fills up the pipeline by inserting idle items into the worker's queue.
 +    */
     bool Cycle();
 +
 +   /** \brief Check for items that could be enqueued.
 +    *
 +    *  Call this after an item placed in multiple queues has gone from
 +    *  the pkgAcquire::Item::StatFetching state to the
 +    *  pkgAcquire::Item::StatIdle state, to possibly refill an empty queue.
 +    *  This is an alias for Cycle().
 +    *
 +    *  \todo Why both this and Cycle()?  Are they expected to be
 +    *  different someday?
 +    */
     void Bump();
     
 +   /** \brief Create a new Queue.
 +    *
 +    *  \param Name The name of the new queue.
 +    *  \param Owner The download process that owns the new queue.
 +    */
     Queue(string Name,pkgAcquire *Owner);
 +
 +   /** Shut down all the worker processes associated with this queue
 +    *  and empty the queue.
 +    */
     ~Queue();
  };
  
 +/** \brief Iterates over all the URIs being fetched by a pkgAcquire object. */
  class pkgAcquire::UriIterator
  {
 +   /** The next queue to iterate over. */
     pkgAcquire::Queue *CurQ;
 +   /** The item that we currently point at. */
     pkgAcquire::Queue::QItem *CurItem;
     
     public:
     
 -   // Advance to the next item
     inline void operator ++() {operator ++();};
 +
     void operator ++(int)
     {
        CurItem = CurItem->Next;
        }
     };
     
 -   // Accessors
     inline pkgAcquire::ItemDesc const *operator ->() const {return CurItem;};
     inline bool operator !=(UriIterator const &rhs) const {return rhs.CurQ != CurQ || rhs.CurItem != CurItem;};
     inline bool operator ==(UriIterator const &rhs) const {return rhs.CurQ == CurQ && rhs.CurItem == CurItem;};
     
 +   /** \brief Create a new UriIterator.
 +    *
 +    *  \param Q The queue over which this UriIterator should iterate.
 +    */
     UriIterator(pkgAcquire::Queue *Q) : CurQ(Q), CurItem(0)
     {
        while (CurItem == 0 && CurQ != 0)
     }   
  };
  
 -// Configuration information from each method
 +/** \brief Information about the properties of a single acquire method. */
  struct pkgAcquire::MethodConfig
  {
 +   /** \brief The next link on the acquire method list.
 +    *
 +    *  \todo Why not an STL container?
 +    */
     MethodConfig *Next;
     
 +   /** \brief The name of this acquire method (e.g., http). */
     string Access;
  
 +   /** \brief The implementation version of this acquire method. */
     string Version;
 +
 +   /** \brief If \b true, only one download queue should be created for this
 +    *  method.
 +    */
     bool SingleInstance;
 +
 +   /** \brief If \b true, this method supports pipelined downloading. */
     bool Pipeline;
 +
 +   /** \brief If \b true, the worker process should send the entire
 +    *  APT configuration tree to the fetch subprocess when it starts
 +    *  up.
 +    */
     bool SendConfig;
 +
 +   /** \brief If \b true, this fetch method does not require network access;
 +    *  all files are to be acquired from the local disk.
 +    */
     bool LocalOnly;
 +
 +   /** \brief If \b true, the subprocess has to carry out some cleanup
 +    *  actions before shutting down.
 +    *
 +    *  For instance, the cdrom method needs to unmount the CD after it
 +    *  finishes.
 +    */
     bool NeedsCleanup;
 +
 +   /** \brief If \b true, this fetch method acquires files from removable media. */
     bool Removable;
     
 +   /** \brief Set up the default method parameters.
 +    *
 +    *  All fields are initialized to NULL, "", or \b false as
 +    *  appropriate.
 +    */
     MethodConfig();
  };
  
 +/** \brief A monitor object for downloads controlled by the pkgAcquire class.
 + *
 + *  \todo Why protected members?
 + *
 + *  \todo Should the double members be uint64_t?
 + */
  class pkgAcquireStatus
  {
     protected:
     
 +   /** \brief The last time at which this monitor object was updated. */
     struct timeval Time;
 +
 +   /** \brief The time at which the download started. */
     struct timeval StartTime;
 +
 +   /** \brief The number of bytes fetched as of the previous call to
 +    *  pkgAcquireStatus::Pulse, including local items.
 +    */
     double LastBytes;
 +
 +   /** \brief The current rate of download as of the most recent call
 +    *  to pkgAcquireStatus::Pulse, in bytes per second.
 +    */
     double CurrentCPS;
 +
 +   /** \brief The number of bytes fetched as of the most recent call
 +    *  to pkgAcquireStatus::Pulse, including local items.
 +    */
     double CurrentBytes;
 +
 +   /** \brief The total number of bytes that need to be fetched.
 +    *
 +    *  \warning This member is inaccurate, as new items might be
 +    *  enqueued while the download is in progress!
 +    */
     double TotalBytes;
 +
 +   /** \brief The total number of bytes accounted for by items that
 +    *  were successfully fetched.
 +    */
     double FetchedBytes;
 +
 +   /** \brief The amount of time that has elapsed since the download
 +    *   started.
 +    */
     unsigned long ElapsedTime;
 +
 +   /** \brief The total number of items that need to be fetched.
 +    *
 +    *  \warning This member is inaccurate, as new items might be
 +    *  enqueued while the download is in progress!
 +    */
     unsigned long TotalItems;
 +
 +   /** \brief The number of items that have been successfully downloaded. */
     unsigned long CurrentItems;
     
     public:
  
 +   /** \brief If \b true, the download scheduler should call Pulse()
 +    *  at the next available opportunity.
 +    */
     bool Update;
 +
 +   /** \brief If \b true, extra Pulse() invocations will be performed.
 +    *
 +    *  With this option set, Pulse() will be called every time that a
 +    *  download item starts downloading, finishes downloading, or
 +    *  terminates with an error.
 +    */
     bool MorePulses;
        
 -   // Called by items when they have finished a real download
 +   /** \brief Invoked when a local or remote file has been completely fetched.
 +    *
 +    *  \param Size The size of the file fetched.
 +    *
 +    *  \param ResumePoint How much of the file was already fetched.
 +    */
     virtual void Fetched(unsigned long Size,unsigned long ResumePoint);
     
 -   // Called to change media
 +   /** \brief Invoked when the user should be prompted to change the
 +    *         inserted removable media.
 +    *
 +    *  This method should not return until the user has confirmed to
 +    *  the user interface that the media change is complete.
 +    *
 +    *  \param Media The name of the media type that should be changed.
 +    *
 +    *  \param Drive The identifying name of the drive whose media
 +    *               should be changed.
 +    *
 +    *  \return \b true if the user confirms the media change, \b
 +    *  false if it is cancelled.
 +    *
 +    *  \todo This is a horrible blocking monster; it should be CPSed
 +    *  with prejudice.
 +    */
     virtual bool MediaChange(string Media,string Drive) = 0;
     
 -   // Each of these is called by the workers when an event occures
 +   /** \brief Invoked when an item is confirmed to be up-to-date.
 +
 +    * For instance, when an HTTP download is informed that the file on
 +    * the server was not modified.
 +    */
     virtual void IMSHit(pkgAcquire::ItemDesc &/*Itm*/) {};
 +
 +   /** \brief Invoked when some of an item's data is fetched. */
     virtual void Fetch(pkgAcquire::ItemDesc &/*Itm*/) {};
 +
 +   /** \brief Invoked when an item is successfully and completely fetched. */
     virtual void Done(pkgAcquire::ItemDesc &/*Itm*/) {};
 +
 +   /** \brief Invoked when the process of fetching an item encounters
 +    *  a fatal error.
 +    */
     virtual void Fail(pkgAcquire::ItemDesc &/*Itm*/) {};
 -   virtual bool Pulse(pkgAcquire *Owner); // returns false on user cancel
 +
 +   /** \brief Periodically invoked while the Acquire process is underway.
 +    *
 +    *  Subclasses should first call pkgAcquireStatus::Pulse(), then
 +    *  update their status output.  The download process is blocked
 +    *  while Pulse() is being called.
 +    *
 +    *  \return \b false if the user asked to cancel the whole Acquire process.
 +    *
 +    *  \see pkgAcquire::Run
 +    */
 +   virtual bool Pulse(pkgAcquire *Owner);
 +
 +   /** \brief Invoked when the Acquire process starts running. */
     virtual void Start();
 +
 +   /** \brief Invoked when the Acquire process stops running. */
     virtual void Stop();
     
 +   /** \brief Initialize all counters to 0 and the time to the current time. */
     pkgAcquireStatus();
     virtual ~pkgAcquireStatus() {};
  };
  
 +/** @} */
 +
  #endif
diff --combined apt-pkg/cdrom.cc
index b42c82dd0f0e9fedbcb245668e505dd65a9535e6,4d45d38a2611ee3cdac5f4259f1ae61118e640a5..aefe9c9e976c33582d01a3df32eaa162513a616f
@@@ -30,16 -30,12 +30,16 @@@ using namespace std
     search that short circuits when it his a package file in the dir.
     This speeds it up greatly as the majority of the size is in the
     binary-* sub dirs. */
 -bool pkgCdrom::FindPackages(string CD,vector<string> &List,
 -                          vector<string> &SList, vector<string> &SigList,
 +bool pkgCdrom::FindPackages(string CD,
 +                          vector<string> &List,
 +                          vector<string> &SList, 
 +                          vector<string> &SigList,
 +                          vector<string> &TransList,
                            string &InfoDir, pkgCdromStatus *log,
                            unsigned int Depth)
  {
     static ino_t Inodes[9];
 +   DIR *D;
  
     // if we have a look we "pulse" now
     if(log)
        if (_config->FindB("APT::CDROM::Thorough",false) == false)
         return true;
     }
 +
 +   // see if we find translatin indexes
 +   if (stat("i18n",&Buf) == 0)
 +   {
 +      D = opendir("i18n");
 +      for (struct dirent *Dir = readdir(D); Dir != 0; Dir = readdir(D))
 +      {
 +       if(strstr(Dir->d_name,"Translation") != NULL) 
 +       {
 +          if (_config->FindB("Debug::aptcdrom",false) == true)
 +             std::clog << "found translations: " << Dir->d_name << "\n";
 +          string file = Dir->d_name;
 +          if(file.substr(file.size()-3,file.size()) == ".gz")
 +             file = file.substr(0,file.size()-3);
 +          TransList.push_back(CD+"i18n/"+ file);
 +       }
 +      }
 +      closedir(D);
 +   }
 +
     
 -   DIR *D = opendir(".");
 +   D = opendir(".");
     if (D == 0)
        return _error->Errno("opendir","Unable to read %s",CD.c_str());
     
        Inodes[Depth] = Buf.st_ino;
  
        // Descend
 -      if (FindPackages(CD + Dir->d_name,List,SList,SigList,InfoDir,log,Depth+1) == false)
 +      if (FindPackages(CD + Dir->d_name,List,SList,SigList,TransList,InfoDir,log,Depth+1) == false)
         break;
  
        if (chdir(CD.c_str()) != 0)
@@@ -636,10 -612,9 +636,10 @@@ bool pkgCdrom::Add(pkgCdromStatus *log
     vector<string> List;
     vector<string> SourceList;
     vector<string> SigList;
 +   vector<string> TransList;
     string StartDir = SafeGetCWD();
     string InfoDir;
 -   if (FindPackages(CDROM,List,SourceList, SigList,InfoDir,log) == false)
 +   if (FindPackages(CDROM,List,SourceList, SigList,TransList,InfoDir,log) == false)
     {
        log->Update("\n");
        return false;
     DropRepeats(List,"Packages");
     DropRepeats(SourceList,"Sources");
     DropRepeats(SigList,"Release.gpg");
 +   DropRepeats(TransList,"");
     if(log) {
        msg.str("");
 -      ioprintf(msg, _("Found %i package indexes, %i source indexes and "
 -                    "%i signatures\n"), 
 -             List.size(), SourceList.size(), SigList.size());
 +      ioprintf(msg, _("Found %i package indexes, %i source indexes, "
 +                    "%i translation indexes and %i signatures\n"), 
 +             List.size(), SourceList.size(), TransList.size(),
 +             SigList.size());
        log->Update(msg.str(), STEP_SCAN);
     }
  
     if (List.size() == 0 && SourceList.size() == 0) 
     {
-       UnmountCdrom(CDROM);
+       if (_config->FindB("APT::CDROM::NoMount",false) == false) 
+        UnmountCdrom(CDROM);
        return _error->Error("Unable to locate any package files, perhaps this is not a Debian Disc");
     }
  
        {
         if(!log) 
           {
-           UnmountCdrom(CDROM);
+           if (_config->FindB("APT::CDROM::NoMount",false) == false) 
+              UnmountCdrom(CDROM);
            return _error->Error("No disc name found and no way to ask for it");
         }
  
     // Copy the package files to the state directory
     PackageCopy Copy;
     SourceCopy SrcCopy;
 +   TranslationsCopy TransCopy;
     if (Copy.CopyPackages(CDROM,Name,List, log) == false ||
 -       SrcCopy.CopyPackages(CDROM,Name,SourceList, log) == false)
 +       SrcCopy.CopyPackages(CDROM,Name,SourceList, log) == false ||
 +       TransCopy.CopyTranslations(CDROM,Name,TransList, log) == false)
        return false;
  
     // reduce the List so that it takes less space in sources.list
        string::size_type Space = (*I).find(' ');
        if (Space == string::npos)
        {
-        UnmountCdrom(CDROM);
+        if (_config->FindB("APT::CDROM::NoMount",false) == false) 
+           UnmountCdrom(CDROM);
         return _error->Error("Internal error");
        }
  
        string::size_type Space = (*I).find(' ');
        if (Space == string::npos)
        {
-        UnmountCdrom(CDROM);
+        if (_config->FindB("APT::CDROM::NoMount",false) == false) 
+           UnmountCdrom(CDROM);
         return _error->Error("Internal error");
        }
  
index 1264982a89e98a238ec534ee97099f2216bc025a,db140ec02d256e13c52aaf147c7380ddb33a1b18..f24bb8c704fdb85ee1d2447b74a0b3b8998a3fdd
@@@ -8,14 -8,19 +8,15 @@@
     ##################################################################### */
                                                                        /*}}}*/
  #ifndef PKGLIB_CDROMUTL_H
- #define PKGLIB_ACQUIRE_METHOD_H
+ #define PKGLIB_CDROMUTL_H
  
  #include <string>
  
  using std::string;
  
 -#ifdef __GNUG__
 -#pragma interface "apt-pkg/cdromutl.h"
 -#endif 
 -
  bool MountCdrom(string Path);
  bool UnmountCdrom(string Path);
  bool IdentCdrom(string CD,string &Res,unsigned int Version = 2);
+ bool IsMounted(string &Path);
  
  #endif
diff --combined apt-pkg/init.h
index a2da80c34b80a45076f07465d5e1d7a8fb263eda,b584b2cce3ad3bd4454753a1163b8f9427209fe3..bc0e5503658c572c349052697a69d9a51c96250c
@@@ -17,8 -17,8 +17,8 @@@
  #include <apt-pkg/pkgsystem.h>
  
  // See the makefile
 -#define APT_PKG_MAJOR 3
 -#define APT_PKG_MINOR 12
 +#define APT_PKG_MAJOR 4
- #define APT_PKG_MINOR 3
++#define APT_PKG_MINOR 4
  #define APT_PKG_RELEASE 0
      
  extern const char *pkgVersion;
diff --combined apt-pkg/makefile
index fc9e32cfbbd5121d751174d394ae8420e49c5806,c493d3dd9c66589d48a02754cf0659de8f19e922..df9954f67579b6f7125e584ef8f8bcc901544db1
@@@ -13,7 -13,7 +13,7 @@@ include ../buildlib/defaults.ma
  # methods/makefile - FIXME
  LIBRARY=apt-pkg
  LIBEXT=$(GLIBC_VER)$(LIBSTDCPP_VER)
- MAJOR=4.3
 -MAJOR=3.12
++MAJOR=4.4
  MINOR=0
  SLIBS=$(PTHREADLIB) $(INTLLIBS)
  APT_DOMAIN:=libapt-pkg$(MAJOR)
diff --combined configure.in
index 76810c5c11be8cc472c38137b65ee7c2ea4188b7,c7bf253d19113b464ad94d6f710836e6fc364c72..9fa113938ebdf6a0954223a3c5d7a4838e3db358
@@@ -18,7 -18,7 +18,7 @@@ AC_CONFIG_AUX_DIR(buildlib
  AC_CONFIG_HEADER(include/config.h:buildlib/config.h.in include/apti18n.h:buildlib/apti18n.h.in)
  
  dnl -- SET THIS TO THE RELEASE VERSION --
 -AC_DEFINE_UNQUOTED(VERSION,"0.6.46.5")
 +AC_DEFINE_UNQUOTED(VERSION,"0.7.0")
  PACKAGE="apt"
  AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
  AC_SUBST(PACKAGE)
@@@ -175,21 -175,12 +175,21 @@@ dnl Check for debiando
  AC_PATH_PROG(DEBIANDOC_HTML,debiandoc2html)
  AC_PATH_PROG(DEBIANDOC_TEXT,debiandoc2text)
  
 +dnl Check for doxygen
 +AC_PATH_PROG(DOXYGEN, doxygen)
 +
  dnl Check for the SGML tools needed to build man pages
  AC_PATH_PROG(DOCBOOK2MAN,docbook2man)
  
  dnl Check for the XML tools needed to build man pages
  AC_PATH_PROG(XMLTO,xmlto)
  
 +dnl Check for graphviz
 +AC_CHECK_PROG([HAVE_DOT], [dot], [YES], [NO])
 +AC_PATH_PROG([DOT], [dot], [])
 +DOTDIR=$(dirname $DOT)
 +AC_SUBST(DOTDIR)
 +
  dnl Check for YODL
  dnl AC_CHECK_PROG(YODL_MAN,yodl2man,"yes","")
  
@@@ -201,7 -192,7 +201,7 @@@ ah_GCC3DE
  dnl It used to be that the user could select translations and that could get
  dnl passed to the makefiles, but now that can only work if you use special
  dnl gettext approved makefiles, so this feature is unsupported by this.
- ALL_LINGUAS="bg bs ca cs cy da de dz el en_GB es eu fi fr gl hu it ja ko ku nb nl nn pl pt_BR pt ro ru sk sl sv tl vi zn_CN zh_TW"
+ ALL_LINGUAS="bg bs ca cs cy da de dz el en_GB es eu fi fr gl hu it ja ko ku nb nl nn pl pt_BR pt ro ru sk sl sv tl uk vi zn_CN zh_TW"
  AM_GNU_GETTEXT(external)
  if test x"$USE_NLS" = "xyes"; then
     AC_DEFINE(USE_NLS)
@@@ -209,4 -200,4 +209,4 @@@ f
  AC_SUBST(USE_NLS)
  AC_PATH_PROG(BASH, bash)
  
 -AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in,make -s dirs)
 +AC_OUTPUT(environment.mak:buildlib/environment.mak.in makefile:buildlib/makefile.in doc/Doxyfile,make -s dirs)
diff --combined debian/changelog
index 09cdf2b640c406f972c156d93707f35eb6826732,8294c45d9bf08a275311f057530c0cb6518a3b2b..bbe4c0256b8fcf73875792c781634927b9f9a7d2
@@@ -1,34 -1,50 +1,67 @@@
 -apt (0.6.47) UNRELEASED; urgency=low
++apt (0.7.1) experimental; urgency=low
+   * apt-pkg/algorithm.cc:
+     - use clog for all debugging
+     - only increase the score of installed applications if they 
+       are not obsolete 
+     - fix resolver bug on removal triggered by weak-dependencies 
+       with or-groups
+   * methods/http.cc:
+     - send apt version in User-Agent
+   * apt-pkg/deb/debrecords.cc:
+     - fix SHA1Hash() return value
+   * apt-pkg/cdrom.cc:
+     - only unmount if APT::CDROM::NoMount is false
+   * methods/cdrom.cc:  
+     - only umount if it was mounted by the method before
+   * po/gl.po:
+     - fix error translation that causes trouble to lsb_release
+   * apt-pkg/acquire-item.cc:
+     - if decompression of a index fails, delete the index 
 -  * [ABI] apt-pkg/acquire.{cc,h}:
++  * apt-pkg/acquire.{cc,h}:
+     - deal better with duplicated sources.list entries (avoid
+       double queuing of  URLs) - this fixes hangs in bzip/gzip
+   * merged from Christian Perrier:
+     * mr.po: New Marathi translation  Closes: #416806
+     * zh_CN.po: Updated by Eric Pareja  Closes: #416822
+     * tl.po: Updated by Eric Pareja   Closes: #416638
+     * gl.po: Updated by Jacobo Tarrio
+              Closes: #412828
+     * da.po: Updated by Claus Hindsgaul
+              Closes: #409483
+     * fr.po: Remove a non-breakable space for usability
+              issues. Closes: #408877
+     * ru.po: Updated Russian translation. Closes: #405476
+     * *.po: Unfuzzy after upstream typo corrections
+   * apt-pkg/policy.cc:
+     - allow multiple packages (thanks to David Foerster)
 -  
 - -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 18 Dec 2006 19:39:05 +0100
++
++ -- Michael Vogt <mvo@debian.org>  Wed,  2 May 2007 13:43:44 +0200
++
 +apt (0.7.0) experimental; urgency=low
 +
 +  * Package that contains tall the new features
 +  * Removed all #pragma interface/implementation
 +  * Branch that contains tall the new features:
 +  * translated package descriptions
 +  * task install support
 +  * automatic dependency removal (thanks to Daniel Burrows)
 +  * merged support for the new dpkg "Breaks" field 
 +    (thanks to Ian Jackson)
 +  * handle network failures more gracefully on "update"
 +  * support for unattended-upgrades (via unattended-upgrades
 +    package)
 +  * added apt-transport-https method
 +
 + -- Michael Vogt <mvo@debian.org>  Fri, 12 Jan 2007 20:48:07 +0100
  
- apt (0.6.46.5) UNRELEASED; urgency=low
-   * apt-pkg/algorithm.cc:
-     - use clog for all debugging
-     - only increase the score of installed applications if they 
-       are not obsolete 
-     - fix resolver bug on removal triggered by weak-dependencies 
-       with or-groups
-   * methods/http.cc:
-     - send apt version in User-Agent
-   * apt-pkg/deb/debrecords.cc:
-     - fix SHA1Hash() return value
+ apt (0.6.46.4-0.1) unstable; urgency=emergency
+   
+   * NMU
+   * Fix broken use of awk in apt-key that caused removal of the wrong keys
+     from the keyring. Closes: #412572
  
-  -- Michael Vogt <mvo@debian.org>  Thu, 14 Dec 2006 11:31:41 +0100
+  -- Joey Hess <joeyh@debian.org>  Mon, 26 Feb 2007 16:00:22 -0500
  
  apt (0.6.46.4) unstable; urgency=high
  
@@@ -75,55 -91,44 +108,55 @@@ apt (0.6.46.3) unstable; urgency=lo
        messages 
  
    * Merged from Christian Perrier bzr branch:
 -     - ca.po: Updated to 514t
 -     - be.po: Updated to 514t
 -     - it.po: Updated to 514t
 -     - hu.po: Updated to 514t
 -     - zh_TW.po: Updated to 514t
 -     - ar.po: Updated to 293t221u.
 -     - ru.po: Updated to 514t. Closes: #392466
 -     - nb.po: Updated to 514t. Closes: #392466
 -     - pt.po: Updated to 514t. Closes: #393199
 -     - fr.po: One spelling error corrected: s/accèder/accéder
 -     - km.po: Updated to 514t.
 -     - ko.po: Updated to 514t.
 -     - bg.po: Updated to 514t.
 -     - de.po: Updated to 514t.
 -     - en_GB.po: Updated to 514t.
 -
 - -- Michael Vogt <mvo@debian.org>  Thu, 2 Nov 2006 11:37:58 +0100 
 +    - ca.po: Updated to 514t
 +    - be.po: Updated to 514t
 +    - it.po: Updated to 514t
 +    - hu.po: Updated to 514t
 +    - zh_TW.po: Updated to 514t
 +    - ar.po: Updated to 293t221u.
 +    - ru.po: Updated to 514t. Closes: #392466
 +    - nb.po: Updated to 514t. Closes: #392466
 +    - pt.po: Updated to 514t. Closes: #393199
 +    - fr.po: One spelling error corrected: s/accèder/accéder
 +    - km.po: Updated to 514t.
 +    - ko.po: Updated to 514t.
 +    - bg.po: Updated to 514t.
 +    - de.po: Updated to 514t.
 +    - en_GB.po: Updated to 514t.
 +
 + -- Michael Vogt <mvo@debian.org>  Thu,  2 Nov 2006 11:37:58 +0100
  
  apt (0.6.46.2) unstable; urgency=low
  
 +  * debian/control:
 +    - depend on debian-archive-keyring to offer clean upgrade path 
 +      (closes: #386800)
    * Merged from Christian Perrier bzr branch:
      - es.po: Updated to 514t. Closes: #391661
      - da.po: Updated to 514t. Closes: #391424
      - cs.po: Updated. Closes: #391064
      - es.po: Updated to 514t. Closes: #391661
      - da.po: Updated to 514t. Closes: #391424
 -  
 +
   -- Michael Vogt <mvo@debian.org>  Wed, 11 Oct 2006 09:03:15 +0200
  
  apt (0.6.46.1) unstable; urgency=low
  
 +  * merged "install-recommends" branch (ABI break): 
 +    - new "--install-recommends"
 +    - install new recommends on "upgrade" if --install-recommends is 
 +      given
 +    - new "--fix-policy" option to install all packages with unmet
 +      important dependencies (usefull with --install-recommends to
 +      see what not-installed recommends are on the system)
 +    - fix of recommended packages display (only show CandidateVersion
 +      fix or-group handling)
 +  * merged "install-task" branch (use with "apt-get install taskname^")
    * methods/gzip.cc:
      - deal with empty files 
    * Applied patch from Daniel Schepler to make apt bin-NMU able.  
 -    (closes: bug#359634)
    * rebuild against current g++ because of:
      http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29289
 -    (closes: #390189)
    * fix broken i18n in the dpkg progress reporting, thanks to 
      Frans Pop and Steinar Gunderson. (closes: #389261)
    * Merged from Christian Perrier bzr branch:
@@@ -176,7 -181,7 +209,7 @@@ apt (0.6.45) unstable; urgency=lo
    * apt-pkg/contrib/sha256.cc:
      - fixed the sha256 generation (closes: #378183)
    * ftparchive/cachedb.cc:
 -    - applied patch from Anthony Towns to fix Clean() function
 +    - applied patch from ajt to fix Clean() function
        (closes: #379576)
    * doc/apt-get.8.xml:
      - fix path to the apt user build (Closes: #375640)
      - fix for string mangling, closes: #373864
    * apt-pkg/acquire-item.cc:
      - check for bzip2 in /bin (closes: #377391)
 -  * apt-pkg/tagfile.cc:
 -    - make it work on non-mapable files again, thanks 
 -      to James Troup for confirming the fix (closes: #376777)
    * Merged from Christian Perrier bzr branch:
      * ko.po: Updated to 512t. Closes: #378901
      * hu.po: Updated to 512t. Closes: #376330
      * dz.po: New Dzongkha translation: 512t
      * ro.po: Updated to 512t
      * eu.po: Updated
 +    * eu.po: Updated
 +  * fix apt-get dist-upgrade
 +  * fix warning if no /var/lib/apt/extended_states is present
 +  * don't download Translations for deb-src sources.list lines
 +  * apt-pkg/tagfile.cc:
 +    - support not-mmapable files again
  
 - -- Michael Vogt <mvo@debian.org>  Thu, 27 Jul 2006 00:52:05 +0200
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 25 Jul 2006 11:55:22 +0200
  
 -apt  (0.6.44.2) unstable; urgency=low 
 -  
 -   * apt-pkg/depcache.cc:
 -     - added Debug::pkgDepCache::AutoInstall (thanks to infinity)
 -   * apt-pkg/acquire-item.cc:
 -     - fix missing chmod() in the new aquire code
 -       (thanks to Bastian Blank, Closes: #367425)
 -   * merged from
 -     http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main:
 -     * sk.po: Completed to 512t
 -     * eu.po: Completed to 512t
 -     * fr.po: Completed to 512t
 -     * sv.po: Completed to 512t
 -     * Update all PO and the POT. Gives 506t6f for formerly
 -       complete translations
 -
 - -- Michael Vogt <mvo@debian.org>  Wed, 14 Jun 2006 12:00:57 +0200 
 +apt (0.6.44.2exp1) experimental; urgency=low
 +
 +  * added support for i18n of the package descriptions
 +  * added support for aptitude like auto-install tracking (a HUGE
 +    HUGE thanks to Daniel Burrows who made this possible) 
 +  * synced with the http://people.debian.org/~mvo/bzr/apt/debian-sid branch
 +  * build from http://people.debian.org/~mvo/bzr/apt/debian-experimental
 +
 + -- Michael Vogt <mvo@debian.org>  Mon,  3 Jul 2006 21:50:31 +0200
 +
 +apt (0.6.44.2) unstable; urgency=low
 +
 +  * apt-pkg/depcache.cc:
 +    - added Debug::pkgDepCache::AutoInstall (thanks to infinity)
 +  * apt-pkg/acquire-item.cc:
 +    - fix missing chmod() in the new aquire code 
 +      (thanks to Bastian Blank, Closes: #367425)
 +  * merged from 
 +    http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main:
 +    * sk.po: Completed to 512t
 +    * eu.po: Completed to 512t
 +    * fr.po: Completed to 512t
 +    * sv.po: Completed to 512t
 +    * Update all PO and the POT. Gives 506t6f for formerly
 +      complete translations
 +
 + -- Michael Vogt <mvo@debian.org>  Wed, 14 Jun 2006 12:00:57 +0200
  
  apt (0.6.44.1-0.1) unstable; urgency=low
  
  
  apt (0.6.44.1) unstable; urgency=low
  
 +  * apt-pkg/acquire-item.cc:
 +    - fix reversed logic of the "Acquire::PDiffs" option
    * merged from 
      http://www.perrier.eu.org/debian/packages/d-i/level4/apt-main:
      - po/LINGUAS: added "bg" Closes: #360262
      - po/gl.po: Galician translation update. Closes: #366849
      - po/hu.po: Hungarian translation update. Closes: #365448
      - po/cs.po: Czech translation updated. Closes: #367244
 +  * apt-pkg/contrib/sha256.cc:
 +    - applied patch to fix unaligned access problem. Closes: #367417
 +      (thanks to David Mosberger)
  
   -- Michael Vogt <mvo@debian.org>  Tue, 16 May 2006 21:51:16 +0200
  
  apt (0.6.44) unstable; urgency=low
  
    * apt-pkg/acquire.cc: don't show ETA if it is 0 or absurdely large
 +  * apt-pkg/contrib/sha256.{cc,h},hashes.{cc,h}: support for sha256 
 +    (thanks to Anthony Towns)
 +  * ftparchive/cachedb.{cc,h},writer.{cc,h}: optimizations 
 +    (thanks to Anthony Towns)
 +  * apt pdiff support from experimental merged
 +  * apt-pkg/deb/dpkgpm.cc: wording fixes (thanks to Matt Zimmerman)
    * apt-pkg/deb/dpkgpm.cc: 
      - wording fixes (thanks to Matt Zimmerman)
 -    - fix error in dpkg interaction (closes: #364513, 
 -      thanks to Martin Dickopp)
 +    - fix error in dpkg interaction (closes: #364513, thanks to Martin Dickopp)
    * apt-pkg/tagfile.{cc,h}:
      - use MMap to read the entries (thanks to Zephaniah E. Hull for the
        patch) Closes: #350025
@@@ -471,7 -453,7 +504,7 @@@ apt (0.6.42) unstable; urgency=lo
    * cmdline/apt-cdrom.cc: 
      - fix some missing gettext() calls (closes: #334539)
    * doc/apt-cache.8.xml: fix typo (closes: #334714)
 -  
 +
   -- Michael Vogt <mvo@debian.org>  Wed, 19 Oct 2005 22:02:09 +0200
  
  apt (0.6.41) unstable; urgency=low
@@@ -571,7 -553,6 +604,7 @@@ apt (0.6.37) breezy; urgency=lo
    * Add Welsh translation from Dafydd Harries
      (daf@muse.19inch.net--2005/apt--main--0--patch-1)
    * Change debian/bugscript to use #!/bin/bash (Closes: #313402)
 +  * Fix a incorrect example in the man-page (closes: #282918)
  
   -- Matt Zimmerman <mdz@ubuntu.com>  Tue, 24 May 2005 14:38:25 -0700
  
index 12b03196a80c0247c9e7fe0689dec00d519310df,175339f5a1775b95288d0f0adce39569e62770ea..ab0107d36d9a77268e37169d544d4d29c92717a1
@@@ -143,10 -143,11 +143,11 @@@ separated by blank lines.  Records can 
  and a general form.
  <itemizedlist>
  <listitem>
- <simpara>The specific form assigns a priority (a "Pin-Priority") to a
- specified package and specified version or version range.  For example,
+ <simpara>The specific form assigns a priority (a "Pin-Priority") to one or more
+ specified packages and specified version or version range.  For example,
  the following record assigns a high priority to all versions of
- the <filename>perl</filename> package whose version number begins with "<literal>5.8</literal>".</simpara>
+ the <filename>perl</filename> package whose version number begins with "<literal>5.8</literal>".
+ Multiple packages can be separated by spaces.</simpara>
  
  <programlisting>
  Package: perl
@@@ -183,7 -184,7 +184,7 @@@ belonging to any distribution whose Arc
  <programlisting>
  Package: *
  Pin: release a=unstable
 -Pin-Priority: 50
 +Pin-Priority: 500
  </programlisting>
  
  <simpara>The following record assigns a high priority to all package versions
diff --combined methods/makefile
index d9cee964983a23b331a8918cfc11dc2855ec0cdd,3f561a2c3a5e99ae53b4fdabbdb23b1b3d0ccd40..f178cbbeac3344c796a1be5b1cc44e9771a112f6
@@@ -7,7 -7,7 +7,7 @@@ include ../buildlib/defaults.ma
  BIN := $(BIN)/methods
  
  # FIXME..
- LIB_APT_PKG_MAJOR = 4.3
 -LIB_APT_PKG_MAJOR = 3.12
++LIB_APT_PKG_MAJOR = 4.4
  APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR)
  
  # The file method
@@@ -52,13 -52,6 +52,13 @@@ LIB_MAKES = apt-pkg/makefil
  SOURCE = http.cc rfc2553emu.cc connect.cc
  include $(PROGRAM_H)
  
 +# The https method
 +PROGRAM=https
 +SLIBS = -lapt-pkg -lcurl
 +LIB_MAKES = apt-pkg/makefile
 +SOURCE = https.cc
 +include $(PROGRAM_H)
 +
  # The ftp method
  PROGRAM=ftp
  SLIBS = -lapt-pkg $(SOCKETLIBS)
@@@ -66,13 -59,6 +66,13 @@@ LIB_MAKES = apt-pkg/makefil
  SOURCE = ftp.cc rfc2553emu.cc connect.cc
  include $(PROGRAM_H)
  
 +# The rred method
 +PROGRAM=rred
 +SLIBS = -lapt-pkg $(SOCKETLIBS)
 +LIB_MAKES = apt-pkg/makefile
 +SOURCE = rred.cc
 +include $(PROGRAM_H)
 +
  # The rsh method
  PROGRAM=rsh
  SLIBS = -lapt-pkg
diff --combined po/apt-all.pot
index d11b801234fae9c78096879283166d6df02ddbb3,981b0465a0d436fcc2c8dcaf7a92aa1dde01e286..81d742437556b21ffaa741bf8f9dbc34b8193e2c
@@@ -7,7 -7,7 +7,7 @@@ msgid "
  msgstr ""
  "Project-Id-Version: PACKAGE VERSION\n"
  "Report-Msgid-Bugs-To: \n"
 -"POT-Creation-Date: 2006-12-19 11:37+0100\n"
 +"POT-Creation-Date: 2006-08-15 15:55+0200\n"
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
  "Language-Team: LANGUAGE <LL@li.org>\n"
  "Content-Type: text/plain; charset=CHARSET\n"
  "Content-Transfer-Encoding: 8bit\n"
  
 -#: cmdline/apt-cache.cc:135
 +#: cmdline/apt-cache.cc:141
  #, c-format
  msgid "Package %s version %s has an unmet dep:\n"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:175 cmdline/apt-cache.cc:527 cmdline/apt-cache.cc:615
 -#: cmdline/apt-cache.cc:771 cmdline/apt-cache.cc:989 cmdline/apt-cache.cc:1357
 -#: cmdline/apt-cache.cc:1508
 +#: cmdline/apt-cache.cc:181 cmdline/apt-cache.cc:550 cmdline/apt-cache.cc:638
 +#: cmdline/apt-cache.cc:794 cmdline/apt-cache.cc:1012
 +#: cmdline/apt-cache.cc:1413 cmdline/apt-cache.cc:1564
  #, c-format
  msgid "Unable to locate package %s"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:232
 +#: cmdline/apt-cache.cc:245
  msgid "Total package names : "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:272
 +#: cmdline/apt-cache.cc:285
  msgid "  Normal packages: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:273
 +#: cmdline/apt-cache.cc:286
  msgid "  Pure virtual packages: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:274
 +#: cmdline/apt-cache.cc:287
  msgid "  Single virtual packages: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:275
 +#: cmdline/apt-cache.cc:288
  msgid "  Mixed virtual packages: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:276
 +#: cmdline/apt-cache.cc:289
  msgid "  Missing: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:278
 +#: cmdline/apt-cache.cc:291
  msgid "Total distinct versions: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:280
 +#: cmdline/apt-cache.cc:293
 +msgid "Total Distinct Descriptions: "
 +msgstr ""
 +
 +#: cmdline/apt-cache.cc:295
  msgid "Total dependencies: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:283
 +#: cmdline/apt-cache.cc:298
  msgid "Total ver/file relations: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:285
 +#: cmdline/apt-cache.cc:300
 +msgid "Total Desc/File relations: "
 +msgstr ""
 +
 +#: cmdline/apt-cache.cc:302
  msgid "Total Provides mappings: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:297
 +#: cmdline/apt-cache.cc:314
  msgid "Total globbed strings: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:311
 +#: cmdline/apt-cache.cc:328
  msgid "Total dependency version space: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:316
 +#: cmdline/apt-cache.cc:333
  msgid "Total slack space: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:324
 +#: cmdline/apt-cache.cc:341
  msgid "Total space accounted for: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:446 cmdline/apt-cache.cc:1189
 +#: cmdline/apt-cache.cc:469 cmdline/apt-cache.cc:1212
  #, c-format
  msgid "Package file %s is out of sync."
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1231
 +#: cmdline/apt-cache.cc:1287
  msgid "You must give exactly one pattern"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1385
 +#: cmdline/apt-cache.cc:1441
  msgid "No packages found"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1462
 +#: cmdline/apt-cache.cc:1518
  msgid "Package files:"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1469 cmdline/apt-cache.cc:1555
 +#: cmdline/apt-cache.cc:1525 cmdline/apt-cache.cc:1611
  msgid "Cache is out of sync, can't x-ref a package file"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1470
 +#: cmdline/apt-cache.cc:1526
  #, c-format
  msgid "%4i %s\n"
  msgstr ""
  
  #. Show any packages have explicit pins
 -#: cmdline/apt-cache.cc:1482
 +#: cmdline/apt-cache.cc:1538
  msgid "Pinned packages:"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1494 cmdline/apt-cache.cc:1535
 +#: cmdline/apt-cache.cc:1550 cmdline/apt-cache.cc:1591
  msgid "(not found)"
  msgstr ""
  
  #. Installed version
 -#: cmdline/apt-cache.cc:1515
 +#: cmdline/apt-cache.cc:1571
  msgid "  Installed: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1517 cmdline/apt-cache.cc:1525
 +#: cmdline/apt-cache.cc:1573 cmdline/apt-cache.cc:1581
  msgid "(none)"
  msgstr ""
  
  #. Candidate Version
 -#: cmdline/apt-cache.cc:1522
 +#: cmdline/apt-cache.cc:1578
  msgid "  Candidate: "
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1532
 +#: cmdline/apt-cache.cc:1588
  msgid "  Package pin: "
  msgstr ""
  
  #. Show the priority tables
 -#: cmdline/apt-cache.cc:1541
 +#: cmdline/apt-cache.cc:1597
  msgid "  Version table:"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1556
 +#: cmdline/apt-cache.cc:1612
  #, c-format
  msgid "       %4i %s\n"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1652 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
 +#: cmdline/apt-cache.cc:1708 cmdline/apt-cdrom.cc:138 cmdline/apt-config.cc:70
  #: cmdline/apt-extracttemplates.cc:225 ftparchive/apt-ftparchive.cc:550
 -#: cmdline/apt-get.cc:2387 cmdline/apt-sortpkgs.cc:144
 +#: cmdline/apt-get.cc:2462 cmdline/apt-sortpkgs.cc:144
  #, c-format
  msgid "%s %s for %s %s compiled on %s %s\n"
  msgstr ""
  
 -#: cmdline/apt-cache.cc:1659
 +#: cmdline/apt-cache.cc:1715
  msgid ""
  "Usage: apt-cache [options] command\n"
  "       apt-cache [options] add file1 [file2 ...]\n"
@@@ -251,7 -243,7 +251,8 @@@ msgid "
  "  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp\n"
  msgstr ""
  
 -#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:710
 +#: cmdline/apt-extracttemplates.cc:267 apt-pkg/pkgcachegen.cc:817
++#: apt-pkg/pkgcachegen.cc:819
  #, c-format
  msgid "Unable to write to %s"
  msgstr ""
@@@ -550,221 -542,221 +551,221 @@@ msgstr "
  msgid "Failed to rename %s to %s"
  msgstr ""
  
 -#: cmdline/apt-get.cc:120
 +#: cmdline/apt-get.cc:121
  msgid "Y"
  msgstr ""
  
 -#: cmdline/apt-get.cc:142 cmdline/apt-get.cc:1506
 +#: cmdline/apt-get.cc:143 cmdline/apt-get.cc:1574
  #, c-format
  msgid "Regex compilation error - %s"
  msgstr ""
  
 -#: cmdline/apt-get.cc:237
 +#: cmdline/apt-get.cc:238
  msgid "The following packages have unmet dependencies:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:327
 +#: cmdline/apt-get.cc:328
  #, c-format
  msgid "but %s is installed"
  msgstr ""
  
 -#: cmdline/apt-get.cc:329
 +#: cmdline/apt-get.cc:330
  #, c-format
  msgid "but %s is to be installed"
  msgstr ""
  
 -#: cmdline/apt-get.cc:336
 +#: cmdline/apt-get.cc:337
  msgid "but it is not installable"
  msgstr ""
  
 -#: cmdline/apt-get.cc:338
 +#: cmdline/apt-get.cc:339
  msgid "but it is a virtual package"
  msgstr ""
  
 -#: cmdline/apt-get.cc:341
 +#: cmdline/apt-get.cc:342
  msgid "but it is not installed"
  msgstr ""
  
 -#: cmdline/apt-get.cc:341
 +#: cmdline/apt-get.cc:342
  msgid "but it is not going to be installed"
  msgstr ""
  
 -#: cmdline/apt-get.cc:346
 +#: cmdline/apt-get.cc:347
  msgid " or"
  msgstr ""
  
 -#: cmdline/apt-get.cc:375
 +#: cmdline/apt-get.cc:376
  msgid "The following NEW packages will be installed:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:401
 +#: cmdline/apt-get.cc:402
  msgid "The following packages will be REMOVED:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:423
 +#: cmdline/apt-get.cc:424
  msgid "The following packages have been kept back:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:444
 +#: cmdline/apt-get.cc:445
  msgid "The following packages will be upgraded:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:465
 +#: cmdline/apt-get.cc:466
  msgid "The following packages will be DOWNGRADED:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:485
 +#: cmdline/apt-get.cc:486
  msgid "The following held packages will be changed:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:538
 +#: cmdline/apt-get.cc:539
  #, c-format
  msgid "%s (due to %s) "
  msgstr ""
  
 -#: cmdline/apt-get.cc:546
 +#: cmdline/apt-get.cc:547
  msgid ""
  "WARNING: The following essential packages will be removed.\n"
  "This should NOT be done unless you know exactly what you are doing!"
  msgstr ""
  
 -#: cmdline/apt-get.cc:577
 +#: cmdline/apt-get.cc:578
  #, c-format
  msgid "%lu upgraded, %lu newly installed, "
  msgstr ""
  
 -#: cmdline/apt-get.cc:581
 +#: cmdline/apt-get.cc:582
  #, c-format
  msgid "%lu reinstalled, "
  msgstr ""
  
 -#: cmdline/apt-get.cc:583
 +#: cmdline/apt-get.cc:584
  #, c-format
  msgid "%lu downgraded, "
  msgstr ""
  
 -#: cmdline/apt-get.cc:585
 +#: cmdline/apt-get.cc:586
  #, c-format
  msgid "%lu to remove and %lu not upgraded.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:589
 +#: cmdline/apt-get.cc:590
  #, c-format
  msgid "%lu not fully installed or removed.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:649
 +#: cmdline/apt-get.cc:664
  msgid "Correcting dependencies..."
  msgstr ""
  
 -#: cmdline/apt-get.cc:652
 +#: cmdline/apt-get.cc:667
  msgid " failed."
  msgstr ""
  
 -#: cmdline/apt-get.cc:655
 +#: cmdline/apt-get.cc:670
  msgid "Unable to correct dependencies"
  msgstr ""
  
 -#: cmdline/apt-get.cc:658
 +#: cmdline/apt-get.cc:673
  msgid "Unable to minimize the upgrade set"
  msgstr ""
  
 -#: cmdline/apt-get.cc:660
 +#: cmdline/apt-get.cc:675
  msgid " Done"
  msgstr ""
  
 -#: cmdline/apt-get.cc:664
 +#: cmdline/apt-get.cc:679
  msgid "You might want to run `apt-get -f install' to correct these."
  msgstr ""
  
 -#: cmdline/apt-get.cc:667
 +#: cmdline/apt-get.cc:682
  msgid "Unmet dependencies. Try using -f."
  msgstr ""
  
 -#: cmdline/apt-get.cc:689
 +#: cmdline/apt-get.cc:704
  msgid "WARNING: The following packages cannot be authenticated!"
  msgstr ""
  
 -#: cmdline/apt-get.cc:693
 +#: cmdline/apt-get.cc:708
  msgid "Authentication warning overridden.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:700
 +#: cmdline/apt-get.cc:715
  msgid "Install these packages without verification [y/N]? "
  msgstr ""
  
 -#: cmdline/apt-get.cc:702
 +#: cmdline/apt-get.cc:717
  msgid "Some packages could not be authenticated"
  msgstr ""
  
 -#: cmdline/apt-get.cc:711 cmdline/apt-get.cc:858
 +#: cmdline/apt-get.cc:726 cmdline/apt-get.cc:873
  msgid "There are problems and -y was used without --force-yes"
  msgstr ""
  
 -#: cmdline/apt-get.cc:755
 +#: cmdline/apt-get.cc:770
  msgid "Internal error, InstallPackages was called with broken packages!"
  msgstr ""
  
 -#: cmdline/apt-get.cc:764
 +#: cmdline/apt-get.cc:779
  msgid "Packages need to be removed but remove is disabled."
  msgstr ""
  
 -#: cmdline/apt-get.cc:775
 +#: cmdline/apt-get.cc:790
  msgid "Internal error, Ordering didn't finish"
  msgstr ""
  
 -#: cmdline/apt-get.cc:791 cmdline/apt-get.cc:1818 cmdline/apt-get.cc:1851
 +#: cmdline/apt-get.cc:806 cmdline/apt-get.cc:1893 cmdline/apt-get.cc:1926
  msgid "Unable to lock the download directory"
  msgstr ""
  
 -#: cmdline/apt-get.cc:801 cmdline/apt-get.cc:1899 cmdline/apt-get.cc:2135
 +#: cmdline/apt-get.cc:816 cmdline/apt-get.cc:1974 cmdline/apt-get.cc:2210
  #: apt-pkg/cachefile.cc:67
  msgid "The list of sources could not be read."
  msgstr ""
  
 -#: cmdline/apt-get.cc:816
 +#: cmdline/apt-get.cc:831
  msgid "How odd.. The sizes didn't match, email apt@packages.debian.org"
  msgstr ""
  
 -#: cmdline/apt-get.cc:821
 +#: cmdline/apt-get.cc:836
  #, c-format
  msgid "Need to get %sB/%sB of archives.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:824
 +#: cmdline/apt-get.cc:839
  #, c-format
  msgid "Need to get %sB of archives.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:829
 +#: cmdline/apt-get.cc:844
  #, c-format
  msgid "After unpacking %sB of additional disk space will be used.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:832
 +#: cmdline/apt-get.cc:847
  #, c-format
  msgid "After unpacking %sB disk space will be freed.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:846 cmdline/apt-get.cc:1989
 +#: cmdline/apt-get.cc:861 cmdline/apt-get.cc:2064
  #, c-format
  msgid "Couldn't determine free space in %s"
  msgstr ""
  
 -#: cmdline/apt-get.cc:849
 +#: cmdline/apt-get.cc:864
  #, c-format
  msgid "You don't have enough free space in %s."
  msgstr ""
  
 -#: cmdline/apt-get.cc:864 cmdline/apt-get.cc:884
 +#: cmdline/apt-get.cc:879 cmdline/apt-get.cc:899
  msgid "Trivial Only specified but this is not a trivial operation."
  msgstr ""
  
 -#: cmdline/apt-get.cc:866
 +#: cmdline/apt-get.cc:881
  msgid "Yes, do as I say!"
  msgstr ""
  
 -#: cmdline/apt-get.cc:868
 +#: cmdline/apt-get.cc:883
  #, c-format
  msgid ""
  "You are about to do something potentially harmful.\n"
  " ?] "
  msgstr ""
  
 -#: cmdline/apt-get.cc:874 cmdline/apt-get.cc:893
 +#: cmdline/apt-get.cc:889 cmdline/apt-get.cc:908
  msgid "Abort."
  msgstr ""
  
 -#: cmdline/apt-get.cc:889
 +#: cmdline/apt-get.cc:904
  msgid "Do you want to continue [Y/n]? "
  msgstr ""
  
 -#: cmdline/apt-get.cc:961 cmdline/apt-get.cc:1365 cmdline/apt-get.cc:2032
 +#: cmdline/apt-get.cc:976 cmdline/apt-get.cc:1382 cmdline/apt-get.cc:2107
  #, c-format
  msgid "Failed to fetch %s  %s\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:979
 +#: cmdline/apt-get.cc:994
  msgid "Some files failed to download"
  msgstr ""
  
 -#: cmdline/apt-get.cc:980 cmdline/apt-get.cc:2041
 +#: cmdline/apt-get.cc:995 cmdline/apt-get.cc:2116
  msgid "Download complete and in download only mode"
  msgstr ""
  
 -#: cmdline/apt-get.cc:986
 +#: cmdline/apt-get.cc:1001
  msgid ""
  "Unable to fetch some archives, maybe run apt-get update or try with --fix-"
  "missing?"
  msgstr ""
  
 -#: cmdline/apt-get.cc:990
 +#: cmdline/apt-get.cc:1005
  msgid "--fix-missing and media swapping is not currently supported"
  msgstr ""
  
 -#: cmdline/apt-get.cc:995
 +#: cmdline/apt-get.cc:1010
  msgid "Unable to correct missing packages."
  msgstr ""
  
 -#: cmdline/apt-get.cc:996
 +#: cmdline/apt-get.cc:1011
  msgid "Aborting install."
  msgstr ""
  
 -#: cmdline/apt-get.cc:1030
 +#: cmdline/apt-get.cc:1045
  #, c-format
  msgid "Note, selecting %s instead of %s\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1040
 +#: cmdline/apt-get.cc:1055
  #, c-format
  msgid "Skipping %s, it is already installed and upgrade is not set.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1058
 +#: cmdline/apt-get.cc:1073
  #, c-format
  msgid "Package %s is not installed, so not removed\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1069
 +#: cmdline/apt-get.cc:1084
  #, c-format
  msgid "Package %s is a virtual package provided by:\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1081
 +#: cmdline/apt-get.cc:1096
  msgid " [Installed]"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1086
 +#: cmdline/apt-get.cc:1101
  msgid "You should explicitly select one to install."
  msgstr ""
  
 -#: cmdline/apt-get.cc:1091
 +#: cmdline/apt-get.cc:1106
  #, c-format
  msgid ""
  "Package %s is not available, but is referred to by another package.\n"
  "is only available from another source\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1110
 +#: cmdline/apt-get.cc:1125
  msgid "However the following packages replace it:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1113
 +#: cmdline/apt-get.cc:1128
  #, c-format
  msgid "Package %s has no installation candidate"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1133
 +#: cmdline/apt-get.cc:1148
  #, c-format
  msgid "Reinstallation of %s is not possible, it cannot be downloaded.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1141
 +#: cmdline/apt-get.cc:1156
  #, c-format
  msgid "%s is already the newest version.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1168
 +#: cmdline/apt-get.cc:1185
  #, c-format
  msgid "Release '%s' for '%s' was not found"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1170
 +#: cmdline/apt-get.cc:1187
  #, c-format
  msgid "Version '%s' for '%s' was not found"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1176
 +#: cmdline/apt-get.cc:1193
  #, c-format
  msgid "Selected version %s (%s) for %s\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1313
 +#: cmdline/apt-get.cc:1330
  msgid "The update command takes no arguments"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1326
 +#: cmdline/apt-get.cc:1343
  msgid "Unable to lock the list directory"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1384
 +#: cmdline/apt-get.cc:1401
  msgid ""
  "Some index files failed to download, they have been ignored, or old ones "
  "used instead."
  msgstr ""
  
 -#: cmdline/apt-get.cc:1403
 +#: cmdline/apt-get.cc:1415
 +msgid "We are not supposed to delete stuff, can't start AutoRemover"
 +msgstr ""
 +
 +#: cmdline/apt-get.cc:1440
 +msgid ""
 +"Hmm, seems like the AutoRemover destroyed something which really\n"
 +"shouldn't happen. Please file a bug report against apt."
 +msgstr ""
 +
 +#: cmdline/apt-get.cc:1443 cmdline/apt-get.cc:1642
 +msgid "The following information may help to resolve the situation:"
 +msgstr ""
 +
 +#: cmdline/apt-get.cc:1447
 +msgid "Internal Error, AutoRemover broke stuff"
 +msgstr ""
 +
 +#: cmdline/apt-get.cc:1466
  msgid "Internal error, AllUpgrade broke stuff"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1493 cmdline/apt-get.cc:1529
 +#: cmdline/apt-get.cc:1561 cmdline/apt-get.cc:1597
  #, c-format
  msgid "Couldn't find package %s"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1516
 +#: cmdline/apt-get.cc:1584
  #, c-format
  msgid "Note, selecting %s for regex '%s'\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1546
 +#: cmdline/apt-get.cc:1614
  msgid "You might want to run `apt-get -f install' to correct these:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1549
 +#: cmdline/apt-get.cc:1617
  msgid ""
  "Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a "
  "solution)."
  msgstr ""
  
 -#: cmdline/apt-get.cc:1561
 +#: cmdline/apt-get.cc:1629
  msgid ""
  "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"
  "or been moved out of Incoming."
  msgstr ""
  
 -#: cmdline/apt-get.cc:1569
 +#: cmdline/apt-get.cc:1637
  msgid ""
  "Since you only requested a single operation it is extremely likely that\n"
  "the package is simply not installable and a bug report against\n"
  "that package should be filed."
  msgstr ""
  
 -#: cmdline/apt-get.cc:1574
 -msgid "The following information may help to resolve the situation:"
 -msgstr ""
 -
 -#: cmdline/apt-get.cc:1577
 +#: cmdline/apt-get.cc:1645
  msgid "Broken packages"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1603
 +#: cmdline/apt-get.cc:1676
  msgid "The following extra packages will be installed:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1692
 +#: cmdline/apt-get.cc:1765
  msgid "Suggested packages:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1693
 +#: cmdline/apt-get.cc:1766
  msgid "Recommended packages:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1713
 +#: cmdline/apt-get.cc:1786
  msgid "Calculating upgrade... "
  msgstr ""
  
 -#: cmdline/apt-get.cc:1716 methods/ftp.cc:702 methods/connect.cc:101
 +#: cmdline/apt-get.cc:1789 methods/ftp.cc:702 methods/connect.cc:101
  msgid "Failed"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1721
 +#: cmdline/apt-get.cc:1794
  msgid "Done"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1786 cmdline/apt-get.cc:1794
 +#: cmdline/apt-get.cc:1861 cmdline/apt-get.cc:1869
  msgid "Internal error, problem resolver broke stuff"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1894
 +#: cmdline/apt-get.cc:1969
  msgid "Must specify at least one package to fetch source for"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1924 cmdline/apt-get.cc:2153
 +#: cmdline/apt-get.cc:1999 cmdline/apt-get.cc:2228
  #, c-format
  msgid "Unable to find a source package for %s"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1968
 +#: cmdline/apt-get.cc:2043
  #, c-format
  msgid "Skipping already downloaded file '%s'\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1992
 +#: cmdline/apt-get.cc:2067
  #, c-format
  msgid "You don't have enough free space in %s"
  msgstr ""
  
 -#: cmdline/apt-get.cc:1997
 +#: cmdline/apt-get.cc:2072
  #, c-format
  msgid "Need to get %sB/%sB of source archives.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2000
 +#: cmdline/apt-get.cc:2075
  #, c-format
  msgid "Need to get %sB of source archives.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2006
 +#: cmdline/apt-get.cc:2081
  #, c-format
  msgid "Fetch source %s\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2037
 +#: cmdline/apt-get.cc:2112
  msgid "Failed to fetch some archives."
  msgstr ""
  
 -#: cmdline/apt-get.cc:2065
 +#: cmdline/apt-get.cc:2140
  #, c-format
  msgid "Skipping unpack of already unpacked source in %s\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2077
 +#: cmdline/apt-get.cc:2152
  #, c-format
  msgid "Unpack command '%s' failed.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2078
 +#: cmdline/apt-get.cc:2153
  #, c-format
  msgid "Check if the 'dpkg-dev' package is installed.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2095
 +#: cmdline/apt-get.cc:2170
  #, c-format
  msgid "Build command '%s' failed.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2114
 +#: cmdline/apt-get.cc:2189
  msgid "Child process failed"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2130
 +#: cmdline/apt-get.cc:2205
  msgid "Must specify at least one package to check builddeps for"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2158
 +#: cmdline/apt-get.cc:2233
  #, c-format
  msgid "Unable to get build-dependency information for %s"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2178
 +#: cmdline/apt-get.cc:2253
  #, c-format
  msgid "%s has no build depends.\n"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2230
 +#: cmdline/apt-get.cc:2305
  #, c-format
  msgid ""
  "%s dependency for %s cannot be satisfied because the package %s cannot be "
  "found"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2282
 +#: cmdline/apt-get.cc:2357
  #, c-format
  msgid ""
  "%s dependency for %s cannot be satisfied because no available versions of "
  "package %s can satisfy version requirements"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2317
 +#: cmdline/apt-get.cc:2392
  #, c-format
  msgid "Failed to satisfy %s dependency for %s: Installed package %s is too new"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2342
 +#: cmdline/apt-get.cc:2417
  #, c-format
  msgid "Failed to satisfy %s dependency for %s: %s"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2356
 +#: cmdline/apt-get.cc:2431
  #, c-format
  msgid "Build-dependencies for %s could not be satisfied."
  msgstr ""
  
 -#: cmdline/apt-get.cc:2360
 +#: cmdline/apt-get.cc:2435
  msgid "Failed to process build dependencies"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2392
 +#: cmdline/apt-get.cc:2467
  msgid "Supported modules:"
  msgstr ""
  
 -#: cmdline/apt-get.cc:2433
 +#: cmdline/apt-get.cc:2508
  msgid ""
  "Usage: apt-get [options] command\n"
  "       apt-get [options] install|remove pkg1 [pkg2 ...]\n"
@@@ -1382,9 -1360,9 +1383,11 @@@ msgid "The info and temp directories ne
  msgstr ""
  
  #. Build the status cache
 -#: apt-inst/deb/dpkgdb.cc:139 apt-pkg/pkgcachegen.cc:643
 -#: apt-pkg/pkgcachegen.cc:712 apt-pkg/pkgcachegen.cc:717
 -#: apt-pkg/pkgcachegen.cc:840
 +#: apt-inst/deb/dpkgdb.cc:139 apt-pkg/pkgcachegen.cc:750
 +#: apt-pkg/pkgcachegen.cc:819 apt-pkg/pkgcachegen.cc:824
- #: apt-pkg/pkgcachegen.cc:947
++#: apt-pkg/pkgcachegen.cc:947 apt-pkg/pkgcachegen.cc:752
++#: apt-pkg/pkgcachegen.cc:821 apt-pkg/pkgcachegen.cc:826
++#: apt-pkg/pkgcachegen.cc:949
  msgid "Reading package lists"
  msgstr ""
  
@@@ -1484,42 -1462,40 +1487,43 @@@ msgstr "
  msgid "Unparsable control file"
  msgstr ""
  
 -#: methods/cdrom.cc:115
 +#: methods/cdrom.cc:114
  #, c-format
  msgid "Unable to read the cdrom database %s"
  msgstr ""
  
 -#: methods/cdrom.cc:124
 +#: methods/cdrom.cc:123
  msgid ""
  "Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update "
  "cannot be used to add new CD-ROMs"
  msgstr ""
  
 -#: methods/cdrom.cc:132
 +#: methods/cdrom.cc:131
  msgid "Wrong CD-ROM"
  msgstr ""
  
- #: methods/cdrom.cc:164
 -#: methods/cdrom.cc:166
++#: methods/cdrom.cc:164 methods/cdrom.cc:166
  #, c-format
  msgid "Unable to unmount the CD-ROM in %s, it may still be in use."
  msgstr ""
  
- #: methods/cdrom.cc:169
 -#: methods/cdrom.cc:171
++#: methods/cdrom.cc:169 methods/cdrom.cc:171
  msgid "Disk not found."
  msgstr ""
  
 -#: methods/cdrom.cc:179 methods/file.cc:79 methods/rsh.cc:264
 +#: methods/cdrom.cc:177 methods/file.cc:79 methods/rsh.cc:264
++#: methods/cdrom.cc:179
  msgid "File not found"
  msgstr ""
  
 -#: methods/copy.cc:42 methods/gpgv.cc:281 methods/gzip.cc:141
 -#: methods/gzip.cc:150
 +#: methods/copy.cc:42 methods/gpgv.cc:281 methods/gzip.cc:133
 +#: methods/gzip.cc:142 methods/rred.cc:234 methods/rred.cc:243
 +#: methods/gzip.cc:141 methods/gzip.cc:150
  msgid "Failed to stat"
  msgstr ""
  
 -#: methods/copy.cc:79 methods/gpgv.cc:278 methods/gzip.cc:147
 +#: methods/copy.cc:79 methods/gpgv.cc:278 methods/gzip.cc:139
 +#: methods/rred.cc:240 methods/gzip.cc:147
  msgid "Failed to set modification time"
  msgstr ""
  
@@@ -1645,7 -1621,7 +1649,8 @@@ msgstr "
  msgid "Unable to accept connection"
  msgstr ""
  
 -#: methods/ftp.cc:864 methods/http.cc:959 methods/rsh.cc:303
 +#: methods/ftp.cc:864 methods/http.cc:957 methods/rsh.cc:303
++#: methods/http.cc:958
  msgid "Problem hashing file"
  msgstr ""
  
@@@ -1766,86 -1742,86 +1771,87 @@@ msgid "
  "available:\n"
  msgstr ""
  
 -#: methods/gzip.cc:64
 +#: methods/gzip.cc:57 methods/gzip.cc:64
  #, c-format
  msgid "Couldn't open pipe for %s"
  msgstr ""
  
 -#: methods/gzip.cc:109
 +#: methods/gzip.cc:102 methods/gzip.cc:109
  #, c-format
  msgid "Read error from %s process"
  msgstr ""
  
- #: methods/http.cc:375
 -#: methods/http.cc:377
++#: methods/http.cc:375 methods/http.cc:376
  msgid "Waiting for headers"
  msgstr ""
  
- #: methods/http.cc:521
 -#: methods/http.cc:523
++#: methods/http.cc:521 methods/http.cc:522
  #, c-format
  msgid "Got a single header line over %u chars"
  msgstr ""
  
- #: methods/http.cc:529
 -#: methods/http.cc:531
++#: methods/http.cc:529 methods/http.cc:530
  msgid "Bad header line"
  msgstr ""
  
- #: methods/http.cc:548 methods/http.cc:555
 -#: methods/http.cc:550 methods/http.cc:557
++#: methods/http.cc:548 methods/http.cc:555 methods/http.cc:549
++#: methods/http.cc:556
  msgid "The HTTP server sent an invalid reply header"
  msgstr ""
  
- #: methods/http.cc:584
 -#: methods/http.cc:586
++#: methods/http.cc:584 methods/http.cc:585
  msgid "The HTTP server sent an invalid Content-Length header"
  msgstr ""
  
- #: methods/http.cc:599
 -#: methods/http.cc:601
++#: methods/http.cc:599 methods/http.cc:600
  msgid "The HTTP server sent an invalid Content-Range header"
  msgstr ""
  
- #: methods/http.cc:601
 -#: methods/http.cc:603
++#: methods/http.cc:601 methods/http.cc:602
  msgid "This HTTP server has broken range support"
  msgstr ""
  
- #: methods/http.cc:625
 -#: methods/http.cc:627
++#: methods/http.cc:625 methods/http.cc:626
  msgid "Unknown date format"
  msgstr ""
  
- #: methods/http.cc:772
 -#: methods/http.cc:774
++#: methods/http.cc:772 methods/http.cc:773
  msgid "Select failed"
  msgstr ""
  
- #: methods/http.cc:777
 -#: methods/http.cc:779
++#: methods/http.cc:777 methods/http.cc:778
  msgid "Connection timed out"
  msgstr ""
  
- #: methods/http.cc:800
 -#: methods/http.cc:802
++#: methods/http.cc:800 methods/http.cc:801
  msgid "Error writing to output file"
  msgstr ""
  
- #: methods/http.cc:831
 -#: methods/http.cc:833
++#: methods/http.cc:831 methods/http.cc:832
  msgid "Error writing to file"
  msgstr ""
  
- #: methods/http.cc:859
 -#: methods/http.cc:861
++#: methods/http.cc:859 methods/http.cc:860
  msgid "Error writing to the file"
  msgstr ""
  
- #: methods/http.cc:873
 -#: methods/http.cc:875
++#: methods/http.cc:873 methods/http.cc:874
  msgid "Error reading from server. Remote end closed connection"
  msgstr ""
  
- #: methods/http.cc:875
 -#: methods/http.cc:877
++#: methods/http.cc:875 methods/http.cc:876
  msgid "Error reading from server"
  msgstr ""
  
- #: methods/http.cc:1106
 -#: methods/http.cc:1108
++#: methods/http.cc:1106 methods/http.cc:1107
  msgid "Bad header data"
  msgstr ""
  
- #: methods/http.cc:1123
 -#: methods/http.cc:1125
++#: methods/http.cc:1123 methods/http.cc:1124
  msgid "Connection failed"
  msgstr ""
  
- #: methods/http.cc:1214
 -#: methods/http.cc:1216
++#: methods/http.cc:1214 methods/http.cc:1215
  msgid "Internal error"
  msgstr ""
  
@@@ -1858,7 -1834,7 +1864,7 @@@ msgstr "
  msgid "Couldn't make mmap of %lu bytes"
  msgstr ""
  
 -#: apt-pkg/contrib/strutl.cc:938
 +#: apt-pkg/contrib/strutl.cc:981
  #, c-format
  msgid "Selection %s not found"
  msgstr ""
@@@ -1918,12 -1894,12 +1924,12 @@@ msgstr "
  msgid "Syntax error %s:%u: Extra junk at end of file"
  msgstr ""
  
 -#: apt-pkg/contrib/progress.cc:155
 +#: apt-pkg/contrib/progress.cc:154 apt-pkg/contrib/progress.cc:155
  #, c-format
  msgid "%c%s... Error!"
  msgstr ""
  
 -#: apt-pkg/contrib/progress.cc:157
 +#: apt-pkg/contrib/progress.cc:156 apt-pkg/contrib/progress.cc:157
  #, c-format
  msgid "%c%s... Done"
  msgstr ""
@@@ -2055,109 -2031,93 +2061,109 @@@ msgstr "
  msgid "Problem syncing the file"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:126
 +#: apt-pkg/pkgcache.cc:137 apt-pkg/pkgcache.cc:132
  msgid "Empty package cache"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:132
 +#: apt-pkg/pkgcache.cc:143 apt-pkg/pkgcache.cc:138
  msgid "The package cache file is corrupted"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:137
 +#: apt-pkg/pkgcache.cc:148 apt-pkg/pkgcache.cc:143
  msgid "The package cache file is an incompatible version"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:142
 +#: apt-pkg/pkgcache.cc:153 apt-pkg/pkgcache.cc:148
  #, c-format
  msgid "This APT does not support the versioning system '%s'"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:147
 +#: apt-pkg/pkgcache.cc:158 apt-pkg/pkgcache.cc:153
  msgid "The package cache was built for a different architecture"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:218
 +#: apt-pkg/pkgcache.cc:229 apt-pkg/pkgcache.cc:224
  msgid "Depends"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:218
 +#: apt-pkg/pkgcache.cc:229 apt-pkg/pkgcache.cc:224
  msgid "PreDepends"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:218
 +#: apt-pkg/pkgcache.cc:229 apt-pkg/pkgcache.cc:224
  msgid "Suggests"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:219
 +#: apt-pkg/pkgcache.cc:230 apt-pkg/pkgcache.cc:225
  msgid "Recommends"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:219
 +#: apt-pkg/pkgcache.cc:230 apt-pkg/pkgcache.cc:225
  msgid "Conflicts"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:219
 +#: apt-pkg/pkgcache.cc:230 apt-pkg/pkgcache.cc:225
  msgid "Replaces"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:220
 +#: apt-pkg/pkgcache.cc:231 apt-pkg/pkgcache.cc:226
  msgid "Obsoletes"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:231
 +#: apt-pkg/pkgcache.cc:242 apt-pkg/pkgcache.cc:237
  msgid "important"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:231
 +#: apt-pkg/pkgcache.cc:242 apt-pkg/pkgcache.cc:237
  msgid "required"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:231
 +#: apt-pkg/pkgcache.cc:242 apt-pkg/pkgcache.cc:237
  msgid "standard"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:232
 +#: apt-pkg/pkgcache.cc:243 apt-pkg/pkgcache.cc:238
  msgid "optional"
  msgstr ""
  
 -#: apt-pkg/pkgcache.cc:232
 +#: apt-pkg/pkgcache.cc:243 apt-pkg/pkgcache.cc:238
  msgid "extra"
  msgstr ""
  
 -#: apt-pkg/depcache.cc:61 apt-pkg/depcache.cc:90
 +#: apt-pkg/depcache.cc:101 apt-pkg/depcache.cc:130 apt-pkg/depcache.cc:98
 +#: apt-pkg/depcache.cc:127
  msgid "Building dependency tree"
  msgstr ""
  
 -#: apt-pkg/depcache.cc:62
 +#: apt-pkg/depcache.cc:102 apt-pkg/depcache.cc:99
  msgid "Candidate versions"
  msgstr ""
  
 -#: apt-pkg/depcache.cc:91
 +#: apt-pkg/depcache.cc:131 apt-pkg/depcache.cc:128
  msgid "Dependency generation"
  msgstr ""
  
 -#: apt-pkg/tagfile.cc:106
 +#: apt-pkg/depcache.cc:152 apt-pkg/depcache.cc:171 apt-pkg/depcache.cc:175
 +#: apt-pkg/depcache.cc:149 apt-pkg/depcache.cc:168 apt-pkg/depcache.cc:172
 +msgid "Reading state information"
 +msgstr ""
 +
 +#: apt-pkg/depcache.cc:199 apt-pkg/depcache.cc:196
 +#, c-format
 +msgid "Failed to open StateFile %s"
 +msgstr ""
 +
 +#: apt-pkg/depcache.cc:205 apt-pkg/depcache.cc:202
 +#, c-format
 +msgid "Failed to write temporary StateFile %s"
 +msgstr ""
 +
 +#: apt-pkg/tagfile.cc:85 apt-pkg/tagfile.cc:92 apt-pkg/tagfile.cc:106
  #, c-format
  msgid "Unable to parse package file %s (1)"
  msgstr ""
  
 -#: apt-pkg/tagfile.cc:193
 +#: apt-pkg/tagfile.cc:186 apt-pkg/tagfile.cc:193
  #, c-format
  msgid "Unable to parse package file %s (2)"
  msgstr ""
@@@ -2192,7 -2152,7 +2198,7 @@@ msgstr "
  msgid "Opening %s"
  msgstr ""
  
 -#: apt-pkg/sourcelist.cc:220 apt-pkg/cdrom.cc:426
 +#: apt-pkg/sourcelist.cc:220 apt-pkg/cdrom.cc:450
  #, c-format
  msgid "Line %u too long in source list %s."
  msgstr ""
@@@ -2225,19 -2185,19 +2231,19 @@@ msgstr "
  msgid "Index file type '%s' is not supported"
  msgstr ""
  
- #: apt-pkg/algorithms.cc:245
 -#: apt-pkg/algorithms.cc:241
++#: apt-pkg/algorithms.cc:245 apt-pkg/algorithms.cc:248
  #, c-format
  msgid ""
  "The package %s needs to be reinstalled, but I can't find an archive for it."
  msgstr ""
  
- #: apt-pkg/algorithms.cc:1075
 -#: apt-pkg/algorithms.cc:1066
++#: apt-pkg/algorithms.cc:1075 apt-pkg/algorithms.cc:1104
  msgid ""
  "Error, pkgProblemResolver::Resolve generated breaks, this may be caused by "
  "held packages."
  msgstr ""
  
- #: apt-pkg/algorithms.cc:1077
 -#: apt-pkg/algorithms.cc:1068
++#: apt-pkg/algorithms.cc:1077 apt-pkg/algorithms.cc:1106
  msgid "Unable to correct problems, you have held broken packages."
  msgstr ""
  
@@@ -2253,12 -2213,12 +2259,12 @@@ msgstr "
  
  #. only show the ETA if it makes sense
  #. two days
--#: apt-pkg/acquire.cc:823
++#: apt-pkg/acquire.cc:823 apt-pkg/acquire.cc:830
  #, c-format
  msgid "Retrieving file %li of %li (%s remaining)"
  msgstr ""
  
--#: apt-pkg/acquire.cc:825
++#: apt-pkg/acquire.cc:825 apt-pkg/acquire.cc:832
  #, c-format
  msgid "Retrieving file %li of %li"
  msgstr ""
@@@ -2273,17 -2233,17 +2279,17 @@@ msgstr "
  msgid "Method %s did not start correctly"
  msgstr ""
  
--#: apt-pkg/acquire-worker.cc:377
++#: apt-pkg/acquire-worker.cc:377 apt-pkg/acquire-worker.cc:384
  #, c-format
  msgid "Please insert the disc labeled: '%s' in the drive '%s' and press enter."
  msgstr ""
  
 -#: apt-pkg/init.cc:120
 +#: apt-pkg/init.cc:125
  #, c-format
  msgid "Packaging system '%s' is not supported"
  msgstr ""
  
 -#: apt-pkg/init.cc:136
 +#: apt-pkg/init.cc:141
  msgid "Unable to determine a suitable packaging system type"
  msgstr ""
  
@@@ -2304,147 -2264,132 +2310,149 @@@ msgstr "
  msgid "You may want to run apt-get update to correct these problems"
  msgstr ""
  
--#: apt-pkg/policy.cc:269
++#: apt-pkg/policy.cc:269 apt-pkg/policy.cc:270
  msgid "Invalid record in the preferences file, no Package header"
  msgstr ""
  
--#: apt-pkg/policy.cc:291
++#: apt-pkg/policy.cc:291 apt-pkg/policy.cc:292
  #, c-format
  msgid "Did not understand pin type %s"
  msgstr ""
  
--#: apt-pkg/policy.cc:299
++#: apt-pkg/policy.cc:299 apt-pkg/policy.cc:300
  msgid "No priority (or zero) specified for pin"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:74
 +#: apt-pkg/pkgcachegen.cc:76
  msgid "Cache has an incompatible versioning system"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:117
 +#: apt-pkg/pkgcachegen.cc:119
  #, c-format
  msgid "Error occurred while processing %s (NewPackage)"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:129
 +#: apt-pkg/pkgcachegen.cc:134
  #, c-format
  msgid "Error occurred while processing %s (UsePackage1)"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:150
 +#: apt-pkg/pkgcachegen.cc:157
 +#, c-format
 +msgid "Error occured while processing %s (NewFileDesc1)"
 +msgstr ""
 +
 +#: apt-pkg/pkgcachegen.cc:182
  #, c-format
  msgid "Error occurred while processing %s (UsePackage2)"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:154
 +#: apt-pkg/pkgcachegen.cc:186
  #, c-format
  msgid "Error occurred while processing %s (NewFileVer1)"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:184
 +#: apt-pkg/pkgcachegen.cc:217
  #, c-format
  msgid "Error occurred while processing %s (NewVersion1)"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:188
 +#: apt-pkg/pkgcachegen.cc:221
  #, c-format
  msgid "Error occurred while processing %s (UsePackage3)"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:192
 +#: apt-pkg/pkgcachegen.cc:225
  #, c-format
  msgid "Error occurred while processing %s (NewVersion2)"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:207
 +#: apt-pkg/pkgcachegen.cc:249
 +#, c-format
 +msgid "Error occured while processing %s (NewFileDesc2)"
 +msgstr ""
 +
 +#: apt-pkg/pkgcachegen.cc:255
  msgid "Wow, you exceeded the number of package names this APT is capable of."
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:210
 +#: apt-pkg/pkgcachegen.cc:258
  msgid "Wow, you exceeded the number of versions this APT is capable of."
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:213
 +#: apt-pkg/pkgcachegen.cc:261
 +msgid "Wow, you exceeded the number of descriptions this APT is capable of."
 +msgstr ""
 +
 +#: apt-pkg/pkgcachegen.cc:264
  msgid "Wow, you exceeded the number of dependencies this APT is capable of."
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:241
 +#: apt-pkg/pkgcachegen.cc:292
  #, c-format
  msgid "Error occurred while processing %s (FindPkg)"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:254
 +#: apt-pkg/pkgcachegen.cc:305
  #, c-format
  msgid "Error occurred while processing %s (CollectFileProvides)"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:260
 +#: apt-pkg/pkgcachegen.cc:311
  #, c-format
  msgid "Package %s %s was not found while processing file dependencies"
  msgstr ""
  
- #: apt-pkg/pkgcachegen.cc:681
 -#: apt-pkg/pkgcachegen.cc:574
++#: apt-pkg/pkgcachegen.cc:681 apt-pkg/pkgcachegen.cc:682
  #, c-format
  msgid "Couldn't stat source package list %s"
  msgstr ""
  
- #: apt-pkg/pkgcachegen.cc:765
 -#: apt-pkg/pkgcachegen.cc:658
++#: apt-pkg/pkgcachegen.cc:765 apt-pkg/pkgcachegen.cc:767
  msgid "Collecting File Provides"
  msgstr ""
  
 -#: apt-pkg/pkgcachegen.cc:785 apt-pkg/pkgcachegen.cc:792
 +#: apt-pkg/pkgcachegen.cc:892 apt-pkg/pkgcachegen.cc:899
++#: apt-pkg/pkgcachegen.cc:894 apt-pkg/pkgcachegen.cc:901
  msgid "IO Error saving source cache"
  msgstr ""
  
 -#: apt-pkg/acquire-item.cc:126
 +#: apt-pkg/acquire-item.cc:130
  #, c-format
  msgid "rename failed, %s (%s -> %s)."
  msgstr ""
  
 -#: apt-pkg/acquire-item.cc:236 apt-pkg/acquire-item.cc:945
 +#: apt-pkg/acquire-item.cc:408 apt-pkg/acquire-item.cc:658
- #: apt-pkg/acquire-item.cc:1402
++#: apt-pkg/acquire-item.cc:1402 apt-pkg/acquire-item.cc:409
++#: apt-pkg/acquire-item.cc:666 apt-pkg/acquire-item.cc:1416
  msgid "MD5Sum mismatch"
  msgstr ""
  
 -#: apt-pkg/acquire-item.cc:640
 -msgid "There is no public key available for the following key IDs:\n"
 +#: apt-pkg/acquire-item.cc:1097
 +msgid "There are no public key available for the following key IDs:\n"
  msgstr ""
  
- #: apt-pkg/acquire-item.cc:1210
 -#: apt-pkg/acquire-item.cc:753
++#: apt-pkg/acquire-item.cc:1210 apt-pkg/acquire-item.cc:1224
  #, c-format
  msgid ""
  "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)"
  msgstr ""
  
- #: apt-pkg/acquire-item.cc:1269
 -#: apt-pkg/acquire-item.cc:812
++#: apt-pkg/acquire-item.cc:1269 apt-pkg/acquire-item.cc:1283
  #, c-format
  msgid ""
  "I wasn't able to locate file for the %s package. This might mean you need to "
  "manually fix this package."
  msgstr ""
  
- #: apt-pkg/acquire-item.cc:1305
 -#: apt-pkg/acquire-item.cc:848
++#: apt-pkg/acquire-item.cc:1305 apt-pkg/acquire-item.cc:1319
  #, c-format
  msgid ""
  "The package index files are corrupted. No Filename: field for package %s."
  msgstr ""
  
- #: apt-pkg/acquire-item.cc:1392
 -#: apt-pkg/acquire-item.cc:935
++#: apt-pkg/acquire-item.cc:1392 apt-pkg/acquire-item.cc:1406
  msgid "Size mismatch"
  msgstr ""
  
  msgid "Vendor block %s contains no fingerprint"
  msgstr ""
  
 -#: apt-pkg/cdrom.cc:507
 +#: apt-pkg/cdrom.cc:531
  #, c-format
  msgid ""
  "Using CD-ROM mount point %s\n"
  "Mounting CD-ROM\n"
  msgstr ""
  
 -#: apt-pkg/cdrom.cc:518 apt-pkg/cdrom.cc:600
 +#: apt-pkg/cdrom.cc:540 apt-pkg/cdrom.cc:622
  msgid "Identifying.. "
  msgstr ""
  
 -#: apt-pkg/cdrom.cc:543
 +#: apt-pkg/cdrom.cc:565
  #, c-format
  msgid "Stored label: %s \n"
  msgstr ""
  
 -#: apt-pkg/cdrom.cc:563
 +#: apt-pkg/cdrom.cc:585
  #, c-format
  msgid "Using CD-ROM mount point %s\n"
  msgstr ""
  
 -#: apt-pkg/cdrom.cc:581
 +#: apt-pkg/cdrom.cc:603
  msgid "Unmounting CD-ROM\n"
  msgstr ""
  
 -#: apt-pkg/cdrom.cc:585
 +#: apt-pkg/cdrom.cc:607
  msgid "Waiting for disc...\n"
  msgstr ""
  
  #. Mount the new CDROM
 -#: apt-pkg/cdrom.cc:593
 +#: apt-pkg/cdrom.cc:615
  msgid "Mounting CD-ROM...\n"
  msgstr ""
  
 -#: apt-pkg/cdrom.cc:611
 +#: apt-pkg/cdrom.cc:633
  msgid "Scanning disc for index files..\n"
  msgstr ""
  
 -#: apt-pkg/cdrom.cc:649
 +#: apt-pkg/cdrom.cc:673
  #, c-format
 -msgid "Found %i package indexes, %i source indexes and %i signatures\n"
 +msgid ""
 +"Found %i package indexes, %i source indexes, %i translation indexes and %i "
 +"signatures\n"
  msgstr ""
  
- #: apt-pkg/cdrom.cc:737
 -#: apt-pkg/cdrom.cc:714
++#: apt-pkg/cdrom.cc:737 apt-pkg/cdrom.cc:739
  msgid "That is not a valid name, try again.\n"
  msgstr ""
  
- #: apt-pkg/cdrom.cc:753
 -#: apt-pkg/cdrom.cc:730
++#: apt-pkg/cdrom.cc:753 apt-pkg/cdrom.cc:755
  #, c-format
  msgid ""
  "This disc is called: \n"
  "'%s'\n"
  msgstr ""
  
- #: apt-pkg/cdrom.cc:757
 -#: apt-pkg/cdrom.cc:734
++#: apt-pkg/cdrom.cc:757 apt-pkg/cdrom.cc:759
  msgid "Copying package lists..."
  msgstr ""
  
- #: apt-pkg/cdrom.cc:783
 -#: apt-pkg/cdrom.cc:758
++#: apt-pkg/cdrom.cc:783 apt-pkg/cdrom.cc:785
  msgid "Writing new source list\n"
  msgstr ""
  
- #: apt-pkg/cdrom.cc:792
 -#: apt-pkg/cdrom.cc:767
++#: apt-pkg/cdrom.cc:792 apt-pkg/cdrom.cc:794
  msgid "Source list entries for this disc are:\n"
  msgstr ""
  
- #: apt-pkg/cdrom.cc:832
 -#: apt-pkg/cdrom.cc:810
++#: apt-pkg/cdrom.cc:832 apt-pkg/cdrom.cc:836
  msgid "Unmounting CD-ROM..."
  msgstr ""
  
 -#: apt-pkg/indexcopy.cc:261
 +#: apt-pkg/indexcopy.cc:263 apt-pkg/indexcopy.cc:830
  #, c-format
  msgid "Wrote %i records.\n"
  msgstr ""
  
 -#: apt-pkg/indexcopy.cc:263
 +#: apt-pkg/indexcopy.cc:265 apt-pkg/indexcopy.cc:832
  #, c-format
  msgid "Wrote %i records with %i missing files.\n"
  msgstr ""
  
 -#: apt-pkg/indexcopy.cc:266
 +#: apt-pkg/indexcopy.cc:268 apt-pkg/indexcopy.cc:835
  #, c-format
  msgid "Wrote %i records with %i mismatched files\n"
  msgstr ""
  
 -#: apt-pkg/indexcopy.cc:269
 +#: apt-pkg/indexcopy.cc:271 apt-pkg/indexcopy.cc:838
  #, c-format
  msgid "Wrote %i records with %i missing files and %i mismatched files\n"
  msgstr ""
@@@ -2595,14 -2538,6 +2603,18 @@@ msgstr "
  msgid "Completely removed %s"
  msgstr ""
  
 +#: methods/rred.cc:219
 +msgid "Could not patch file"
 +msgstr ""
 +
  #: methods/rsh.cc:330
  msgid "Connection closed prematurely"
  msgstr ""
- #: apt-pkg/acquire-item.cc:1097
 +
++#: apt-pkg/acquire-item.cc:1097 apt-pkg/acquire-item.cc:1111
 +msgid "There is no public key available for the following key IDs:\n"
 +msgstr ""
++
++#: apt-pkg/pkgcache.cc:226
++msgid "Breaks"
++msgstr ""