From: Michael Vogt Date: Tue, 23 Aug 2005 08:20:18 +0000 (+0000) Subject: * cherry-picked patches from apt--fixes and apt--mvo X-Git-Tag: 0.7.24ubuntu1~301 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/bdcf3b49360a353381e981d1918fc300c559948a * cherry-picked patches from apt--fixes and apt--mvo 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) --- bdcf3b49360a353381e981d1918fc300c559948a diff --cc apt-pkg/acquire-item.cc index 14acad85a,c39d3fdde..ef107444f --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@@ -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 --cc apt-pkg/policy.h index 15f204798,15f204798..40ebd3f70 --- a/apt-pkg/policy.h +++ b/apt-pkg/policy.h @@@ -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 Defaults; diff --cc cmdline/apt-get.cc index e673e0f5b,e673e0f5b..7e079b91c --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@@ -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 --cc debian/changelog index 35cba6007,39ab07b32..61f5be622 --- a/debian/changelog +++ b/debian/changelog @@@ -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 Tue, 23 Aug 2005 00:15:00 +0200 + + -- + +apt (0.6.40.1ubuntu1) breezy; urgency=low + + * Synchronize with Debian + + -- Michael Vogt Fri, 5 Aug 2005 14:20:56 +0200 apt (0.6.40.1) unstable; urgency=low diff --cc methods/cdrom.cc index 7cc036814,7cc036814..41eb8a0ee --- a/methods/cdrom.cc +++ b/methods/cdrom.cc @@@ -13,6 -13,6 +13,7 @@@ #include #include #include ++#include #include #include @@@ -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 3500de9f5,3500de9f5..9cdd5bc2d --- a/methods/file.cc +++ b/methods/file.cc @@@ -15,6 -15,6 +15,8 @@@ // Include Files /*{{{*/ #include #include ++#include ++#include #include #include @@@ -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; }