From: Michael Vogt Date: Thu, 25 Sep 2014 10:33:26 +0000 (+0200) Subject: Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans X-Git-Tag: 1.1.exp4~6^2~44 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/e31a89e668596ea86c8f3a08429cd2f48286e734?ds=sidebyside;hp=-c Merge remote-tracking branch 'upstream/debian/experimental' into feature/acq-trans --- e31a89e668596ea86c8f3a08429cd2f48286e734 diff --combined methods/copy.cc index 30a3f4a51,3883c822b..faf330ace --- a/methods/copy.cc +++ b/methods/copy.cc @@@ -70,14 -70,6 +70,14 @@@ bool CopyMethod::Fetch(FetchItem *Itm Res.LastModified = Buf.st_mtime; Res.IMSHit = false; URIStart(Res); + + // when the files are identical, just compute the hashes + if(File == Itm->DestFile) + { + CalculateHashes(Res); + URIDone(Res); + return true; + } // just calc the hashes if the source and destination are identical if (File == Itm->DestFile) @@@ -127,5 -119,7 +127,7 @@@ int main( setlocale(LC_ALL, ""); CopyMethod Mth; + + Mth.DropPrivsOrDie(); return Mth.Run(); } diff --combined methods/gpgv.cc index 30fd217bd,4071cbac6..72e4c7987 --- a/methods/gpgv.cc +++ b/methods/gpgv.cc @@@ -5,6 -5,7 +5,7 @@@ #include #include #include + #include #include #include @@@ -159,7 -160,7 +160,7 @@@ string GPGVMethod::VerifyGetSigners(con waitpid(pid, &status, 0); if (Debug == true) { - std::clog << "gpgv exited\n"; + ioprintf(std::clog, "gpgv exited with status %i\n", WEXITSTATUS(status)); } if (WEXITSTATUS(status) == 0) @@@ -261,8 -262,10 +262,10 @@@ bool GPGVMethod::Fetch(FetchItem *Itm int main() { setlocale(LC_ALL, ""); - + GPGVMethod Mth; + Mth.DropPrivsOrDie(); + return Mth.Run(); }