]> 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

index 14acad85a39e28987d69e572cbf230a3973d9acf,c39d3fddec1601ecde5dcd0fcb017fca81ccc52c..ef107444f6a8bd35ed9004b6b2f2f324e0aca04b
@@@ -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;
        }
     }
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;
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);   
  }
                                                                        /*}}}*/
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
  
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 --cc 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;
  }