]> git.saurik.com Git - apt.git/commitdiff
* apt-inst/contrib/extracttar.cc:
authorMichael Vogt <michael.vogt@ubuntu.com>
Fri, 3 Aug 2007 10:18:12 +0000 (12:18 +0200)
committerMichael Vogt <michael.vogt@ubuntu.com>
Fri, 3 Aug 2007 10:18:12 +0000 (12:18 +0200)
  - fix fd leak for zero size files (thanks to Bill Broadley for
    reporting this bug)
* apt-pkg/acquire-item.cc:
  - remove zero size files on I-M-S hit
* methods/https.cc:
  - only send LastModified if we actually have one
  - send range request with if-range
  - delete failed downloads
* apt-pkg/deb/dpkgpm.{cc,h}:
  - merged dpkg-log branch, this lets you specify a
    Dir::Log::Terminal file to log dpkg output to
    (ABI break)
* merged apt--sha256 branch to fully support the new
  sha256 checksums in the Packages and Release files
  (ABI break)
* Applied patch from Aurelien Jarno <aurel32@debian.org> to fix wrong
  directory downloading on non-linux architectures (closes: #435597)
* Applied patch from Guillem Jover <guillem@debian.org> to use
* Applied patch from Guillem Jover <guillem@debian.org> to add
  support to add lzma support (closes: #408201)
* methods/makefile:
  - install lzma symlink method (for full lzma support)
* debian/control:
  - suggest "lzma"
* Simplified HttpMethod::Fetch on http.cc removing Tail variable;
* Fix pipeline handling on http.cc (closes: #413324)
* Fix building to properly support binNMUs. Thanks to Daniel Schepler
  <schepler@math.unipd.it> by the patch (closes: #359634)
* Fix example for Install-{Recommends,Suggests} options on
  configure-index example file. Thanks to Peter Eisentraut
  <peter_e@gmx.net> by the patch (closes: #432223)
* fixed compile errors with g++ 4.3 (thanks to
  Daniel Burrows, closes: #429378)
* fixes in the auto-mark code (thanks to Daniel
  Burrows)
* fix FTFBFS by changing build-depends to
  libcurl4-gnutls-dev (closes: #428363)
* cmdline/apt-get.cc:
  - fix InstallTask code when a pkgRecord ends
    with a single '\n' (thanks to Soren Hansen for reporting)
* merged from Christian Perrier:
      * vi.po: completed to 532t, again. Closes: #429899
      * gl.po: completed to 532t. Closes: #429506
      * vi.po: completed to 532t. Closes: #428672
      * Update all PO and the POT. Gives 514t14f4u for formerly
        complete translations
      * fr.po: completed to 532t
      * ku.po, uk.po, LINGUAS: reintegrate those translations
        which disappeared from the BZR repositories

16 files changed:
1  2 
apt-pkg/acquire-item.cc
apt-pkg/acquire-item.h
apt-pkg/acquire-method.cc
apt-pkg/acquire-method.h
apt-pkg/deb/dpkgpm.cc
apt-pkg/deb/dpkgpm.h
apt-pkg/init.cc
cmdline/apt-get.cc
cmdline/makefile
configure.in
debian/apt.dirs
debian/changelog
debian/control
debian/rules
doc/examples/configure-index
methods/makefile

diff --combined apt-pkg/acquire-item.cc
index 3b683df63160f25270c3ee82dbcd13757203d770,f3784a58bc9d2e9dce1963b8d360fd3ed360378a..3e6262c96f72313680e8c52105bd27b3870671fd
@@@ -63,7 -63,6 +63,7 @@@ void pkgAcquire::Item::Failed(string Me
  {
     Status = StatIdle;
     ErrorText = LookupTag(Message,"Message");
 +   UsedMirror =  LookupTag(Message,"UsedMirror");
     if (QueueCounter <= 1)
     {
        /* This indicates that the file is not available right now but might
         Dequeue();
         return;
        }
 -      
 +
        Status = StatError;
        Dequeue();
     }   
 +   
 +   // report mirror failure back to LP if we actually use a mirror
 +   string FailReason = LookupTag(Message, "FailReason");
 +   if(FailReason.size() != 0)
 +      ReportMirrorFailure(FailReason);
 +   else
 +      ReportMirrorFailure(ErrorText);
  }
                                                                        /*}}}*/
  // Acquire::Item::Start - Item has begun to download                  /*{{{*/
@@@ -103,12 -95,12 +103,12 @@@ void pkgAcquire::Item::Start(string /*M
  // Acquire::Item::Done - Item downloaded OK                           /*{{{*/
  // ---------------------------------------------------------------------
  /* */
- void pkgAcquire::Item::Done(string Message,unsigned long Size,string,
+ void pkgAcquire::Item::Done(string Message,unsigned long Size,string Hash,
                            pkgAcquire::MethodConfig *Cnf)
  {
     // We just downloaded something..
     string FileName = LookupTag(Message,"Filename");
 -   // we only inform the Log class if it was actually not a local thing
 +   UsedMirror =  LookupTag(Message,"UsedMirror");
     if (Complete == false && !Local && FileName == DestFile)
     {
        if (Owner->Log != 0)
  
     if (FileSize == 0)
        FileSize= Size;
 -   
     Status = StatDone;
     ErrorText = string();
     Owner->Dequeue(this);
@@@ -139,49 -132,6 +139,49 @@@ void pkgAcquire::Item::Rename(string Fr
  }
                                                                        /*}}}*/
  
 +void pkgAcquire::Item::ReportMirrorFailure(string FailCode)
 +{
 +   // we only act if a mirror was used at all
 +   if(UsedMirror.empty())
 +      return;
 +#if 0
 +   std::cerr << "\nReportMirrorFailure: " 
 +           << UsedMirror
 +           << " Uri: " << DescURI()
 +           << " FailCode: " 
 +           << FailCode << std::endl;
 +#endif
 +   const char *Args[40];
 +   unsigned int i = 0;
 +   string report = _config->Find("Methods::Mirror::ProblemReporting", 
 +                               "/usr/lib/apt/apt-report-mirror-failure");
 +   if(!FileExists(report))
 +      return;
 +   Args[i++] = report.c_str();
 +   Args[i++] = UsedMirror.c_str();
 +   Args[i++] = DescURI().c_str();
 +   Args[i++] = FailCode.c_str();
 +   Args[i++] = NULL;
 +   pid_t pid = ExecFork();
 +   if(pid < 0) 
 +   {
 +      _error->Error("ReportMirrorFailure Fork failed");
 +      return;
 +   }
 +   else if(pid == 0) 
 +   {
 +      execvp(Args[0], (char**)Args);
 +      std::cerr << "Could not exec " << Args[0] << std::endl;
 +      _exit(100);
 +   }
 +   if(!ExecWait(pid, "report-mirror-failure")) 
 +   {
 +      _error->Warning("Couldn't report problem to '%s'",
 +                    _config->Find("Methods::Mirror::ProblemReporting").c_str());
 +   }
 +}
 +
 +
  
  // AcqDiffIndex::AcqDiffIndex - Constructor                   
  // ---------------------------------------------------------------------
   */
  pkgAcqDiffIndex::pkgAcqDiffIndex(pkgAcquire *Owner,
                                 string URI,string URIDesc,string ShortDesc,
-                                string ExpectedMD5)
-    : Item(Owner), RealURI(URI), ExpectedMD5(ExpectedMD5), Description(URIDesc)
+                                HashString ExpectedHash)
+    : Item(Owner), RealURI(URI), ExpectedHash(ExpectedHash),
+      Description(URIDesc)
  {
     
     Debug = _config->FindB("Debug::pkgAcquire::Diffs",false);
@@@ -321,11 -272,11 +322,11 @@@ bool pkgAcqDiffIndex::ParseDiffIndex(st
        if(found) 
        {
         // queue the diffs
-        unsigned int last_space = Description.rfind(" ");
+        string::size_type 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);
+                             ExpectedHash, available_patches);
         Complete = false;
         Status = StatDone;
         Dequeue();
@@@ -348,7 -299,7 +349,7 @@@ void pkgAcqDiffIndex::Failed(string Mes
                << "Falling back to normal index file aquire" << std::endl;
  
     new pkgAcqIndex(Owner, RealURI, Description, Desc.ShortDesc, 
-                  ExpectedMD5);
+                  ExpectedHash);
  
     Complete = false;
     Status = StatDone;
@@@ -394,8 -345,9 +395,9 @@@ void pkgAcqDiffIndex::Done(string Messa
   */
  pkgAcqIndexDiffs::pkgAcqIndexDiffs(pkgAcquire *Owner,
                                   string URI,string URIDesc,string ShortDesc,
-                                  string ExpectedMD5, vector<DiffInfo> diffs)
-    : Item(Owner), RealURI(URI), ExpectedMD5(ExpectedMD5), 
+                                  HashString ExpectedMD5, 
+                                  vector<DiffInfo> diffs)
+    : Item(Owner), RealURI(URI), ExpectedHash(ExpectedHash), 
       available_patches(diffs)
  {
     
@@@ -428,7 -380,7 +430,7 @@@ void pkgAcqIndexDiffs::Failed(string Me
        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);
+                  ExpectedHash);
     Finish();
  }
  
@@@ -443,14 -395,7 +445,7 @@@ void pkgAcqIndexDiffs::Finish(bool allD
        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)
+       if(!ExpectedHash.empty() && !ExpectedHash.VerifyFile(DestFile))
        {
         Status = StatAuthError;
         ErrorText = _("MD5Sum mismatch");
@@@ -592,7 -537,7 +587,7 @@@ void pkgAcqIndexDiffs::Done(string Mess
        // see if there is more to download
        if(available_patches.size() > 0) {
         new pkgAcqIndexDiffs(Owner, RealURI, Description, Desc.ShortDesc,
-                             ExpectedMD5, available_patches);
+                             ExpectedHash, available_patches);
         return Finish();
        } else 
         return Finish(true);
     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)
+                        HashString ExpectedHash, string comprExt)
+    : Item(Owner), RealURI(URI), ExpectedHash(ExpectedHash)
  {
     Decompression = false;
     Erase = false;
@@@ -645,6 -590,7 +640,6 @@@ string pkgAcqIndex::Custom600Headers(
     struct stat Buf;
     if (stat(Final.c_str(),&Buf) != 0)
        return "\nIndex-File: true";
 -   
     return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
  }
                                                                        /*}}}*/
@@@ -657,7 -603,7 +652,7 @@@ void pkgAcqIndex::Failed(string Message
  
        // retry with a gzip one 
        new pkgAcqIndex(Owner, RealURI, Desc.Description,Desc.ShortDesc, 
-                     ExpectedMD5, string(".gz"));
+                     ExpectedHash, string(".gz"));
        Status = StatDone;
        Complete = false;
        Dequeue();
     to the uncompressed version of the file. If this is so the file
     is copied into the partial directory. In all other cases the file
     is decompressed with a gzip uri. */
- void pkgAcqIndex::Done(string Message,unsigned long Size,string MD5,
+ void pkgAcqIndex::Done(string Message,unsigned long Size,string Hash,
                       pkgAcquire::MethodConfig *Cfg)
  {
-    Item::Done(Message,Size,MD5,Cfg);
+    Item::Done(Message,Size,Hash,Cfg);
  
     if (Decompression == true)
     {
        if (_config->FindB("Debug::pkgAcquire::Auth", false))
        {
-          std::cerr << std::endl << RealURI << ": Computed MD5: " << MD5;
-          std::cerr << "  Expected MD5: " << ExpectedMD5 << std::endl;
-       }
-       if (MD5.empty())
-       {
-          MD5Summation sum;
-          FileFd Fd(DestFile, FileFd::ReadOnly);
-          sum.AddFD(Fd.Fd(), Fd.Size());
-          Fd.Close();
-          MD5 = (string)sum.Result();
+          std::cerr << std::endl << RealURI << ": Computed Hash: " << Hash;
+          std::cerr << "  Expected Hash: " << ExpectedHash.toStr() << std::endl;
        }
  
-       if (!ExpectedMD5.empty() && MD5 != ExpectedMD5)
+       if (!ExpectedHash.empty() && ExpectedHash.toStr() != Hash)
        {
           Status = StatAuthError;
-          ErrorText = _("MD5Sum mismatch");
+          ErrorText = _("Hash Sum mismatch");
           Rename(DestFile,DestFile + ".FAILED");
 +       ReportMirrorFailure("HashChecksumFailure");
           return;
        }
        // Done, move it into position
     {
        // The files timestamp matches
        if (StringToBool(LookupTag(Message,"Alt-IMS-Hit"),false) == true)
+       {
+        unlink(FileName.c_str());
         return;
+       }
        Decompression = true;
        Local = true;
        DestFile += ".decomp";
     
     // The files timestamp matches
     if (StringToBool(LookupTag(Message,"IMS-Hit"),false) == true)
+    {
+       unlink(FileName.c_str());
        return;
+    }
  
     if (FileName == DestFile)
        Erase = true;
  // ---------------------------------------------------------------------
  /* The Translation file is added to the queue */
  pkgAcqIndexTrans::pkgAcqIndexTrans(pkgAcquire *Owner,
-                           string URI,string URIDesc,string ShortDesc) :
-                       pkgAcqIndex(Owner, URI, URIDesc, ShortDesc, "", "")
+                           string URI,string URIDesc,string ShortDesc) 
+   : pkgAcqIndex(Owner, URI, URIDesc, ShortDesc, HashString(), "")
  {
  }
  
@@@ -965,10 -906,10 +956,10 @@@ string pkgAcqMetaIndex::Custom600Header
     return "\nIndex-File: true\nLast-Modified: " + TimeRFC1123(Buf.st_mtime);
  }
  
- void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string MD5,
+ void pkgAcqMetaIndex::Done(string Message,unsigned long Size,string Hash,
                           pkgAcquire::MethodConfig *Cfg)
  {
-    Item::Done(Message,Size,MD5,Cfg);
+    Item::Done(Message,Size,Hash,Cfg);
  
     // MetaIndexes are done in two passes: one to download the
     // metaindex with an appropriate method, and a second to verify it
@@@ -1030,18 -971,18 +1021,18 @@@ void pkgAcqMetaIndex::RetrievalDone(str
  
     // see if the download was a IMSHit
     IMSHit = StringToBool(LookupTag(Message,"IMS-Hit"),false);
     Complete = true;
  
     string FinalFile = _config->FindDir("Dir::State::lists");
     FinalFile += URItoFileName(RealURI);
  
-    // The files timestamp matches
-    if (StringToBool(LookupTag(Message,"IMS-Hit"),false) == false)
-    {
-       // Move it into position
+    // If we get a IMS hit we can remove the empty file in partial
+    // othersie we move the file in place
+    if (IMSHit)
+       unlink(DestFile.c_str());
+    else
        Rename(DestFile,FinalFile);
-    }
     chmod(FinalFile.c_str(),0644);
     DestFile = FinalFile;
  }
@@@ -1086,7 -1027,7 +1077,7 @@@ void pkgAcqMetaIndex::QueueIndexes(boo
          Target != IndexTargets->end();
          Target++)
     {
-       string ExpectedIndexMD5;
+       HashString ExpectedIndexHash;
        if (verify)
        {
           const indexRecords::checkSum *Record = MetaIndexParser->Lookup((*Target)->MetaKey);
                 + (*Target)->MetaKey + " in Meta-index file (malformed Release file?)";
              return;
           }
-          ExpectedIndexMD5 = Record->MD5Hash;
+          ExpectedIndexHash = Record->Hash;
           if (_config->FindB("Debug::pkgAcquire::Auth", false))
           {
              std::cerr << "Queueing: " << (*Target)->URI << std::endl;
-             std::cerr << "Expected MD5: " << ExpectedIndexMD5 << std::endl;
+             std::cerr << "Expected Hash: " << ExpectedIndexHash.toStr() << std::endl;
           }
-          if (ExpectedIndexMD5.empty())
+          if (ExpectedIndexHash.empty())
           {
              Status = StatAuthError;
-             ErrorText = "Unable to find MD5 sum for "
+             ErrorText = "Unable to find hash sum for "
                 + (*Target)->MetaKey + " in Meta-index file";
              return;
           }
        
        // Queue Packages file (either diff or full packages files, depending
        // on the users option)
 -      if(_config->FindB("Acquire::PDiffs",true) == true) 
 +      if(_config->FindB("Acquire::PDiffs",false) == true) 
         new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description,
-                            (*Target)->ShortDesc, ExpectedIndexMD5);
+                            (*Target)->ShortDesc, ExpectedIndexHash);
        else 
         new pkgAcqIndex(Owner, (*Target)->URI, (*Target)->Description,
-                           (*Target)->ShortDesc, ExpectedIndexMD5);
+                           (*Target)->ShortDesc, ExpectedIndexHash);
     }
  }
  
@@@ -1238,7 -1179,6 +1229,7 @@@ void pkgAcqMetaIndex::Failed(string Mes
        }
  
        // gpgv method failed 
 +      ReportMirrorFailure("GPGFailure");
        _error->Warning("GPG error: %s: %s",
                        Desc.Description.c_str(),
                        LookupTag(Message,"Message").c_str());
@@@ -1360,7 -1300,12 +1351,12 @@@ bool pkgAcqArchive::QueueNext(
         return false;
        
        string PkgFile = Parse.FileName();
-       MD5 = Parse.MD5Hash();
+       if(Parse.SHA256Hash() != "")
+        ExpectedHash = HashString("SHA256", Parse.SHA256Hash());
+       else if (Parse.SHA1Hash() != "")
+        ExpectedHash = HashString("SHA1", Parse.SHA1Hash());
+       else 
+        ExpectedHash = HashString("MD5Sum", Parse.MD5Hash());
        if (PkgFile.empty() == true)
         return _error->Error(_("The package index files are corrupted. No Filename: "
                              "field for package %s."),
  // AcqArchive::Done - Finished fetching                                       /*{{{*/
  // ---------------------------------------------------------------------
  /* */
- void pkgAcqArchive::Done(string Message,unsigned long Size,string Md5Hash,
+ void pkgAcqArchive::Done(string Message,unsigned long Size,string CalcHash,
                         pkgAcquire::MethodConfig *Cfg)
  {
-    Item::Done(Message,Size,Md5Hash,Cfg);
+    Item::Done(Message,Size,CalcHash,Cfg);
     
     // Check the size
     if (Size != Version->Size)
        return;
     }
     
-    // Check the md5
-    if (Md5Hash.empty() == false && MD5.empty() == false)
+    // Check the hash
+    if(ExpectedHash.toStr() != CalcHash)
     {
-       if (Md5Hash != MD5)
-       {
-        Status = StatError;
-        ErrorText = _("MD5Sum mismatch");
-        if(FileExists(DestFile))
-           Rename(DestFile,DestFile + ".FAILED");
-        return;
-       }
+       Status = StatError;
+       ErrorText = _("Hash Sum mismatch");
+       if(FileExists(DestFile))
+        Rename(DestFile,DestFile + ".FAILED");
+       return;
     }
  
     // Grab the output filename
@@@ -1555,10 -1497,10 +1548,10 @@@ void pkgAcqArchive::Finished(
  // AcqFile::pkgAcqFile - Constructor                                  /*{{{*/
  // ---------------------------------------------------------------------
  /* The file is added to the queue */
- pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI,string MD5,
+ pkgAcqFile::pkgAcqFile(pkgAcquire *Owner,string URI,string Hash,
                       unsigned long Size,string Dsc,string ShortDesc,
                       const string &DestDir, const string &DestFilename) :
-                        Item(Owner), Md5Hash(MD5)
+                        Item(Owner), ExpectedHash(Hash)
  {
     Retries = _config->FindI("Acquire::Retries",0);
     
  // AcqFile::Done - Item downloaded OK                                 /*{{{*/
  // ---------------------------------------------------------------------
  /* */
- void pkgAcqFile::Done(string Message,unsigned long Size,string MD5,
+ void pkgAcqFile::Done(string Message,unsigned long Size,string CalcHash,
                      pkgAcquire::MethodConfig *Cnf)
  {
-    // Check the md5
-    if (Md5Hash.empty() == false && MD5.empty() == false)
+    Item::Done(Message,Size,CalcHash,Cnf);
+    // Check the hash
+    if(!ExpectedHash.empty() && ExpectedHash.toStr() != CalcHash)
     {
-       if (Md5Hash != MD5)
-       {
-        Status = StatError;
-        ErrorText = "MD5Sum mismatch";
-        Rename(DestFile,DestFile + ".FAILED");
-        return;
-       }
+       Status = StatError;
+       ErrorText = "Hash Sum mismatch";
+       Rename(DestFile,DestFile + ".FAILED");
+       return;
     }
     
-    Item::Done(Message,Size,MD5,Cnf);
     string FileName = LookupTag(Message,"Filename");
     if (FileName.empty() == true)
     {
diff --combined apt-pkg/acquire-item.h
index 233cbdda9b61c9ae7970e1e81cb94c97226a2d81,edd9102305ed2c3292027024a83f134d3aaf196e..802d8d1ffe1b08320e72f50bff5f299399817141
@@@ -12,7 -12,7 +12,7 @@@
     Three item classes are provided to provide functionality for
     downloading of Index, Translation and Packages files.
     
-    A Archive class is provided for downloading .deb files. It does Md5
+    A Archive class is provided for downloading .deb files. It does Hash
     checking and source location as well as a retry algorithm.
     
     ##################################################################### */
@@@ -26,7 -26,7 +26,7 @@@
  #include <apt-pkg/sourcelist.h>
  #include <apt-pkg/pkgrecords.h>
  #include <apt-pkg/indexrecords.h>
+ #include <apt-pkg/hashes.h>
  
  /** \addtogroup acquire
   *  @{
@@@ -142,7 -142,6 +142,7 @@@ class pkgAcquire::Ite
      *  download progress indicator's overall statistics.
      */
     bool Local;
 +   string UsedMirror;
  
     /** \brief The number of fetch queues into which this item has been
      *  inserted.
      *  \param Message Data from the acquire method.  Use LookupTag()
      *  to parse it.
      *  \param Size The size of the object that was fetched.
-     *  \param Md5Hash The MD5Sum of the object that was fetched.
+     *  \param Hash The HashSum of the object that was fetched.
      *  \param Cnf The method via which the object was fetched.
      *
      *  \sa pkgAcqMethod
      */
-    virtual void Done(string Message,unsigned long Size,string Md5Hash,
+    virtual void Done(string Message,unsigned long Size,string Hash,
                     pkgAcquire::MethodConfig *Cnf);
  
     /** \brief Invoked when the worker starts to fetch this object.
     /** \brief Invoked by the worker when the download is completely done. */
     virtual void Finished() {};
     
-    /** \brief MD5Sum.
+    /** \brief HashSum 
      *
-     *  \return the MD5Sum of this object, if applicable; otherwise, an
+     *  \return the HashSum of this object, if applicable; otherwise, an
      *  empty string.
      */
-    virtual string MD5Sum() {return string();};
+    virtual string HashSum() {return string();};
  
     /** \return the acquire process with which this item is associated. */
     pkgAcquire *GetOwner() {return Owner;};
  
     /** \return \b true if this object is being fetched from a trusted source. */
     virtual bool IsTrusted() {return false;};
 +   
 +   // report mirror problems
 +   /** \brief Report mirror problem
 +    * 
 +    *  This allows reporting mirror failures back to a centralized
 +    *  server. The apt-report-mirror-failure script is called for this
 +    * 
 +    *  \param FailCode A short failure string that is send
 +    */
 +   void ReportMirrorFailure(string FailCode);
 +
  
     /** \brief Initialize an item.
      *
@@@ -309,10 -297,10 +309,10 @@@ class pkgAcqDiffIndex : public pkgAcqui
      */
     string RealURI;
  
-    /** \brief The MD5Sum that the real index file should have after
+    /** \brief The Hash that the real index file should have after
      *  all patches have been applied.
      */
-    string ExpectedMD5;
+    HashString ExpectedHash;
  
     /** \brief The index file which will be patched to generate the new
      *  file.
      *
      *  \param ShortDesc A short description of the list file to download.
      *
-     *  \param ExpectedMD5 The list file's MD5 signature.
+     *  \param ExpectedHash The list file's MD5 signature.
      */
     pkgAcqDiffIndex(pkgAcquire *Owner,string URI,string URIDesc,
-                  string ShortDesc, string ExpectedMD5);
+                  string ShortDesc, HashString ExpectedHash);
  };
  
  /** \brief An item that is responsible for fetching all the patches
@@@ -391,7 -379,7 +391,7 @@@ class pkgAcqIndexDiffs : public pkgAcqu
      *  finishes downloading.
      *
      *  Dequeues the item and checks the resulting file's md5sum
-     *  against ExpectedMD5 after the last patch was applied.
+     *  against ExpectedHash after the last patch was applied.
      *  There is no need to check the md5/sha1 after a "normal" 
      *  patch because QueueNextDiff() will check the sha1 later.
      *
      */
     string RealURI;
  
-    /** \brief The MD5Sum of the package index file that is being
+    /** \brief The HashSum of the package index file that is being
      *  reconstructed.
      */
-    string ExpectedMD5;
+    HashString ExpectedHash;
  
     /** A description of the file being downloaded. */
     string Description;
      *
      *  \param ShortDesc A brief description of this item.
      *
-     *  \param ExpectedMD5 The expected md5sum of the completely
+     *  \param ExpectedHash The expected md5sum of the completely
      *  reconstructed package index file; the index file will be tested
      *  against this value when it is entirely reconstructed.
      *
      *  that depends on it.
      */
     pkgAcqIndexDiffs(pkgAcquire *Owner,string URI,string URIDesc,
-                   string ShortDesc, string ExpectedMD5,
+                   string ShortDesc, HashString ExpectedHash,
                    vector<DiffInfo> diffs=vector<DiffInfo>());
  };
  
@@@ -519,8 -507,8 +519,8 @@@ class pkgAcqIndex : public pkgAcquire::
      */
     string RealURI;
  
-    /** \brief The expected md5sum of the decompressed index file. */
-    string ExpectedMD5;
+    /** \brief The expected hashsum of the decompressed index file. */
+    HashString ExpectedHash;
  
     /** \brief The compression-related file extension that is being
      *  added to the downloaded file (e.g., ".gz" or ".bz2").
                     pkgAcquire::MethodConfig *Cnf);
     virtual string Custom600Headers();
     virtual string DescURI() {return RealURI + CompressionExtension;};
+    virtual string HashSum() {return ExpectedHash.toStr(); };
  
     /** \brief Create a pkgAcqIndex.
      *
      *
      *  \param ShortDesc A brief description of this index file.
      *
-     *  \param ExpectedMD5 The expected md5sum of this index file.
+     *  \param ExpectedHash The expected hashsum of this index file.
      *
      *  \param compressExt The compression-related extension with which
      *  this index file should be downloaded, or "" to autodetect
      *  (".bz2" is used if bzip2 is installed, ".gz" otherwise).
      */
     pkgAcqIndex(pkgAcquire *Owner,string URI,string URIDesc,
-              string ShortDesct, string ExpectedMD5, string compressExt="");
 -             string ShortDesc, HashString ExpectedHash, string compressExt="");
++             string ShortDesc, HashString ExpectedHash, 
++             string compressExt="");
  };
  
  /** \brief An acquire item that is responsible for fetching a
@@@ -581,7 -570,7 +583,7 @@@ class pkgAcqIndexTrans : public pkgAcqI
      *
      *  \param ShortDesc A brief description of this index file.
      *
-     *  \param ExpectedMD5 The expected md5sum of this index file.
+     *  \param ExpectedHash The expected hashsum of this index file.
      *
      *  \param compressExt The compression-related extension with which
      *  this index file should be downloaded, or "" to autodetect
@@@ -673,9 -662,9 +675,9 @@@ class pkgAcqMetaSig : public pkgAcquire
   *
   *  Once the download and verification are complete, the downloads of
   *  the individual index files are queued up using pkgAcqDiffIndex.
-  *  If the meta-index file had a valid signature, the expected md5sums
+  *  If the meta-index file had a valid signature, the expected hashsums
   *  of the index files will be the md5sums listed in the meta-index;
-  *  otherwise, the expected md5sums will be "" (causing the
+  *  otherwise, the expected hashsums will be "" (causing the
   *  authentication of the index files to be bypassed).
   */
  class pkgAcqMetaIndex : public pkgAcquire::Item
  
     /** \brief Starts downloading the individual index files.
      *
-     *  \param verify If \b true, only indices whose expected md5sum
+     *  \param verify If \b true, only indices whose expected hashsum
      *  can be determined from the meta-index will be downloaded, and
-     *  the md5sums of indices will be checked (reporting
+     *  the hashsums of indices will be checked (reporting
      *  #StatAuthError if there is a mismatch).  If verify is \b false,
-     *  no md5sum checking will be performed.
+     *  no hashsum checking will be performed.
      */
     void QueueIndexes(bool verify);
     
     
     // Specialized action members
     virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-    virtual void Done(string Message,unsigned long Size,string Md5Hash,
+    virtual void Done(string Message,unsigned long Size, string Hash,
                     pkgAcquire::MethodConfig *Cnf);
     virtual string Custom600Headers();
     virtual string DescURI() {return RealURI; };
@@@ -788,8 -777,8 +790,8 @@@ class pkgAcqArchive : public pkgAcquire
      */
     pkgRecords *Recs;
  
-    /** \brief The md5sum of this package. */
-    string MD5;
+    /** \brief The hashsum of this package. */
+    HashString ExpectedHash;
  
     /** \brief A location in which the actual filename of the package
      *  should be stored.
     public:
     
     virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-    virtual void Done(string Message,unsigned long Size,string Md5Hash,
+    virtual void Done(string Message,unsigned long Size,string Hash,
                     pkgAcquire::MethodConfig *Cnf);
-    virtual string MD5Sum() {return MD5;};
     virtual string DescURI() {return Desc.URI;};
     virtual string ShortDesc() {return Desc.ShortDesc;};
     virtual void Finished();
+    virtual string HashSum() {return ExpectedHash.toStr(); };
     virtual bool IsTrusted();
     
     /** \brief Create a new pkgAcqArchive.
@@@ -860,8 -848,8 +861,8 @@@ class pkgAcqFile : public pkgAcquire::I
     /** \brief The currently active download process. */
     pkgAcquire::ItemDesc Desc;
  
-    /** \brief The md5sum of the file to download, if it is known. */
-    string Md5Hash;
+    /** \brief The hashsum of the file to download, if it is known. */
+    HashString ExpectedHash;
  
     /** \brief How many times to retry the download, set from
      *  Acquire::Retries.
     
     // Specialized action members
     virtual void Failed(string Message,pkgAcquire::MethodConfig *Cnf);
-    virtual void Done(string Message,unsigned long Size,string Md5Hash,
+    virtual void Done(string Message,unsigned long Size,string CalcHash,
                     pkgAcquire::MethodConfig *Cnf);
-    virtual string MD5Sum() {return Md5Hash;};
     virtual string DescURI() {return Desc.URI;};
+    virtual string HashSum() {return ExpectedHash.toStr(); };
  
     /** \brief Create a new pkgAcqFile object.
      *
      *
      *  \param URI The URI to download.
      *
-     *  \param MD5 The md5sum of the file to download, if it is known;
+     *  \param Hash The hashsum of the file to download, if it is known;
      *  otherwise "".
      *
      *  \param Size The size of the file to download, if it is known;
      * is the absolute name to which the file should be downloaded.
      */
  
-    pkgAcqFile(pkgAcquire *Owner, string URI, string MD5, unsigned long Size,
+    pkgAcqFile(pkgAcquire *Owner, string URI, string Hash, unsigned long Size,
              string Desc, string ShortDesc,
              const string &DestDir="", const string &DestFilename="");
  };
index dfadf800f5ec5e8fc276756b9a34bbd1a03aab71,bc29417f776e9d3b5db93b7d3fedf0229c2094e6..26f992bcff007dbae483dfc2bcd741c227990a63
@@@ -96,11 -96,12 +96,11 @@@ void pkgAcqMethod::Fail(string Err,boo
     }
     
     char S[1024];
 +   char *End = S;
     if (Queue != 0)
     {
 -      snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: %s\n"
 -             "Message: %s %s\n",Queue->Uri.c_str(),Err.c_str(),
 -             FailExtra.c_str());
 -
 +      End += snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: %s\n"
 +                    "Message: %s %s\n",Queue->Uri.c_str(), Err.c_str(), IP.c_str());
        // Dequeue
        FetchItem *Tmp = Queue;
        Queue = Queue->Next;
         QueueBack = Queue;
     }
     else
 -      snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: <UNKNOWN>\n"
 -             "Message: %s %s\n",Err.c_str(),
 -             FailExtra.c_str());
 -      
 +   {
 +      End += snprintf(S,sizeof(S)-50,"400 URI Failure\nURI: <UNKNOWN>\n"
 +                    "Message: %s\n",Err.c_str());
 +   }
 +   if(FailReason.empty() == false)
 +      End += snprintf(End,sizeof(S)-50 - (End - S),"FailReason: %s\n",FailReason.c_str());
 +   if (UsedMirror.empty() == false)
 +      End += snprintf(End,sizeof(S)-50 - (End - S),"UsedMirror: %s\n",UsedMirror.c_str());
     // Set the transient flag 
     if (Transient == true)
        strcat(S,"Transient-Failure: true\n\n");
@@@ -179,11 -176,14 +179,16 @@@ void pkgAcqMethod::URIDone(FetchResult 
                      TimeRFC1123(Res.LastModified).c_str());
  
     if (Res.MD5Sum.empty() == false)
+    {
        End += snprintf(End,sizeof(S)-50 - (End - S),"MD5-Hash: %s\n",Res.MD5Sum.c_str());
+       End += snprintf(End,sizeof(S)-50 - (End - S),"MD5Sum-Hash: %s\n",Res.MD5Sum.c_str());
+    }
     if (Res.SHA1Sum.empty() == false)
        End += snprintf(End,sizeof(S)-50 - (End - S),"SHA1-Hash: %s\n",Res.SHA1Sum.c_str());
+    if (Res.SHA256Sum.empty() == false)
+       End += snprintf(End,sizeof(S)-50 - (End - S),"SHA256-Hash: %s\n",Res.SHA256Sum.c_str());
 +   if (UsedMirror.empty() == false)
 +      End += snprintf(End,sizeof(S)-50 - (End - S),"UsedMirror: %s\n",UsedMirror.c_str());
     if (Res.GPGVOutput.size() > 0)
        End += snprintf(End,sizeof(S)-50 - (End - S),"GPGVOutput:\n");     
     for (vector<string>::iterator I = Res.GPGVOutput.begin();
        if (Alt->SHA1Sum.empty() == false)
         End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-SHA1-Hash: %s\n",
                         Alt->SHA1Sum.c_str());
+       if (Alt->SHA256Sum.empty() == false)
+        End += snprintf(End,sizeof(S)-50 - (End - S),"Alt-SHA256-Hash: %s\n",
+                        Alt->SHA256Sum.c_str());
        
        if (Alt->IMSHit == true)
         strcat(End,"Alt-IMS-Hit: true\n");
@@@ -460,5 -463,6 +468,6 @@@ void pkgAcqMethod::FetchResult::TakeHas
  {
     MD5Sum = Hash.MD5.Result();
     SHA1Sum = Hash.SHA1.Result();
+    SHA256Sum = Hash.SHA256.Result();
  }
                                                                        /*}}}*/
diff --combined apt-pkg/acquire-method.h
index 89eb2e77f12411150a47d6ae29922fbe2e8105b6,e02eab01859e25cff57849660d532fdb26dc8f46..18c2cf009b5b93db686f734b755a16c89f35e40e
@@@ -43,6 -43,7 +43,7 @@@ class pkgAcqMetho
     {
        string MD5Sum;
        string SHA1Sum;
+       string SHA256Sum;
        vector<string> GPGVOutput;
        time_t LastModified;
        bool IMSHit;
@@@ -58,9 -59,7 +59,9 @@@
     vector<string> Messages;
     FetchItem *Queue;
     FetchItem *QueueBack;
 -   string FailExtra;
 +   string FailReason;
 +   string UsedMirror;
 +   string IP;
     
     // Handlers for messages
     virtual bool Configuration(string Message);
     // Outgoing messages
     void Fail(bool Transient = false);
     inline void Fail(const char *Why, bool Transient = false) {Fail(string(Why),Transient);};
 -   void Fail(string Why, bool Transient = false);
 -   void URIStart(FetchResult &Res);
 -   void URIDone(FetchResult &Res,FetchResult *Alt = 0);
 +   virtual void Fail(string Why, bool Transient = false);
 +   virtual void URIStart(FetchResult &Res);
 +   virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
 +
     bool MediaFail(string Required,string Drive);
     virtual void Exit() {};
  
     public:
 -
     enum CnfFlags {SingleInstance = (1<<0),
                    Pipeline = (1<<1), SendConfig = (1<<2),
                    LocalOnly = (1<<3), NeedsCleanup = (1<<4), 
@@@ -86,8 -85,7 +87,8 @@@
     void Status(const char *Format,...);
     
     int Run(bool Single = false);
 -   inline void SetFailExtraMsg(string Msg) {FailExtra = Msg;};
 +   inline void SetFailReason(string Msg) {FailReason = Msg;};
 +   inline void SetIP(string aIP) {IP = aIP;};
     
     pkgAcqMethod(const char *Ver,unsigned long Flags = 0);
     virtual ~pkgAcqMethod() {};
diff --combined apt-pkg/deb/dpkgpm.cc
index 3c367e42152824374cbedbb252287da0fd268908,aa840f85efccbf3000980af3224f7df3f021293b..befd9124c1de5817b2abe5f63014e71410e58acb
  #include <apt-pkg/error.h>
  #include <apt-pkg/configuration.h>
  #include <apt-pkg/depcache.h>
 +#include <apt-pkg/pkgrecords.h>
  #include <apt-pkg/strutl.h>
  
  #include <unistd.h>
  #include <stdlib.h>
  #include <fcntl.h>
+ #include <sys/select.h>
  #include <sys/types.h>
  #include <sys/wait.h>
  #include <signal.h>
  #include <sstream>
  #include <map>
  
+ #include <termios.h>
+ #include <unistd.h>
+ #include <sys/ioctl.h>
+ #include <pty.h>
  #include <config.h>
  #include <apti18n.h>
                                                                        /*}}}*/
  
  using namespace std;
  
  // DPkgPM::pkgDPkgPM - Constructor                                    /*{{{*/
  // ---------------------------------------------------------------------
  /* */
  pkgDPkgPM::pkgDPkgPM(pkgDepCache *Cache) 
-    : pkgPackageManager(Cache), pkgFailures(0)
+    : pkgPackageManager(Cache), dpkgbuf_pos(0), PackagesTotal(0), PackagesDone(0)
  {
  }
                                                                        /*}}}*/
@@@ -325,7 -332,168 +333,170 @@@ bool pkgDPkgPM::RunScriptsWithPkgs(cons
  
     return true;
  }
+                                                                       /*}}}*/
+ // DPkgPM::DoStdin - Read stdin and pass to slave pty                 /*{{{*/
+ // ---------------------------------------------------------------------
+ /*
+ */
+ void pkgDPkgPM::DoStdin(int master)
+ {
+    char input_buf[256] = {0,}; 
+    int len = read(0, input_buf, sizeof(input_buf));
+    write(master, input_buf, len);
+ }
                                                                        /*}}}*/
+ // DPkgPM::DoTerminalPty - Read the terminal pty and write log                /*{{{*/
+ // ---------------------------------------------------------------------
+ /*
+  * read the terminal pty and write log
+  */
+ void pkgDPkgPM::DoTerminalPty(int master, FILE *term_out)
+ {
+    char term_buf[1024] = {0,};
+    int len=read(master, term_buf, sizeof(term_buf));
+    if(len <= 0)
+       return;
+    write(1, term_buf, len);
+    if(term_out)
+       fwrite(term_buf, len, sizeof(char), term_out);
+ }
+                                                                       /*}}}*/
+ // DPkgPM::ProcessDpkgStatusBuf                                               /*{{{*/
+ // ---------------------------------------------------------------------
+ /*
+  */
+ void pkgDPkgPM::ProcessDpkgStatusLine(int OutStatusFd, char *line)
+ {
+    // the status we output
+    ostringstream status;
+    if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
+       std::clog << "got from dpkg '" << line << "'" << std::endl;
+    /* dpkg sends strings like this:
+       'status:   <pkg>:  <pkg  qstate>'
+       errors look like this:
+       'status: /var/cache/apt/archives/krecipes_0.8.1-0ubuntu1_i386.deb : error : trying to overwrite `/usr/share/doc/kde/HTML/en/krecipes/krectip.png', which is also in package krecipes-data 
+       and conffile-prompt like this
+       'status: conffile-prompt: conffile : 'current-conffile' 'new-conffile' useredited distedited
+           
+    */
+    char* list[5];
+    //        dpkg sends multiline error messages sometimes (see
+    //        #374195 for a example. we should support this by
+    //        either patching dpkg to not send multiline over the
+    //        statusfd or by rewriting the code here to deal with
+    //        it. for now we just ignore it and not crash
+    TokSplitString(':', line, list, sizeof(list)/sizeof(list[0]));
+    char *pkg = list[1];
+    char *action = _strstrip(list[2]);
+    if( pkg == NULL || action == NULL) 
+    {
+       if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
+        std::clog << "ignoring line: not enough ':'" << std::endl;
+       return;
+    }
+    if(strncmp(action,"error",strlen("error")) == 0)
+    {
+       status << "pmerror:" << list[1]
+            << ":"  << (PackagesDone/float(PackagesTotal)*100.0) 
+            << ":" << list[3]
+            << endl;
+       if(OutStatusFd > 0)
+        write(OutStatusFd, status.str().c_str(), status.str().size());
+       if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
+        std::clog << "send: '" << status.str() << "'" << endl;
++      pkgFailures++;
++      WriteApportReport(list[1], list[3]);
+       return;
+    }
+    if(strncmp(action,"conffile",strlen("conffile")) == 0)
+    {
+       status << "pmconffile:" << list[1]
+            << ":"  << (PackagesDone/float(PackagesTotal)*100.0) 
+            << ":" << list[3]
+            << endl;
+       if(OutStatusFd > 0)
+        write(OutStatusFd, status.str().c_str(), status.str().size());
+       if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
+        std::clog << "send: '" << status.str() << "'" << endl;
+       return;
+    }
+    vector<struct DpkgState> &states = PackageOps[pkg];
+    const char *next_action = NULL;
+    if(PackageOpsDone[pkg] < states.size())
+       next_action = states[PackageOpsDone[pkg]].state;
+    // check if the package moved to the next dpkg state
+    if(next_action && (strcmp(action, next_action) == 0)) 
+    {
+       // only read the translation if there is actually a next
+       // action
+       const char *translation = _(states[PackageOpsDone[pkg]].str);
+       char s[200];
+       snprintf(s, sizeof(s), translation, pkg);
+       // we moved from one dpkg state to a new one, report that
+       PackageOpsDone[pkg]++;
+       PackagesDone++;
+       // build the status str
+       status << "pmstatus:" << pkg 
+            << ":"  << (PackagesDone/float(PackagesTotal)*100.0) 
+            << ":" << s
+            << endl;
+       if(OutStatusFd > 0)
+        write(OutStatusFd, status.str().c_str(), status.str().size());
+       if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
+        std::clog << "send: '" << status.str() << "'" << endl;
+    }
+    if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) 
+       std::clog << "(parsed from dpkg) pkg: " << pkg 
+               << " action: " << action << endl;
+ }
+ // DPkgPM::DoDpkgStatusFd                                             /*{{{*/
+ // ---------------------------------------------------------------------
+ /*
+  */
+ void pkgDPkgPM::DoDpkgStatusFd(int statusfd, int OutStatusFd)
+ {
+    char *p, *q;
+    int len;
+    len=read(statusfd, &dpkgbuf[dpkgbuf_pos], sizeof(dpkgbuf)-dpkgbuf_pos);
+    dpkgbuf_pos += len;
+    if(len <= 0)
+       return;
+    // process line by line if we have a buffer
+    p = q = dpkgbuf;
+    while((q=(char*)memchr(p, '\n', dpkgbuf+dpkgbuf_pos-p)) != NULL)
+    {
+       *q = 0;
+       ProcessDpkgStatusLine(OutStatusFd, p);
+       p=q+1; // continue with next line
+    }
+    // now move the unprocessed bits (after the final \n that is now a 0x0) 
+    // to the start and update dpkgbuf_pos
+    p = (char*)memrchr(dpkgbuf, 0, dpkgbuf_pos);
+    if(p == NULL)
+       return;
+    // we are interessted in the first char *after* 0x0
+    p++;
+    // move the unprocessed tail to the start and update pos
+    memmove(dpkgbuf, p, p-dpkgbuf);
+    dpkgbuf_pos = dpkgbuf+dpkgbuf_pos-p;
+ }
+                                                                       /*}}}*/
  // DPkgPM::Go - Run the sequence                                      /*{{{*/
  // ---------------------------------------------------------------------
  /* This globs the operations and calls dpkg 
@@@ -346,9 -514,6 +517,6 @@@ bool pkgDPkgPM::Go(int OutStatusFd
     if (RunScriptsWithPkgs("DPkg::Pre-Install-Pkgs") == false)
        return false;
     
-    // prepare the progress reporting 
-    int Done = 0;
-    int Total = 0;
     // map the dpkg states to the operations that are performed
     // (this is sorted in the same way as Item::Ops)
     static const struct DpkgState DpkgStatesOpMap[][5] = {
        },
     };
  
-    // the dpkg states that the pkg will run through, the string is 
-    // the package, the vector contains the dpkg states that the package
-    // will go through
-    map<string,vector<struct DpkgState> > PackageOps;
-    // the dpkg states that are already done; the string is the package
-    // the int is the state that is already done (e.g. a package that is
-    // going to be install is already in state "half-installed")
-    map<string,unsigned int> PackageOpsDone;
     // init the PackageOps map, go over the list of packages that
     // that will be [installed|configured|removed|purged] and add
     // them to the PackageOps map (the dpkg states it goes through)
        for(int i=0; (DpkgStatesOpMap[(*I).Op][i]).state != NULL;  i++) 
        {
         PackageOps[name].push_back(DpkgStatesOpMap[(*I).Op][i]);
-        Total++;
+        PackagesTotal++;
        }
     }   
  
+    // create log
+    string logdir = _config->FindDir("Dir::Log");
+    if(not FileExists(logdir))
+       return _error->Error(_("Directory '%s' missing"), logdir.c_str());
+    string logfile_name = flCombine(logdir,
+                                  _config->Find("Dir::Log::Terminal"));
+    FILE *term_out = NULL;
+    if (!logfile_name.empty())
+    {
+       term_out = fopen(logfile_name.c_str(),"a");
+       chmod(logfile_name.c_str(), 0600);
+       // output current time
+       char outstr[200];
+       time_t t = time(NULL);
+       struct tm *tmp = localtime(&t);
+       strftime(outstr, sizeof(outstr), "%F  %T", tmp);
+       fprintf(term_out, "\nLog started: ");
+       fprintf(term_out, outstr);
+       fprintf(term_out, "\n");
+    }
     // this loop is runs once per operation
     for (vector<Item>::iterator I = List.begin(); I != List.end();)
     {
         it doesn't die but we do! So we must also ignore it */
        sighandler_t old_SIGQUIT = signal(SIGQUIT,SIG_IGN);
        sighandler_t old_SIGINT = signal(SIGINT,SIG_IGN);
-       
+       struct  termios tt;
+       struct  winsize win;
+       int     master;
+       int     slave;
+       // FIXME: setup sensible signal handling (*ick*)
+       tcgetattr(0, &tt);
+       ioctl(0, TIOCGWINSZ, (char *)&win);
+       if (openpty(&master, &slave, NULL, &tt, &win) < 0) 
+       {
+        fprintf(stderr, _("openpty failed\n"));
+       }
+       struct termios rtt;
+       rtt = tt;
+       cfmakeraw(&rtt);
+       rtt.c_lflag &= ~ECHO;
+       tcsetattr(0, TCSAFLUSH, &rtt);
         // Fork dpkg
        pid_t Child;
        _config->Set("APT::Keep-Fds::",fd[1]);
        // This is the child
        if (Child == 0)
        {
+        setsid();
+        ioctl(slave, TIOCSCTTY, 0);
+        close(master);
+        dup2(slave, 0);
+        dup2(slave, 1);
+        dup2(slave, 2);
+        close(slave);
         close(fd[0]); // close the read end of the pipe
-        
         if (chdir(_config->FindDir("DPkg::Run-Directory","/").c_str()) != 0)
            _exit(100);
         
            if (fcntl(STDIN_FILENO,F_SETFL,Flags & (~(long)O_NONBLOCK)) < 0)
               _exit(100);
         }
-        
         /* No Job Control Stop Env is a magic dpkg var that prevents it
            from using sigstop */
         putenv("DPKG_NO_TSTP=yes");
  
        // we read from dpkg here
        int _dpkgin = fd[0];
-       fcntl(_dpkgin, F_SETFL, O_NONBLOCK);
        close(fd[1]);                        // close the write end of the pipe
  
        // the read buffers for the communication with dpkg
-       char line[1024] = {0,};
        char buf[2] = {0,0};
        
        // the result of the waitpid call
        int res;
+       close(slave);
  
+       // setups fds
+       fd_set rfds;
+       struct timeval tv;
+       int select_ret;
        while ((res=waitpid(Child,&Status, WNOHANG)) != Child) {
         if(res < 0) {
            // FIXME: move this to a function or something, looks ugly here
            signal(SIGINT,old_SIGINT);
            return _error->Errno("waitpid","Couldn't wait for subprocess");
         }
-        
-        // read a single char, make sure that the read can't block 
-        // (otherwise we may leave zombies)
-          int len = read(_dpkgin, buf, 1);
-        // nothing to read, wait a bit for more
-        if(len <= 0)
-        {
-           usleep(1000);
-           continue;
-        }
-        
-        // sanity check (should never happen)
-        if(strlen(line) >= sizeof(line)-10)
-        {
-           _error->Error("got a overlong line from dpkg: '%s'",line);
-           line[0]=0;
-        }
-        // append to line, check if we got a complete line
-        strcat(line, buf);
-        if(buf[0] != '\n')
-           continue;
-        if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
-           std::clog << "got from dpkg '" << line << "'" << std::endl;
  
-        // the status we output
-        ostringstream status;
-        /* dpkg sends strings like this:
-           'status:   <pkg>:  <pkg  qstate>'
-           errors look like this:
-           'status: /var/cache/apt/archives/krecipes_0.8.1-0ubuntu1_i386.deb : error : trying to overwrite `/usr/share/doc/kde/HTML/en/krecipes/krectip.png', which is also in package krecipes-data 
-           and conffile-prompt like this
-           'status: conffile-prompt: conffile : 'current-conffile' 'new-conffile' useredited distedited
-           
-        */
-        char* list[5];
-        //        dpkg sends multiline error messages sometimes (see
-        //        #374195 for a example. we should support this by
-        //        either patching dpkg to not send multiline over the
-        //        statusfd or by rewriting the code here to deal with
-        //        it. for now we just ignore it and not crash
-        TokSplitString(':', line, list, sizeof(list)/sizeof(list[0]));
-        char *pkg = list[1];
-        char *action = _strstrip(list[2]);
-        if( pkg == NULL || action == NULL) 
-        {
-           if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
-              std::clog << "ignoring line: not enough ':'" << std::endl;
-           // reset the line buffer
-           line[0]=0;
-           continue;
-        }
-        if(strncmp(action,"error",strlen("error")) == 0)
-        {
-           status << "pmerror:" << list[1]
-                  << ":"  << (Done/float(Total)*100.0) 
-                  << ":" << list[3]
-                  << endl;
-           if(OutStatusFd > 0)
-              write(OutStatusFd, status.str().c_str(), status.str().size());
-           line[0]=0;
-           if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
-              std::clog << "send: '" << status.str() << "'" << endl;
-           pkgFailures++;
-           WriteApportReport(list[1], list[3]);
-           continue;
-        }
-        if(strncmp(action,"conffile",strlen("conffile")) == 0)
-        {
-           status << "pmconffile:" << list[1]
-                  << ":"  << (Done/float(Total)*100.0) 
-                  << ":" << list[3]
-                  << endl;
-           if(OutStatusFd > 0)
-              write(OutStatusFd, status.str().c_str(), status.str().size());
-           line[0]=0;
-           if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
-              std::clog << "send: '" << status.str() << "'" << endl;
+        // wait for input or output here
+        FD_ZERO(&rfds);
+        FD_SET(0, &rfds); 
+        FD_SET(_dpkgin, &rfds);
+        FD_SET(master, &rfds);
+        tv.tv_sec = 1;
+        tv.tv_usec = 0;
+        select_ret = select(max(master, _dpkgin)+1, &rfds, NULL, NULL, &tv);
+        if (select_ret < 0)
+           std::cerr << "Error in select()" << std::endl;
+        else if (select_ret == 0)
            continue;
-        }
  
-        vector<struct DpkgState> &states = PackageOps[pkg];
-        const char *next_action = NULL;
-        if(PackageOpsDone[pkg] < states.size())
-           next_action = states[PackageOpsDone[pkg]].state;
-        // check if the package moved to the next dpkg state
-        if(next_action && (strcmp(action, next_action) == 0)) 
-        {
-           // only read the translation if there is actually a next
-           // action
-           const char *translation = _(states[PackageOpsDone[pkg]].str);
-           char s[200];
-           snprintf(s, sizeof(s), translation, pkg);
-           // we moved from one dpkg state to a new one, report that
-           PackageOpsDone[pkg]++;
-           Done++;
-           // build the status str
-           status << "pmstatus:" << pkg 
-                  << ":"  << (Done/float(Total)*100.0) 
-                  << ":" << s
-                  << endl;
-           if(OutStatusFd > 0)
-              write(OutStatusFd, status.str().c_str(), status.str().size());
-           if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true)
-              std::clog << "send: '" << status.str() << "'" << endl;
-        }
-        if (_config->FindB("Debug::pkgDPkgProgressReporting",false) == true) 
-           std::clog << "(parsed from dpkg) pkg: " << pkg 
-                     << " action: " << action << endl;
-        // reset the line buffer
-        line[0]=0;
+        if(FD_ISSET(master, &rfds))
+           DoTerminalPty(master, term_out);
+        if(FD_ISSET(0, &rfds))
+           DoStdin(master);
+        if(FD_ISSET(_dpkgin, &rfds))
+           DoDpkgStatusFd(_dpkgin, OutStatusFd);
        }
        close(_dpkgin);
  
        // Restore sig int/quit
        signal(SIGQUIT,old_SIGQUIT);
        signal(SIGINT,old_SIGINT);
+       tcsetattr(0, TCSAFLUSH, &tt);
         
        // Check for an error code.
        if (WIFEXITED(Status) == 0 || WEXITSTATUS(Status) != 0)
         else 
            _error->Error("Sub-process %s exited unexpectedly",Args[0]);
  
-        if(stopOnError)
+        if(stopOnError) 
+        {
+           fclose(term_out);
            return false;
+        }
        }      
     }
+    fclose(term_out);
  
     if (RunScripts("DPkg::Post-Invoke") == false)
        return false;
@@@ -747,94 -863,3 +866,94 @@@ void pkgDPkgPM::Reset(
     List.erase(List.begin(),List.end());
  }
                                                                        /*}}}*/
 +// pkgDpkgPM::WriteApportReport - write out error report pkg failure  /*{{{*/
 +// ---------------------------------------------------------------------
 +/* */
 +void pkgDPkgPM::WriteApportReport(const char *pkgpath, const char *errormsg) 
 +{
 +   string pkgname, reportfile, srcpkgname, pkgver, arch;
 +   string::size_type pos;
 +   FILE *report;
 +
 +   if (_config->FindB("Dpkg::ApportFailureReport",true) == false)
 +      return;
 +
 +   // only report the first error if we are in StopOnError=false mode
 +   // to prevent bogus reports
 +   if((_config->FindB("Dpkg::StopOnError",true) == false) && pkgFailures > 1)
 +      return;
 +
 +   // get the pkgname and reportfile
 +   pkgname = flNotDir(pkgpath);
 +   pos = pkgname.rfind('_');
 +   if(pos != string::npos)
 +      pkgname = string(pkgname, 0, pos);
 +
 +   // find the package versin and source package name
 +   pkgCache::PkgIterator Pkg = Cache.FindPkg(pkgname);
 +   if (Pkg.end() == true)
 +      return;
 +   pkgCache::VerIterator Ver = Cache.GetCandidateVer(Pkg);
 +   pkgver = Ver.VerStr();
 +   if (Ver.end() == true)
 +      return;
 +   pkgRecords Recs(Cache);
 +   pkgRecords::Parser &Parse = Recs.Lookup(Ver.FileList());
 +   srcpkgname = Parse.SourcePkg();
 +   if(srcpkgname.empty())
 +      srcpkgname = pkgname;
 +
 +   // if the file exists already, we check:
 +   // - if it was reported already (touched by apport). 
 +   //   If not, we do nothing, otherwise
 +   //    we overwrite it. This is the same behaviour as apport
 +   // - if we have a report with the same pkgversion already
 +   //   then we skip it
 +   reportfile = flCombine("/var/crash",pkgname+".0.crash");
 +   if(FileExists(reportfile))
 +   {
 +      struct stat buf;
 +      char strbuf[255];
 +
 +      // check atime/mtime
 +      stat(reportfile.c_str(), &buf);
 +      if(buf.st_mtime > buf.st_atime)
 +       return;
 +
 +      // check if the existing report is the same version
 +      report = fopen(reportfile.c_str(),"r");
 +      while(fgets(strbuf, sizeof(strbuf), report) != NULL)
 +      {
 +       if(strstr(strbuf,"Package:") == strbuf)
 +       {
 +          char pkgname[255], version[255];
 +          if(sscanf(strbuf, "Package: %s %s", pkgname, version) == 2)
 +             if(strcmp(pkgver.c_str(), version) == 0)
 +             {
 +                fclose(report);
 +                return;
 +             }
 +       }
 +      }
 +      fclose(report);
 +   }
 +
 +   // now write the report
 +   arch = _config->Find("APT::Architecture");
 +   report = fopen(reportfile.c_str(),"w");
 +   if(report == NULL)
 +      return;
 +   if(_config->FindB("DPkgPM::InitialReportOnly",false) == true)
 +      chmod(reportfile.c_str(), 0);
 +   else
 +      chmod(reportfile.c_str(), 0600);
 +   fprintf(report, "ProblemType: Package\n");
 +   fprintf(report, "Architecture: %s\n", arch.c_str());
 +   time_t now = time(NULL);
 +   fprintf(report, "Date: %s" , ctime(&now));
 +   fprintf(report, "Package: %s %s\n", pkgname.c_str(), pkgver.c_str());
 +   fprintf(report, "SourcePackage: %s\n", srcpkgname.c_str());
 +   fprintf(report, "ErrorMessage:\n %s\n", errormsg);
 +   fclose(report);
 +}
 +                                                                      /*}}}*/
diff --combined apt-pkg/deb/dpkgpm.h
index a413f3a902a54f535f36b1864fe5a94a8ad97325,c552b20c9bf9c892496050bf352f6aac3888cf9f..f8e9e44a8e59f48185b4c83a83b14f6a11b6e607
  
  #include <apt-pkg/packagemanager.h>
  #include <vector>
+ #include <map>
  #include <stdio.h>
  
  using std::vector;
+ using std::map;
  
  class pkgDPkgPM : public pkgPackageManager
  {
+    private:
+    // the buffer we use for the dpkg status-fd reading
+    char dpkgbuf[1024];
+    int dpkgbuf_pos;
     protected:
 +   int pkgFailures;
  
-    // used for progress reporting
+    // progress reporting
     struct DpkgState 
     {
        const char *state;     // the dpkg state (e.g. "unpack")
        const char *str;       // the human readable translation of the state
     };
-    
+    // the dpkg states that the pkg will run through, the string is 
+    // the package, the vector contains the dpkg states that the package
+    // will go through
+    map<string,vector<struct DpkgState> > PackageOps;
+    // the dpkg states that are already done; the string is the package
+    // the int is the state that is already done (e.g. a package that is
+    // going to be install is already in state "half-installed")
+    map<string,int> PackageOpsDone;
+    // progress reporting
+    int PackagesDone;
+    int PackagesTotal;
+   
     struct Item
     {
        enum Ops {Install, Configure, Remove, Purge} Op;
     bool RunScriptsWithPkgs(const char *Cnf);
     bool SendV2Pkgs(FILE *F);
  
 +   // apport integration
 +   void WriteApportReport(const char *pkgpath, const char *errormsg);
 +
+    // input processing
+    void DoStdin(int master);
+    void DoTerminalPty(int master, FILE *out);
+    void DoDpkgStatusFd(int statusfd, int OutStatusFd);
+    void ProcessDpkgStatusLine(int OutStatusFd, char *line);
     // The Actuall installation implementation
     virtual bool Install(PkgIterator Pkg,string File);
     virtual bool Configure(PkgIterator Pkg);
diff --combined apt-pkg/init.cc
index a209d7477708e78bfb7ca7fdc064f754ea1d9ddb,0aff882b6f01433c0fe112a254a8b97616658823..d68ec71ef3a2ae343f25a8860dd4acfea007dac8
@@@ -24,8 -24,6 +24,6 @@@ const char *pkgVersion = VERSION
  const char *pkgLibVersion = Stringfy(APT_PKG_MAJOR) "."
                              Stringfy(APT_PKG_MINOR) "." 
                              Stringfy(APT_PKG_RELEASE);
- const char *pkgCPU = COMMON_CPU;
- const char *pkgOS = COMMON_OS;
      
  // pkgInitConfig - Initialize the configuration class                 /*{{{*/
  // ---------------------------------------------------------------------
  bool pkgInitConfig(Configuration &Cnf)
  {
     // General APT things
-    if (strcmp(COMMON_OS,"linux") == 0 ||
-        strcmp(COMMON_OS,"unknown") == 0)
-       Cnf.Set("APT::Architecture",COMMON_CPU);
-    else
-       Cnf.Set("APT::Architecture",COMMON_OS "-" COMMON_CPU);
+    Cnf.Set("APT::Architecture", COMMON_ARCH);
     Cnf.Set("APT::Build-Essential::", "build-essential");
     Cnf.Set("APT::Install-Recommends", false);
     Cnf.Set("APT::Install-Suggests", false);
@@@ -57,7 -51,6 +51,7 @@@
         
     Cnf.Set("Dir::State::lists","lists/");
     Cnf.Set("Dir::State::cdroms","cdroms.list");
 +   Cnf.Set("Dir::State::mirrors","mirrors/");
     
     // Cache
     Cnf.Set("Dir::Cache","var/cache/apt/");
     Cnf.Set("Dir::Etc::parts","apt.conf.d");
     Cnf.Set("Dir::Etc::preferences","preferences");
     Cnf.Set("Dir::Bin::methods","/usr/lib/apt/methods");
+    // State   
+    Cnf.Set("Dir::Log","var/log/apt");
+    Cnf.Set("Dir::Log::Name","term.log");
     
     bool Res = true;
     
        bindtextdomain(textdomain(0),Cnf.FindDir("Dir::Locale").c_str());
     }
  #endif
 -
     // Translation
     Cnf.Set("APT::Acquire::Translation", "environment");
     
diff --combined cmdline/apt-get.cc
index 08079af2bec2c43b357dc93c015e5225ed778c4c,c9ec481aaa59ac9a8508515856273af522a0d666..ead05313663cce12e78c0a288d13734fbedac0d6
@@@ -918,7 -918,7 +918,7 @@@ bool InstallPackages(CacheFile &Cache,b
        pkgAcquire::UriIterator I = Fetcher.UriBegin();
        for (; I != Fetcher.UriEnd(); I++)
         cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << 
-              I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl;
+              I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl;
        return true;
     }
  
@@@ -1359,7 -1359,7 +1359,7 @@@ bool DoUpdate(CommandLine &CmdL
        pkgAcquire::UriIterator I = Fetcher.UriBegin();
        for (; I != Fetcher.UriEnd(); I++)
         cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << 
-              I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl;
+              I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl;
        return true;
     }
  
@@@ -2116,36 -2116,6 +2116,36 @@@ bool DoSource(CommandLine &CmdL
        if (Last == 0)
         return _error->Error(_("Unable to find a source package for %s"),Src.c_str());
        
 +      string srec = Last->AsStr();
 +      string::size_type pos = srec.find("\nVcs-");
 +      while (pos != string::npos)
 +      {
 +       pos += strlen("\nVcs-");
 +       string vcs = srec.substr(pos,srec.find(":",pos)-pos);
 +       if(vcs == "Browser") 
 +       {
 +          pos = srec.find("\nVcs-", pos);
 +          continue;
 +       }
 +       pos += vcs.length()+2;
 +       string::size_type epos = srec.find("\n", pos);
 +       string uri = srec.substr(pos,epos-pos).c_str();
 +       ioprintf(c1out, _("WARNING: '%s' is maintained in "
 +                         "the '%s' version control system at:\n"
 +                         "%s\n"),
 +                Src.c_str(), vcs.c_str(), uri.c_str());
 +       if(vcs == "Bzr") 
 +          ioprintf(c1out,_("Please use:\n"
 +                           "bzr get %s\n"
 +                           "to modify the package.\n"),
 +                   uri.c_str());
 +       ioprintf(c1out, "Are you sure you want to continue [yN]? ");
 +       if(!YnPrompt(false))
 +          return _error->Error(_("Abort."));
 +       else 
 +          break;
 +      }
 +
        // Back track
        vector<pkgSrcRecords::File> Lst;
        if (Last->Files(Lst) == false)
        pkgAcquire::UriIterator I = Fetcher.UriBegin();
        for (; I != Fetcher.UriEnd(); I++)
         cout << '\'' << I->URI << "' " << flNotDir(I->Owner->DestFile) << ' ' << 
-              I->Owner->FileSize << ' ' << I->Owner->MD5Sum() << endl;
+              I->Owner->FileSize << ' ' << I->Owner->HashSum() << endl;
        return true;
     }
     
@@@ -2612,8 -2582,8 +2612,8 @@@ bool DoMoo(CommandLine &CmdL
  /* */
  bool ShowHelp(CommandLine &CmdL)
  {
-    ioprintf(cout,_("%s %s for %s %s compiled on %s %s\n"),PACKAGE,VERSION,
-           COMMON_OS,COMMON_CPU,__DATE__,__TIME__);
+    ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION,
+           COMMON_ARCH,__DATE__,__TIME__);
            
     if (_config->FindB("version") == true)
     {
diff --combined cmdline/makefile
index 2a5bdfbea2cd8a8c94bfe8105cdcbb565e2d8ef9,5820c2e0f6932a5f8f56f86b12f6d795252054ac..c795921c1f777943b1d9ea9d7eea636fe0f862eb
@@@ -14,7 -14,7 +14,7 @@@ include $(PROGRAM_H
  
  # The apt-get program
  PROGRAM=apt-get
- SLIBS = -lapt-pkg
+ SLIBS = -lapt-pkg -lutil
  LIB_MAKES = apt-pkg/makefile
  SOURCE = apt-get.cc acqprogress.cc
  include $(PROGRAM_H)
@@@ -58,9 -58,3 +58,9 @@@ SOURCE=apt-mar
  TO=$(BIN)
  TARGET=program
  include $(COPY_H)
 +
 +# The apt-key program
 +SOURCE=apt-report-mirror-failure
 +TO=$(BIN)
 +TARGET=program
 +include $(COPY_H)
diff --combined configure.in
index e86a5229b60b27f95305f294284aa76521f5badd,0294b9ae7b231a64096931bb6d4cf14bca614cca..364a23159881877babdabb95caf8719c73b2b46a
@@@ -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.7.4ubuntu1")
 -AC_DEFINE_UNQUOTED(VERSION,"0.7.5")
++AC_DEFINE_UNQUOTED(VERSION,"0.7.6ubuntu1")
  PACKAGE="apt"
  AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE")
  AC_SUBST(PACKAGE)
@@@ -80,20 -80,13 +80,13 @@@ dnl Converts the ARCH to be something s
  dnl This is often the dpkg architecture string.
  dnl First check against the full canonical canoncial-system-type in $target
  dnl and if that fails, just look for the cpu
- AC_MSG_CHECKING(system architecture)
+ AC_MSG_CHECKING(debian architecture)
  archset="`dpkg-architecture -qDEB_HOST_ARCH`"
  if test "x$archset" = "x"; then
     AC_MSG_ERROR([failed: use --host= or output from dpkg-architecture])
  fi
  AC_MSG_RESULT($archset)
- AC_DEFINE_UNQUOTED(COMMON_CPU,"$archset")
- dnl Get a common name for the host OS - this is primarily only for HURD and is
- dnl non fatal if it fails
- AC_MSG_CHECKING(system OS)
- osset="`dpkg-architecture -qDEB_HOST_ARCH_OS`"
- AC_MSG_RESULT($osset)
- AC_DEFINE_UNQUOTED(COMMON_OS,"$osset")
+ AC_DEFINE_UNQUOTED(COMMON_ARCH,"$archset")
  
  dnl We use C99 types if at all possible
  AC_CACHE_CHECK([for C99 integer types],c9x_ints,[
diff --combined debian/apt.dirs
index 025898e84ac4d6e8583da9b22f7e9b854b1ba31b,8ce9b175abcebab01436b9f80197dc3c2a169ee1..2db8dca9a2d37ab783d50f655809c2d3effabff3
@@@ -4,8 -4,9 +4,10 @@@ usr/lib/dpkg/methods/ap
  etc/apt
  etc/apt/apt.conf.d
  etc/apt/sources.list.d
+ etc/logrotate.d
  var/cache/apt/archives/partial
  var/lib/apt/lists/partial
 +var/lib/apt/mirrors/partial
  var/lib/apt/periodic
+ var/log/apt
  usr/share/bug/apt
diff --combined debian/changelog
index bee947ae3dbf38d9d5407f61e6315d46a8a1802d,c730f85b09677e79ba6d3c1347f47aae5d2ef726..02b637553d450d4fc2b6a3e3f014d3848332a73c
@@@ -1,20 -1,51 +1,59 @@@
- apt (0.7.4ubuntu1) gutsy; urgency=low
 -apt (0.7.7) UNRELEASED; urgency=low
++apt (0.7.6ubuntu1) gutsy; urgency=low
+   * apt-inst/contrib/extracttar.cc:
+     - fix fd leak for zero size files (thanks to Bill Broadley for
+       reporting this bug)
+   * apt-pkg/acquire-item.cc:
+     - remove zero size files on I-M-S hit
+   * methods/https.cc:
+     - only send LastModified if we actually have one
+     - send range request with if-range 
+     - delete failed downloads
+   * apt-pkg/deb/dpkgpm.{cc,h}:
+     - merged dpkg-log branch, this lets you specify a 
+       Dir::Log::Terminal file to log dpkg output to
+       (ABI break)
+   * merged apt--sha256 branch to fully support the new
+     sha256 checksums in the Packages and Release files
+     (ABI break)
+  -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 02 Aug 2007 11:55:54 +0200
+ apt (0.7.6) unstable; urgency=low
+   * Applied patch from Aurelien Jarno <aurel32@debian.org> to fix wrong
+     directory downloading on non-linux architectures (closes: #435597)
+  -- Otavio Salvador <otavio@debian.org>  Wed, 01 Aug 2007 19:49:51 -0300
+ apt (0.7.5) unstable; urgency=low
  
    [ Otavio Salvador ]
-   * Applied patch from Guillem Jover <guillem.jover@nokia.com> to use
+   * Applied patch from Guillem Jover <guillem@debian.org> to use
      dpkg-architecture to get the host architecture (closes: #407187)
+   * Applied patch from Guillem Jover <guillem@debian.org> to add
+     support to add lzma support (closes: #408201)
  
    [ Michael Vogt ]
    * apt-pkg/depcache.cc:
      - support a list of sections for:
        APT::Install-Recommends-Sections
        APT::Never-MarkAuto-Sections
+   * methods/makefile:
+     - install lzma symlink method (for full lzma support)
+   * debian/control:
+     - suggest "lzma"
+  -- Otavio Salvador <otavio@ossystems.com.br>  Wed, 25 Jul 2007 20:16:46 -0300
++apt (0.7.4ubuntu1) gutsy; urgency=low
++
 +  * debian/apt.conf.ubuntu, apt.conf.autoremove:
 +    - Change metapackages to {restricted,universe,multiverse}/metapackages 
 +      in Install-Recommends-Sections and Never-MarkAuto-Sections
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 26 Jul 2007 10:42:29 +0200
 +
  apt (0.7.4) unstable; urgency=low
  
    [ Michael Vogt ]
        - type conversion;
        - unused variable;
        - changed SetupProxy() method to void;
+   * Simplified HttpMethod::Fetch on http.cc removing Tail variable;
+   * Fix pipeline handling on http.cc (closes: #413324)
+   * Fix building to properly support binNMUs. Thanks to Daniel Schepler
+     <schepler@math.unipd.it> by the patch (closes: #359634)
+   * Fix example for Install-{Recommends,Suggests} options on
+     configure-index example file. Thanks to Peter Eisentraut
+     <peter_e@gmx.net> by the patch (closes: #432223)
  
    [ Christian Perrier ]
    * Basque translation update. Closes: ##423766
  
   -- Otavio Salvador <otavio@debian.org>  Tue, 24 Jul 2007 09:55:50 -0300
  
+ apt (0.7.3) unstable; urgency=low
+   * fixed compile errors with g++ 4.3 (thanks to 
+     Daniel Burrows, closes: #429378)
+   * fixes in the auto-mark code (thanks to Daniel
+     Burrows)
+   * fix FTFBFS by changing build-depends to
+     libcurl4-gnutls-dev (closes: #428363)
+   * cmdline/apt-get.cc:
+     - fix InstallTask code when a pkgRecord ends 
+       with a single '\n' (thanks to Soren Hansen for reporting)
+   * merged from Christian Perrier:
+         * vi.po: completed to 532t, again. Closes: #429899
+         * gl.po: completed to 532t. Closes: #429506
+         * vi.po: completed to 532t. Closes: #428672
+         * Update all PO and the POT. Gives 514t14f4u for formerly
+           complete translations
+         * fr.po: completed to 532t
+         * ku.po, uk.po, LINGUAS: reintegrate those translations
+           which disappeared from the BZR repositories
+  -- Michael Vogt <mvo@debian.org>  Sun, 01 Jul 2007 12:31:29 +0200
++  
 +apt (0.7.2ubuntu7) gutsy; urgency=low
 +
 +  * fix build-dependencies 
 +  * fixes in the auto-mark code (thanks to Daniel
 +    Burrows)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon,  9 Jul 2007 19:02:54 +0200
 +
 +apt (0.7.2ubuntu6) gutsy; urgency=low
 +
 +  [ Michael Vogt]
 +  * cmdline/apt-get.cc:
 +    - make the XS-Vcs-$foo warning more copy'n'paste
 +      friendly (thanks to Matt Zimmerman)
 +    - ignore the Vcs-Browser tag (Fixes LP: #121770)
 +  * debian/apt.conf.autoremove:
 +    - added "linux-ubuntu-modules" to APT::NeverAutoRemove
 +
 +  [ Sarah Hobbs ]
 +  * Change metapackages to *metapackages in Install-Recommends-Section
 +    and Never-MarkAuto-Section of debian/apt.conf.autoremove, so that
 +    the Recommends of metapackages in universe and multiverse will get
 +    installed.
 +  * Also make this change in doc/examples/configure-index.
 +  * Added a Build Dependancies of automake, docbook-xsl, xsltproc, xmlto,
 +    docbook to fix FTBFS.
 +  * Added in previous changelog entries, as those who uploaded did not
 +    actually commit to Bzr.
 +
 + -- Sarah Hobbs <hobbsee@ubuntu.com>  Mon, 09 Jul 2007 01:15:57 +1000
 +
 +apt (0.7.2ubuntu5) gutsy; urgency=low
 +
 +  * Rerun autoconf to fix the FTBFS.
 +
 + -- Michael Bienia <geser@ubuntu.com>  Fri, 06 Jul 2007 19:17:33 +0200
 +
 +apt (0.7.2ubuntu4) gutsy; urgency=low
 +
 +  * Rebuild for the libcurl4 -> libcurl3 transition mess.
 +
 + -- Steve Kowalik <stevenk@ubuntu.com>  Fri,  6 Jul 2007 12:44:05 +1000
 +
 +apt (0.7.2ubuntu3) gutsy; urgency=low
 +
 +  * cmdline/apt-get.cc:
 +    - fix InstallTask code when a pkgRecord ends 
 +      with a single '\n' (thanks to Soren Hansen for reporting)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 27 Jun 2007 13:33:38 +0200
 +
 +apt (0.7.2ubuntu2) gutsy; urgency=low
 +
 +  * fixed compile errors with g++ 4.3 (thanks to 
 +    Daniel Burrows, closes: #429378)
 +  * fix FTFBFS by changing build-depends to
 +    libcurl4-gnutls-dev (closes: #428363)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 19 Jun 2007 13:47:03 +0200
 +
 +apt (0.7.2ubuntu1) gutsy; urgency=low
 +
 +  * apt-pkg/deb/dpkgpm.cc:
 +    - apport integration added, this means that a apport
 +      report is written on dpkg failures
 +  * cmdline/apt-get.cc:
 +    - merged http://people.ubuntu.com/~mvo/bzr/apt/xs-vcs-bzr/
 +      this will warn when Vcs- headers are found on apt-get source
 +      (Fixes LP:#115959)
 +  * merged from debian/unstable, remaining changes:
 +    - maintainer field changed
 +    - merged the apt--mirror branch 
 +      http://people.ubuntu.com/~mvo/bzr/apt/apt--mirror/
 +    - apport reporting on package install/upgrade/remove failure
 +    - support for "Originial-Maintainer" field
 +    - merged apt--xs-vcs-bzr branch
 +      (http://people.ubuntu.com/~mvo/bzr/apt/xs-vcs-bzr/)
 +    - use ubuntu archive keyring by default
 +    - debian/apt.conf.autoremove
 +      + install recommands for section "metapackages"
 +      + do not mark direct dependencies of "metapackages" as autoremoved
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 14 Jun 2007 10:38:36 +0200
  
  apt (0.7.2-0.1) unstable; urgency=low
  
@@@ -195,16 -172,12 +264,16 @@@ apt (0.7.1) experimental; urgency=lo
    * 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
 +    - fix error in translation that causes trouble to lsb_release 
 +      (LP#79165)
    * apt-pkg/acquire-item.cc:
      - if decompression of a index fails, delete the index 
    * apt-pkg/acquire.{cc,h}:
      - deal better with duplicated sources.list entries (avoid
        double queuing of  URLs) - this fixes hangs in bzip/gzip
 +      (LP#102511)
 +  * Fix broken use of awk in apt-key that caused removal of the wrong keys
 +    from the keyring. Closes: #412572
    * merged from Christian Perrier:
      * mr.po: New Marathi translation  Closes: #416806
      * zh_CN.po: Updated by Eric Pareja  Closes: #416822
    * apt-pkg/policy.cc:
      - allow multiple packages (thanks to David Foerster)
  
-  -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 17 Apr 2007 15:53:37 +0200
+  -- Michael Vogt <mvo@debian.org>  Wed,  2 May 2007 13:43:44 +0200
  
 +apt (0.6.46.4ubuntu10) feisty; urgency=low
 +
 +  * apt-pkg/depcache.cc:
 +    - added "APT::Never-MarkAuto-Section" and consider dependencies 
 +      of packages in this section manual (LP#59893)
 +    - ensure proper permissions in the extended_state file (LP#67037)
 +  * debian/apt.conf.ubuntu:
 +    - added APT::Never-MarkAuto-Section "metapackages" (LP#59893)
 +  * cmdline/apt-get.cc:
 +    - "apt-get install foo" on a already installed package foo will
 +      clean the automatic installed flag (LP#72007)
 +    - do not show packages already marked for removal as auto-installed
 +      (LP#64493)
 +    - applied patch to (optionally) hide the auto-remove information
 +      (thanks to Frode M. Døving) (LP#69148)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 14 Mar 2007 13:32:32 +0100
 +
 +apt (0.6.46.4ubuntu9) feisty; urgency=low
 +
 +  * debian/control:
 +    - set XS-Vcs-Bzr header
 +    - Set Ubuntu maintainer address
 +  * apt-pkg/cdrom.cc:
 +    - only unmount if APT::CDROM::NoMount is false
 +    - only umount if it was mounted by the method before
 +  * cmdline/apt-get.cc:
 +    - fix version output in autoremove list (LP#68941)
 +  * apt-pkg/packagemanager.cc:
 +    - do not spin 100% cpu in FixMissing() (LP#84476)
 +  * apt-pkg/indexfile.cc:
 +    - fix problem overwriting APT::Acquire::Translation
 +  * doc/examples/configure-index:
 +    - document APT::Acquire::Translation
 +  
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 13 Mar 2007 15:24:39 +0100
 +
 +apt (0.6.46.4ubuntu8) feisty; urgency=low
 +
 +  * fix segfault in the pkgRecords destructor
 +  * Bump ABI version
 +  * debian/control:
 +    - make the libcurl3-gnutls-dev versionized (LP#86614)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 26 Feb 2007 14:26:33 +0100
 +
 +apt (0.6.46.4ubuntu7) feisty; urgency=low
 +
 +  * Merged the apt--mirror branch. This means that a new 'mirror' 
 +    method is available that will allow dynamic mirror updates.
 +    The sources.list entry looks something like this:
 +    "deb mirror://mirrors.lp.net/get_mirror feisty main restricted"
 +
 +    It also supports error reporting to a configurable url for mirror
 +    problems/failures.
 +  * Bump ABI version
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue,  6 Feb 2007 11:38:06 +0100
 +
 +apt (0.6.46.4ubuntu6) feisty; urgency=low
 +
 +  * methods/http.cc:
 +    - send apt version in User-Agent
 +  * apt-pkg/deb/debrecords.cc:
 +    - fix SHA1Hash() return value
 +  * apt-pkg/algorithms.cc:
 +    - fix resolver bug on removal triggered by weak-dependencies 
 +      with or-groups
 +    - fix segfault (lp: #76530)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 20 Dec 2006 11:04:36 +0100
 +
 +apt (0.6.46.4ubuntu5) feisty; urgency=low
 +
 +  * added apt-transport-https package to provide a optional
 +    https transport (apt-https spec)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 19 Dec 2006 16:23:43 +0100
 +
 +apt (0.6.46.4ubuntu4) feisty; urgency=low
 +  
 +  * apt-pkg/algorithms.cc:
 +    - only increase the score of installed applications if they 
 +      are not obsolete 
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 18 Dec 2006 19:39:05 +0100
 +
  apt (0.7.0) experimental; urgency=low
  
    * Package that contains tall the new features
  
   -- Michael Vogt <mvo@debian.org>  Fri, 12 Jan 2007 20:48:07 +0100
  
 +apt (0.6.46.4ubuntu3) feisty; urgency=low
 +
 +  * apt-pkg/algorithm.cc:
 +    - use clog for all debugging
 +  * apt-pkg/depcache.cc:
 +    - never mark Required package for autoremoval (lp: #75882)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 18 Dec 2006 11:56:05 +0100
 +
 +apt (0.6.46.4ubuntu2) feisty; urgency=low
 +
 +  * apt-pkg/algorithms.cc: add missing call to MarkKeep
 +    so that dist-upgrade isn't broken by unsatisfiable Breaks.
 +    (thanks to Ian Jackson)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu,  7 Dec 2006 23:07:24 +0100
 +
 +apt (0.6.46.4ubuntu1) feisty; urgency=low
 +
 +  * merged with debian
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu,  7 Dec 2006 12:13:14 +0100
 +
  apt (0.6.46.4-0.1) unstable; urgency=emergency
    
    * NMU
@@@ -401,26 -264,6 +470,26 @@@ apt (0.6.46.3-0.1) unstable; urgency=hi
    
   -- Andreas Barth <aba@not.so.argh.org>  Tue,  5 Dec 2006 10:34:56 +0000
  
 +apt (0.6.46.3ubuntu2) feisty; urgency=low
 +
 +  * apt-pkg/algorithms.cc: add missing call to MarkKeep
 +    so that dist-upgrade isn't broken by unsatisfiable Breaks.
 +
 + -- Ian Jackson <iwj@ubuntu.com>  Thu,  7 Dec 2006 15:46:52 +0000
 +
 +apt (0.6.46.3ubuntu1) feisty; urgency=low
 +
 +  * doc/apt-get.8.xml:
 +    - documented autoremove, thanks to Vladimír Lapá\e%GÄ\8d\e%@ek 
 +      (lp: #62919)
 +  * fix broken i18n in the dpkg progress reporting, thanks to 
 +    Frans Pop and Steinar Gunderson. (closes: #389261)
 +  * po/en_GB.po:
 +    - typo (lp: #61270)
 +  * add apt-secure.8 to "See also" section
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 23 Nov 2006 07:24:12 +0100
 +
  apt (0.6.46.3) unstable; urgency=low
  
    * apt-pkg/deb/dpkgpm.cc:
@@@ -495,46 -338,10 +564,46 @@@ apt (0.6.46) unstable; urgency=lo
    * debian/control:
      - switched to libdb4.4 for building (closes: #381019)
    * cmdline/apt-get.cc:
 -    - show only the recommends/suggests for the candidate-version, not for all
 -      versions of the package (closes: #257054)
 -    - properly handle recommends/suggests or-groups when printing the list of
 -      suggested/recommends packages (closes: #311619)
 +    - fix in the TryInstallTask() code to make sure that all package
 +      there are marked manual install (lp: #61684)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 28 Sep 2006 00:34:20 +0200
 +
 +apt (0.6.45ubuntu14) edgy; urgency=low
 +
 +  * cmdline/apt-get.cc:
 +    - fix in the TryInstallTask() code to make sure that all package
 +      there are marked manual install (lp: #61684)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 28 Sep 2006 00:34:20 +0200
 +
 +apt (0.6.45ubuntu13) edgy; urgency=low
 +
 +  * no-changes upload to make apt rebuild against latest g++ and
 +    fix synaptic FTBFS (see bug: #62461 for details)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 26 Sep 2006 22:33:10 +0200
 +
 +apt (0.6.45ubuntu12) edgy; urgency=low
 +
 +  * apt-pkg/depcache.cc:
 +    - fix in the sweep() code, set garbage flag for packages scheduled 
 +      for removal too
 +    - do not change the autoFlag in MarkKeep(), this can lead to suprising
 +      side effects
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 21 Sep 2006 00:58:24 +0200
 +
 +apt (0.6.45ubuntu11) edgy; urgency=low
 +
 +  * removed "installtask" and change it so that tasknames can be given
 +    with "apt-get install taskname^"
 +  * improve the writeStateFile() code
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 20 Sep 2006 14:14:24 +0200
 +
 +apt (0.6.45ubuntu10) edgy; urgency=low
 +
    * methods/http.cc:
      - check more careful for incorrect proxy settings (closes: #378868)
    * methods/gzip.cc:
        caseinsensitive (closes: #384182)
      - reverted MMap use in the tagfile because it does not work 
        across pipes (closes: #383487) 
 +  * added "installtask" command
 +  * added new ubuntu specific rewrite rule for "Original-Maintainer"
    
 - -- Michael Vogt <mvo@debian.org>  Thu, 21 Sep 2006 10:25:03 +0200
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 19 Sep 2006 15:07:51 +0200
 +
 +apt (0.6.45ubuntu9) edgy; urgency=low
 +
 +  * cmdline/apt-get.cc:
 +    - if --no-remove is given, do not run the AutoRemove code 
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 13 Sep 2006 11:54:20 +0200
 +
 +apt (0.6.45ubuntu8) edgy; urgency=low
 +
 +  * apt-pkg/algorithm.cc:
 +    - fix pkgProblemResolver.InstallProtect() to preserve the auto-install
 +      information (lp: #59457)
 +  * cmdline/apt-get.cc:
 +    - fix typo in autoremove information (lp: #59420)
 +  * install apt-mark to modify the automatically install information for
 +    packages
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Fri,  8 Sep 2006 20:07:22 +0200
 +
 +apt (0.6.45ubuntu7) edgy; urgency=low
 +
 +  * apt-pkg/depcache.cc:
 +    - fix a bug in the install-recommends-section code
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu,  7 Sep 2006 18:22:38 +0200
 +
 +apt (0.6.45ubuntu6) edgy; urgency=low
 +
 +  [Michael Vogt]
 +  * cmdline/apt-get.cc:
 +    - always show auto-removable packages and give a hint how to remove 
 +      them
 +  * debian/apt.conf.ubuntu:
 +    - exlucde linux-image and linux-restricted-modules from ever being 
 +      auto-removed
 +    - added "metapackages" as the section we want to install recommends
 +      by default
 +  * apt-pkg/depcache.cc:
 +    - added support to turn install-recommends selectively on/off by
 +      section
 +  [Ian Jackson]
 +  * Tests pass without code changes!  Except that we need this:
 +  * Bump cache file major version to force rebuild so that Breaks
 +    dependencies are included.
 +  * Don't depend on or suggest any particular dpkg or dpkg-dev versions;
 +    --auto-deconfigure is very very old and dpkg-dev's Breaks support
 +    is more or less orthogonal.
 +  * Initial draft of `Breaks' implementation.  Appears to compile,
 +    but as yet *completely untested*.
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu,  7 Sep 2006 11:50:52 +0200
 +
 +apt (0.6.45ubuntu5) edgy; urgency=low
 +
 +  * apt-pkg/pkgcachegen.cc:
 +    - increase the APT::Cache-Limit to deal with the increased demand due
 +      to the translated descriptions
 +  * apt-pkg/deb/dpkgpm.cc:
 +    - pass "--auto-deconfigure" to dpkg on install to support the
 +      new "breaks" in dpkg
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 15 Aug 2006 12:06:26 +0200
 +
 +apt (0.6.45ubuntu4) edgy; urgency=low
 +
 +  * cmdline/apt-get.cc:
 +    - fix in the new --fix-polciy code
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 14 Aug 2006 21:08:11 +0200
 +
 +apt (0.6.45ubuntu3) edgy; urgency=low
 +
 +  * ABI break
 +  * merged latest apt--install-recommends (closes: #559000)
 +  * added "--fix-policy" option to can be used as "--fix-broken" and
 +    will install missing weak depends (recommends, and/or suggests 
 +    depending on the settings)
 +  * merged the apt--ddtp branch
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 11 Aug 2006 12:53:23 +0200
 +
 +apt (0.6.45ubuntu2) edgy; urgency=low
 +
 +  * debian/control:
 +    - switched to libdb4.4 for building (closes: #381019)
 +  * cmdline/apt-get.cc:
 +    - show only the recommends/suggests for the candidate-version, not for all
 +      versions of the package (closes: #257054)
 +    - properly handle recommends/suggests or-groups when printing the list of
 +      suggested/recommends packages (closes: #311619)
 +  * merged "apt--install-recommends" branch:
 +    - added "{no-}install-recommends" commandline option
 +    - added APT::Install-{Recommends,Suggests} option
 +    - currently Install-Recommends defaults to "False" 
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Wed,  9 Aug 2006 23:38:46 +0200
 +
 +apt (0.6.45ubuntu1) edgy; urgency=low
 +
 +  * merged with debian/unstable
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue,  1 Aug 2006 15:43:22 +0200
  
  apt (0.6.45) unstable; urgency=low
  
      * 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 <michael.vogt@ubuntu.com>  Tue, 25 Jul 2006 11:55:22 +0200
 + -- Michael Vogt <mvo@debian.org>  Thu, 27 Jul 2006 00:52:05 +0200
  
 -apt (0.6.44.2exp1) experimental; urgency=low
 +apt (0.6.44.2ubuntu4) edgy; 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
 +  * Make apt-get dselect-upgrade happy again
  
 - -- Michael Vogt <mvo@debian.org>  Mon,  3 Jul 2006 21:50:31 +0200
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 21 Jul 2006 11:03:02 +0200
  
 -apt (0.6.44.2) unstable; urgency=low
 +apt (0.6.44.2ubuntu3) edgy; 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
 +  * Close extended_states file after writing it.
 +
 + -- Colin Watson <cjwatson@ubuntu.com>  Tue, 18 Jul 2006 00:12:13 +0100
 +
 +apt (0.6.44.2ubuntu2) edgy; urgency=low
 +
 +  * create a empty extended_states file if none exists already
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue,  4 Jul 2006 09:23:03 +0200
 +
 +apt (0.6.44.2ubuntu1) edgy; urgency=low
 +
 +  * merged with debian/unstable
 +  * merged the "auto-mark" branch to support aptitude like
 +    marking of automatically installed dependencies and added
 +    "apt-get remove --auto-remove" to remove unused auto-installed
 +    packages again
 +  * changed library version from 3.11 to 3.50 to make it clearly 
 +    different from the debian version (we are ABI incompatible because
 +    of the auto-mark patch)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon,  3 Jul 2006 18:30:46 +0200
  
 - -- Michael Vogt <mvo@debian.org>  Wed, 14 Jun 2006 12:00:57 +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
  
@@@ -815,26 -502,6 +884,26 @@@ apt (0.6.44) unstable; urgency=lo
    
   -- Michael Vogt <mvo@debian.org>  Mon,  8 May 2006 22:28:53 +0200
  
 +apt (0.6.43.3ubuntu3) dapper; urgency=low
 +
 +  * methods/http.cc:
 +    - fix the user-agent string
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 26 May 2006 18:09:32 +0200
 +
 +apt (0.6.43.3ubuntu2) dapper; urgency=low
 +
 +  * apt-pkg/deb/dpkgpm.cc: wording fixes (thanks to Matt Zimmerman)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 18 Apr 2006 13:24:40 +0200
 +
 +apt (0.6.43.3ubuntu1) dapper; urgency=low
 +
 +  * apt-pkg/acquire.cc: don't show ETA if it is 0 or absurdely large in 
 +    the status-fd (ubuntu #28954)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 28 Mar 2006 20:34:46 +0200
 +
  apt (0.6.43.3) unstable; urgency=low
  
    * Merge bubulle@debian.org--2005/apt--main--0 up to patch-186:
      * pl.po: Completed to 512t. Closes: #349514
      * sk.po: Completed to 512t. Closes: #349474
      * gl.po: Completed to 512 strings Closes: #349407
 +    * vi.po: Completed to 512 strings
      * sv.po: Completed to 512 strings Closes: #349210
      * ru.po: Completed to 512 strings Closes: #349154
      * da.po: Completed to 512 strings Closes: #349084
      * fr.po: Completed to 512 strings
 +    * LINGUAS: Add Welsh
 +    * *.po: Updated from sources (512 strings)
      * vi.po: Completed to 511 strings  Closes: #348968
 -    * zh_CN.po: Completed to 512t. Closes: #353936
 -    * it.po: Completed to 512t. Closes: #352803
 -    * pt_BR.po: Completed to 512t. Closes: #352419
 +  * apt-pkg/deb/deblistparser.cc:
 +    - don't explode on a DepCompareOp in a Provides line, but warn about
 +      it and ignore it otherwise (thanks to James Troup for reporting it)
 +  * cmdline/apt-get.cc:
 +    - don't lock the lists directory in DoInstall, breaks --print-uri 
 +      (thanks to James Troup for reporting it)
 +  * debian/apt.dirs: create /etc/apt/sources.list.d 
 +  * make apt-cache madison work without deb-src entries (#352583)
 +  * cmdline/apt-get.cc: only run the list-cleaner if a update was 
 +    successfull
 +  * apt-get update errors are only warnings nowdays
 +  * be more careful with the signature file on network failures
 +
 + --  Michael Vogt <mvo@debian.org>  Wed, 22 Feb 2006 10:13:04 +0100
 +
 +apt (0.6.43.2ubuntu1) dapper; urgency=low
 +
 +  * Merge bubulle@debian.org--2005/apt--main--0 up to patch-182:
 +  * ca.po: Completed to 512t. Closes: #351592
 +    * eu.po: Completed to 512t. Closes: #350483
 +    * ja.po: Completed to 512t. Closes: #349806
 +    * pl.po: Completed to 512t. Closes: #349514
 +    * sk.po: Completed to 512t. Closes: #349474
 +    * gl.po: Completed to 512 strings Closes: #349407
 +    * vi.po: Completed to 512 strings
 +    * sv.po: Completed to 512 strings Closes: #349210
 +    * ru.po: Completed to 512 strings Closes: #349154
 +    * da.po: Completed to 512 strings Closes: #349084
 +    * fr.po: Completed to 512 strings
      * LINGUAS: Add Welsh
      * *.po: Updated from sources (512 strings)
 +    * vi.po: Completed to 511 strings  Closes: #348968
    * apt-pkg/deb/deblistparser.cc:
      - don't explode on a DepCompareOp in a Provides line, but warn about
        it and ignore it otherwise (thanks to James Troup for reporting it)
    * make apt-cache madison work without deb-src entries (#352583)
    * cmdline/apt-get.cc: only run the list-cleaner if a update was 
      successfull
 +  * apt-get update errors are only warnings nowdays
 +  * be more careful with the signature file on network failures
  
 - -- Michael Vogt <mvo@debian.org>  Wed, 22 Feb 2006 10:13:04 +0100
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 20 Feb 2006 22:27:48 +0100
  
  apt (0.6.43.2) unstable; urgency=low
  
  
   -- Michael Vogt <mvo@debian.org>  Thu, 19 Jan 2006 00:06:33 +0100
  
 -apt (0.6.43.1) unstable; urgency=low
 +apt (0.6.43.1ubuntu1) dapper; urgency=low
  
 +  * Merge bubulle@debian.org--2005/apt--main--0 up to patch-159:
 +    - en_GB.po, de.po: fix spaces errors in "Ign " translations
 +      Closes: #347258
 +    - makefile: make update-po a pre-requisite of clean target so
 +              that POT and PO files are always up-to-date
 +    - sv.po: Completed to 511t. Closes: #346450
 +    - sk.po: Completed to 511t. Closes: #346369
 +    - fr.po: Completed to 511t
 +    - *.po: Updated from sources (511 strings)
 +  * add patch to fix http download corruption problem (thanks to
 +    Petr Vandrovec, closes: #280844, #290694)
 +  * added APT::Periodic::Unattended-Upgrade (requires the package
 +    "unattended-upgrade")
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 10 Jan 2006 17:09:31 +0100
 +
 +apt (0.6.43.1) unstable; urgency=low
 +  
    * Merge bubulle@debian.org--2005/apt--main--0 up to patch-148:
      * fr.po: Completed to 510 strings
      * it.po: Completed to 510t
  
   -- Michael Vogt <mvo@debian.org>  Fri,  6 Jan 2006 01:17:08 +0100
  
 +apt (0.6.43ubuntu2) dapper; urgency=low
 +
 +  * merged some missing bits that wheren't merged by baz in the previous
 +    upload (*grumble*)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu,  8 Dec 2005 18:35:58 +0100
 +
 +apt (0.6.43ubuntu1) dapper; urgency=low
 +
 +  * merged with debian
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Fri, 25 Nov 2005 11:36:29 +0100
 +
  apt (0.6.43) unstable; urgency=medium
  
    * Merge bubulle@debian.org--2005/apt--main--0 up to patch-132:  
    
   -- Michael Vogt <mvo@debian.org>  Tue, 29 Nov 2005 00:17:07 +0100
  
 +apt (0.6.42.3ubuntu2) dapper; urgency=low
 +
 +  * Merge bubulle@debian.org--2005/apt--main--0 up to patch-131:  
 +    * zh_CN.po: Completed to 507 strings(Closes: #338267)
 +    * gl.po: Completed to 510 strings (Closes: #338356)
 +  * added support for "/etc/apt/sources.list.d" directory 
 +    (closes: #66325)
 +  
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 14 Nov 2005 15:30:12 +0100
 +
 +apt (0.6.42.3ubuntu1) dapper; urgency=low
 +
 +  * synced with debian
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Thu, 10 Nov 2005 05:05:56 +0100
 +
  apt (0.6.42.3) unstable; urgency=low
  
    * Merge bubulle@debian.org--2005/apt--main--0 up to patch-129:
@@@ -1059,13 -647,13 +1128,13 @@@ apt (0.6.42) unstable; urgency=lo
      - unmount the cdrom when apt failed to locate any package files
    * allow cdrom failures and fallback to other sources in that case
      (closes: #44135)
 -  * better error text when dpkg-source fails 
 +  * better error text when dpkg-source fails
    * Merge bubulle@debian.org--2005/apt--main--0 up to patch-115:
      - patch-99: Added Galician translation
      - patch-100: Completed Danish translation (Closes: #325686)
      - patch-104: French translation completed
      - patch-109: Italian translation completed
 -    - patch-112: Swedish translation update 
 +    - patch-112: Swedish translation update
      - patch-115: Basque translation completed (Closes: #333299)
    * applied french man-page update (thanks to Philippe Batailler)
      (closes: #316638, #327456)
    * apt-pkg/contrib/md5.cc:
      - fix a alignment problem on sparc64 that gives random bus errors
        (thanks to Fabbione for providing a test-case)
 -  * init the default ScreenWidth to 79 columns by default 
 +  * init the default ScreenWidth to 79 columns by default
      (Closes: #324921)
 -  * cmdline/apt-cdrom.cc: 
 +  * cmdline/apt-cdrom.cc:
      - fix some missing gettext() calls (closes: #334539)
    * doc/apt-cache.8.xml: fix typo (closes: #334714)
  
@@@ -1092,8 -680,8 +1161,8 @@@ apt (0.6.41) unstable; urgency=lo
    * improved the support for "error" and "conffile" reporting from
      dpkg, added the format to README.progress-reporting
    * added README.progress-reporting to the apt-doc package
 -  * improved the network timeout handling, if a index file from a 
 -    sources.list times out or EAI_AGAIN is returned from getaddrinfo, 
 +  * improved the network timeout handling, if a index file from a
 +    sources.list times out or EAI_AGAIN is returned from getaddrinfo,
      don't try to get the other files from that entry
    * Support architecture-specific extra overrides
      (closes: #225947). Thanks to  Anthony Towns for idea and
    * Javier Fernandez-Sanguino Pen~a:
      - Added a first version of an apt-secure.8 manpage, and modified
        apt-key and apt.end accordingly. Also added the 'update'
 -      argument to apt-key which was previously not documented 
 +      argument to apt-key which was previously not documented
        (Closes: #322120)
    * Andreas Pakulat:
 -    - added example apt-ftparchive.conf file to doc/examples 
 +    - added example apt-ftparchive.conf file to doc/examples
        (closes: #322483)
    * Fix a incorrect example in the man-page (closes: #282918)
    * Fix a bug for very long lines in the apt-cdrom code (closes: #280356)
    * Change pkgPolicy::Pin from private to protected to let subclasses
      access it too (closes: #321799)
    * add default constructor for PrvIterator (closes: #322267)
 -  * Reread status configuration on debSystem::Initialize() 
 +  * Reread status configuration on debSystem::Initialize()
      (needed for apt-proxy, thanks to Otavio for this patch)
 -  
 +
   -- Michael Vogt <mvo@debian.org>  Mon,  5 Sep 2005 22:59:03 +0200
 +  
 +apt (0.6.40.1ubuntu8) breezy; urgency=low
 +
 +  * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-62:
 +    - fix for a bad memory/file leak in the mmap code (ubuntu #15603)
 +  * po/de.po, po/fr.po: 
 +    - updated the translations
 +  * po/makefile:
 +    - create a single pot file in each domain dir to make rosetta happy
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Wed, 28 Sep 2005 10:16:06 +0200
 +
 +apt (0.6.40.1ubuntu7) breezy; urgency=low
 +
 +  * updated the pot/po files , no code changes
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 27 Sep 2005 18:38:16 +0200
 +
 +apt (0.6.40.1ubuntu6) breezy; urgency=low
 +
 +  * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-56:
 +    - make it possible for apt to handle a failed MediaChange event and
 +      fall back to other sources (ubuntu #13713)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 13 Sep 2005 22:09:50 +0200
 +
 +apt (0.6.40.1ubuntu5) breezy; urgency=low
 +
 +  * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-{50,51}.
 +    This adds media-change reporting to the apt status-fd (ubuntu #15213)
 +  * Cherry picked michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-55:
 +    apt-pkg/cdrom.cc:
 +    - unmount the cdrom when apt failed to locate any package files
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Mon, 12 Sep 2005 15:44:26 +0200
 +
 +apt (0.6.40.1ubuntu4) breezy; urgency=low
 +
 +  * debian/apt.cron.daily:
 +    - fix a embarrassing typo
 +  
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Wed,  7 Sep 2005 10:10:37 +0200
 +
 +apt (0.6.40.1ubuntu3) breezy; urgency=low
 +
 +  * debian/apt.cron.daily:
 +    - use the ctime as well when figuring what packages need to
 +      be removed. This fixes the problem that packages copied with    
 +      "cp -a" (e.g. from the installer) have old mtimes (ubuntu #14504)
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue,  6 Sep 2005 18:30:46 +0200
 +
 +apt (0.6.40.1ubuntu2) breezy; urgency=low
 +
 +  * improved the support for "error" and "conffile" reporting from
 +    dpkg, added the format to README.progress-reporting
 +  * added README.progress-reporting to the apt-doc package
 +  * Do md5sum checking for file and cdrom method (closes: #319142)
 +  * Change pkgPolicy::Pin from private to protected to let subclasses
 +    access it too (closes: #321799)
 +  * methods/connect.cc:
 +    - send failure reason for EAI_AGAIN (TmpResolveFailure) to acuire-item
 +  * apt-pkg/acquire-item.cc:
 +    - fail early if a FailReason is TmpResolveFailure (avoids hangs during
 +      the install when no network is available)
 +  * merged michael.vogt@ubuntu.com--2005/apt--trust-cdrom--0
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 23 Aug 2005 19:44:55 +0200
 +
 +apt (0.6.40.1ubuntu1) breezy; urgency=low
 +
 +  * Synchronize with Debian
 +
 + -- Michael Vogt <michael.vogt@ubuntu.com>  Fri,  5 Aug 2005 14:20:56 +0200
  
  apt (0.6.40.1) unstable; urgency=low
  
  
   -- Michael Vogt <mvo@debian.org>  Fri,  5 Aug 2005 13:24:58 +0200
  
 +apt (0.6.40ubuntu1) breezy; urgency=low
 +
 +  * Synchronize with Debian
 +
 + -- Matt Zimmerman <mdz@ubuntu.com>  Thu,  4 Aug 2005 15:53:22 -0700
 +
  apt (0.6.40) unstable; urgency=low
  
    * Patch from Jordi Mallach to mark some additional strings for translation
  
   -- Matt Zimmerman <mdz@debian.org>  Thu, 28 Jul 2005 11:57:32 -0700
  
 +apt (0.6.39ubuntu4) breezy; urgency=low
 +
 +  * Fix keyring paths in apt-key, apt.postinst (I swear I remember doing this
 +    before...)
 +
 + -- Matt Zimmerman <mdz@ubuntu.com>  Wed, 29 Jun 2005 08:39:17 -0700
 +
 +apt (0.6.39ubuntu3) breezy; urgency=low
 +
 +  * Fix keyring locations for Ubuntu in apt-key too.
 +
 + -- Colin Watson <cjwatson@ubuntu.com>  Wed, 29 Jun 2005 14:45:36 +0100
 +
 +apt (0.6.39ubuntu2) breezy; urgency=low
 +
 +  * Install ubuntu-archive.gpg rather than debian-archive.gpg as
 +    /etc/apt/trusted.gpg.
 +
 + -- Colin Watson <cjwatson@ubuntu.com>  Wed, 29 Jun 2005 11:53:34 +0100
 +
 +apt (0.6.39ubuntu1) breezy; urgency=low
 +
 +  * Michael Vogt
 +    - Change debian/bugscript to use #!/bin/bash (Closes: #313402)
 +    - Fix a incorrect example in the man-page (closes: #282918)
 +    - Support architecture-specific extra overrides
 +      (closes: #225947). Thanks to  Anthony Towns for idea and
 +      the patch, thanks to Colin Watson for testing it.
 +    - better report network timeouts from the methods to the acuire code,
 +      only timeout once per sources.list line
 +
 + -- Matt Zimmerman <mdz@ubuntu.com>  Tue, 28 Jun 2005 11:52:24 -0700
 +
  apt (0.6.39) unstable; urgency=low
  
    * Welsh translation update: daf@muse.19inch.net--2005/apt--main--0--patch-6
    * Update priority of apt-utils to important, to match the override file
    * Install only one keyring on each branch (Closes: #316119)
  
 - -- Matt Zimmerman <mdz@debian.org>  Tue, 28 Jun 2005 11:51:09 -0700
 + -- Matt Zimmerman <mdz@debian.org>  Tue, 28 Jun 2005 11:35:21 -0700
 +
 +apt (0.6.38ubuntu1) breezy; urgency=low
 +
 +  * First release from Ubuntu branch
 +  * Merge with --main--0, switch back to Ubuntu keyring
 +
 + -- Matt Zimmerman <mdz@ubuntu.com>  Sat, 25 Jun 2005 16:52:41 -0700
  
  apt (0.6.38) unstable; urgency=low
  
diff --combined debian/control
index 1c6d2f490b7ceb292e1766f4d3d65e2f755a3e4e,742e8ca5c8b1e5cd7e50c810a04b4f20d22a34ab..ac14c5e0b5ecb3f74c7f849e442ac3047a1ecd7f
@@@ -1,22 -1,20 +1,22 @@@
  Source: apt
  Section: admin
  Priority: important
 -Maintainer: APT Development Team <deity@lists.debian.org>
 +Maintainer: Ubuntu Core Developers <ubuntu-devel-discuss@lists.ubuntu.com>
 +XSBC-Original-Maintainer: APT Development Team <deity@lists.debian.org>
  Uploaders: Jason Gunthorpe <jgg@debian.org>, Adam Heath <doogie@debian.org>, Matt Zimmerman <mdz@debian.org>, Michael Vogt <mvo@debian.org>, Otavio Salvador <otavio@debian.org>
  Standards-Version: 3.7.2.2
  Build-Depends: debhelper (>= 5.0), libdb4.4-dev, gettext (>= 0.12), libcurl4-gnutls-dev | libcurl3-gnutls-dev (>= 7.15.5)
  Build-Depends-Indep: debiandoc-sgml, docbook-utils (>= 0.6.12-1)
 -XS-Vcs-Bzr: http://bzr.debian.org/apt/debian-sid/
 +XS-Vcs-Bzr: http://code.launchpad.net/~ubuntu-core-dev/apt/ubuntu
  
  Package: apt
  Architecture: any
 -Depends: ${shlibs:Depends}, debian-archive-keyring
 +Depends: ${shlibs:Depends}
  Priority: important
  Replaces: libapt-pkg-doc (<< 0.3.7), libapt-pkg-dev (<< 0.3.7)
  Provides: ${libapt-pkg:provides}
 -Suggests: aptitude | synaptic | gnome-apt | wajig, dpkg-dev, apt-doc, bzip2, lzma
 +Recommends: ubuntu-keyring
- Suggests: aptitude | synaptic | gnome-apt | wajig, dpkg-dev, apt-doc, bzip2, gnupg
++Suggests: aptitude | synaptic | gnome-apt | wajig, dpkg-dev, apt-doc, bzip2, gnupg, lzma
  Section: admin
  Description: Advanced front-end for dpkg
   This is Debian's next generation front-end for the dpkg package manager.
diff --combined debian/rules
index a330d6dc173c5478ad62e8e14a0fcee422b0f017,b3222f3b4c1000694b7d5515cff15e13ebfca8ea..a46169a7b996105bb94aaa1b56bb340e7fe7b458
@@@ -209,10 -209,10 +209,11 @@@ apt: build debian/shlibs.loca
        cp -r $(BLD)/locale debian/$@/usr/share/
  
        cp debian/bugscript debian/$@/usr/share/bug/apt/script
+       cp debian/apt.logrotate debian/$@/etc/logrotate.d/apt
  
 -      cp share/debian-archive.gpg debian/$@/usr/share/$@
 +      cp share/ubuntu-archive.gpg debian/$@/usr/share/$@
        cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove
 +      cp debian/apt.conf.ubuntu debian/$@/etc/apt/apt.conf.d/01ubuntu
  #     head -n 500 ChangeLog > debian/ChangeLog
  
        # make rosetta happy and remove pot files in po/ (but leave stuff
        rm -f build/po/*.pot
        rm -f po/*.pot
  
 +      # move the mirror failure script in place
 +      mv debian/$@/usr/bin/apt-report-mirror-failure \
 +         debian/$@/usr/lib/apt/apt-report-mirror-failure \
 +
        dh_installexamples -p$@ $(BLD)/docs/examples/*
        dh_installman -p$@ 
        dh_installcron -p$@
index 711a777109b96109c07312a363250699c240f5f6,ba3ed3892d5a42ed293f5eafccf81db6ab910dd0..a4a955b6a43fa55d2c4ef12b665f46aec0b2ecd0
@@@ -100,9 -100,6 +100,9 @@@ AP
    Install-Recommends "false";
    Install-Suggests "false";
  
 +  // install recommends automatically for packages in this section
 +  Install-Recommends-Section { "metapackages"; "universe/metapackages"; };
 +  
    // consider dependencies of packages in this section manual
    Never-MarkAuto-Sections {"metapackages"; "universe/metapackages"; };
  
@@@ -189,20 -186,6 +189,20 @@@ Acquir
    {
     Options {"--ignore-time-conflict";}        // not very usefull on a normal system
    };
 +
 +  mirror
 +  {
 +   RefreshInterval "360"; // refresh interval in minutes
 +   MaxAge "90";           // max age for a mirror file in days before 
 +                          // it gets deleted
 +   // mirror failure reporting script
 +   ProblemReporting "/usr/lib/apt/apt-report-mirror-failure"; 
 +   // mirror failure reporting url
 +   ReportFailures "http://example.com/mirror-failure"; 
 +  };
 +
 +  // translations can be set here to "none", "environment" or "$locale"
 +  Translation "none";
  };
  
  // Directory layout
@@@ -216,7 -199,6 +216,7 @@@ Dir "/
       userstatus "status.user";
       status "/var/lib/dpkg/status";
       cdroms "cdroms.list";
 +     mirrors "mirrors/";
    };
    
    // Location of the cache dir
       apt-get "/usr/bin/apt-get";
       apt-cache "/usr/bin/apt-cache";
    };
+   // Location of the logfile
+   Log "var/log/apt" {
+       Terminal "term.log";
+   };
  };
  
  // Things that effect the APT dselect method
@@@ -307,9 -294,9 +312,9 @@@ Debu
    Acquire::Http "false";   // Show http command traffic
    Acquire::Https "false";   // Show https debug
    Acquire::gpgv "false";   // Show the gpgv traffic
 +  Acquire::Mirror "false"; // Show debugging of the mirror method
    aptcdrom "false";        // Show found package files
    IdentCdrom "false";
 -  
  }
  
  /* Whatever you do, do not use this configuration file!! Take out ONLY
diff --combined methods/makefile
index 83bd8c7c936d3feff6b34fae35dade15ace942a0,e47539dbb3994aa14f25dc4cf240169a47fe6d62..b7c5957546ba4f1d8b41be33b0f03bdeaacafe88
@@@ -7,7 -7,7 +7,7 @@@ include ../buildlib/defaults.ma
  BIN := $(BIN)/methods
  
  # FIXME..
- LIB_APT_PKG_MAJOR = 4.4
+ LIB_APT_PKG_MAJOR = 4.5
  APT_DOMAIN := libapt-pkg$(LIB_APT_PKG_MAJOR)
  
  # The file method
@@@ -49,14 -49,7 +49,14 @@@ include $(PROGRAM_H
  PROGRAM=http
  SLIBS = -lapt-pkg $(SOCKETLIBS)
  LIB_MAKES = apt-pkg/makefile
 -SOURCE = http.cc rfc2553emu.cc connect.cc
 +SOURCE = http.cc http_main.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 https method
@@@ -87,16 -80,9 +87,16 @@@ LIB_MAKES = apt-pkg/makefil
  SOURCE = rsh.cc
  include $(PROGRAM_H)
  
 -# SSH and bzip2 method symlink
 +# The mirror method
 +PROGRAM=mirror
 +SLIBS = -lapt-pkg $(SOCKETLIBS)
 +LIB_MAKES = apt-pkg/makefile
 +SOURCE = mirror.cc http.cc rfc2553emu.cc connect.cc
 +include $(PROGRAM_H)
 +
- # SSH and vzip2 method symlink
- binary: $(BIN)/ssh $(BIN)/bzip2
- veryclean: clean-$(BIN)/ssh clean-$(BIN)/bzip2
++# SSH and bzip2,lzma method symlinks
+ binary: $(BIN)/ssh $(BIN)/bzip2 $(BIN)/lzma
+ veryclean: clean-$(BIN)/ssh clean-$(BIN)/bzip2 clean-$(BIN)/lzma
  $(BIN)/ssh:
        echo "Installing ssh method link"
        ln -fs rsh $(BIN)/ssh
@@@ -106,5 -92,10 +106,10 @@@ clean-$(BIN)/ssh
  $(BIN)/bzip2:
        echo "Installing bzip2 method link"
        ln -fs gzip $(BIN)/bzip2
+ $(BIN)/lzma:
+       echo "Installing lzma method link"
+       ln -fs gzip $(BIN)/lzma
  clean-$(BIN)/bzip2:
        -rm $(BIN)/bzip2
+ clean-$(BIN)/lzma:
+       -rm $(BIN)/lzma