]> git.saurik.com Git - apt.git/commitdiff
* cherry-picked patches from apt--fixes and apt--mvo
authorMichael Vogt <michael.vogt@ubuntu.com>
Tue, 23 Aug 2005 08:20:18 +0000 (08:20 +0000)
committerMichael Vogt <michael.vogt@ubuntu.com>
Tue, 23 Aug 2005 08:20:18 +0000 (08:20 +0000)
Patches applied:

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-14
   * added Hashsum support for file and cdrom

 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-18
   * Change pkgPolicy::Pin from private to protected

 * michael.vogt@ubuntu.com--2005/apt--mvo--0--patch-47
   * improve the timeout handling (again)

1  2 
apt-pkg/acquire-item.cc
apt-pkg/policy.h
cmdline/apt-get.cc
debian/changelog
methods/cdrom.cc
methods/file.cc

diff --combined apt-pkg/acquire-item.cc
index 14acad85a39e28987d69e572cbf230a3973d9acf,c39d3fddec1601ecde5dcd0fcb017fca81ccc52c..ef107444f6a8bd35ed9004b6b2f2f324e0aca04b
@@@ -401,7 -401,8 +401,8 @@@ void pkgAcqMetaSig::Failed(string Messa
     unlink(Final.c_str());
  
     // if we get a timeout if fail
-    if(LookupTag(Message,"FailReason") == "Timeout") {
+    if(LookupTag(Message,"FailReason") == "Timeout" || 
+       LookupTag(Message,"FailReason") == "TmpResolveFailure") {
        Item::Failed(Message,Cnf);
        return;
     }
@@@ -904,7 -905,7 +905,8 @@@ void pkgAcqArchive::Done(string Message
        {
         Status = StatError;
         ErrorText = _("MD5Sum mismatch");
--       Rename(DestFile,DestFile + ".FAILED");
++       if(FileExists(DestFile))
++          Rename(DestFile,DestFile + ".FAILED");
         return;
        }
     }
diff --combined apt-pkg/policy.h
index 15f2047985dcb4caa6d3e5ce04661db7e39de4cc,15f2047985dcb4caa6d3e5ce04661db7e39de4cc..40ebd3f704f9ae4aa778ae44d438d488b78e9ad5
@@@ -45,6 -45,6 +45,8 @@@ using std::vector
  
  class pkgPolicy : public pkgDepCache::Policy
  {
++   protected:
++
     struct Pin
     {
        pkgVersionMatch::MatchType Type;
@@@ -58,8 -58,8 +60,6 @@@
        string Pkg;
     };
     
--   protected:
--   
     Pin *Pins;
     signed short *PFPriority;
     vector<Pin> Defaults;
diff --combined cmdline/apt-get.cc
index e673e0f5bdf6de5defe7f16511793f0aa22332df,e673e0f5bdf6de5defe7f16511793f0aa22332df..7e079b91c7da866a38d3cfd00474de65432d56b5
@@@ -1659,7 -1659,7 +1659,7 @@@ bool DoInstall(CommandLine &CmdL
     // See if we need to prompt
     if (Cache->InstCount() == ExpectedInst && Cache->DelCount() == 0)
        return InstallPackages(Cache,false,false);
--   
++
     return InstallPackages(Cache,false);   
  }
                                                                        /*}}}*/
diff --combined debian/changelog
index 35cba60079a05dadd35fa9c530ac0696adab1bae,39ab07b32ef69b59c2d02e7df63c1e9e99637181..61f5be622a17b527a11be4baf815241e905d96df
@@@ -3,14 -3,27 +3,22 @@@ apt (0.6.40.2) 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, 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
 -    the patch, thanks to Colin Watson for testing it.
 -  * 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 
 -      (Closes: #322120)
 -  * Andreas Pakulat:
 -    - added example apt-ftparchive.conf file to doc/examples 
 -      (closes: #322483)
++  * 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)
 -  
 - -- Michael Vogt <michael.vogt@ubuntu.com>  Tue, 23 Aug 2005 00:15:00 +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
  
      conditions
    * 0.6.40 breaks the ABI but I accidentally didn't change the soname :/
  
 - -- Michael Vogt <mvo@debian.org>  Fri,  5 Aug 2005 13:24:58 +0200
 + -- 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
  
  
   -- 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@ubuntu.com>  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 methods/cdrom.cc
index 7cc0368141fb99f38bc06675edbb488d337f72e1,7cc0368141fb99f38bc06675edbb488d337f72e1..41eb8a0ee7be3a02263dd9dfff4c8d42f1637477
@@@ -13,6 -13,6 +13,7 @@@
  #include <apt-pkg/error.h>
  #include <apt-pkg/configuration.h>
  #include <apt-pkg/fileutl.h>
++#include <apt-pkg/hashes.h>
  
  #include <sys/stat.h>
  #include <unistd.h>
@@@ -180,6 -180,6 +181,12 @@@ bool CDROMMethod::Fetch(FetchItem *Itm
        CurrentID = NewID;
     Res.LastModified = Buf.st_mtime;
     Res.Size = Buf.st_size;
++
++   Hashes Hash;
++   FileFd Fd(Res.Filename, FileFd::ReadOnly);
++   Hash.AddFD(Fd.Fd(), Fd.Size());
++   Res.TakeHashes(Hash);
++
     URIDone(Res);
     return true;
  }
diff --combined methods/file.cc
index 3500de9f5f100cab17ac53e8e97af267e7773845,3500de9f5f100cab17ac53e8e97af267e7773845..9cdd5bc2d3b3a3ea9ff14f2732ef832780e146cd
@@@ -15,6 -15,6 +15,8 @@@
  // Include Files                                                      /*{{{*/
  #include <apt-pkg/acquire-method.h>
  #include <apt-pkg/error.h>
++#include <apt-pkg/hashes.h>
++#include <apt-pkg/fileutl.h>
  
  #include <sys/stat.h>
  #include <unistd.h>
@@@ -75,7 -75,7 +77,11 @@@ bool FileMethod::Fetch(FetchItem *Itm
     
     if (Res.Filename.empty() == true)
        return _error->Error(_("File not found"));
--   
++
++   Hashes Hash;
++   FileFd Fd(Res.Filename, FileFd::ReadOnly);
++   Hash.AddFD(Fd.Fd(), Fd.Size());
++   Res.TakeHashes(Hash);
     URIDone(Res);
     return true;
  }