From 2f5b615169aef2d9c74bb337af229dee2dce595e Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 15 Mar 2013 14:17:01 +0100 Subject: * apt-pkg/indexcopy.cc: - rename RunGPGV to ExecGPGV and move it to apt-pkg/contrib/gpgv.cc --- apt-pkg/indexcopy.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'apt-pkg/indexcopy.h') diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index e3de1afd9..49e724f2f 100644 --- a/apt-pkg/indexcopy.h +++ b/apt-pkg/indexcopy.h @@ -14,6 +14,9 @@ #include #include +#include +#include + #ifndef APT_8_CLEANER_HEADERS using std::string; using std::vector; @@ -96,13 +99,13 @@ class SigVerify /*{{{*/ bool CopyAndVerify(std::string CDROM,std::string Name,std::vector &SigList, std::vector PkgList,std::vector SrcList); - /** \brief generates and run the command to verify a file with gpgv */ - static bool RunGPGV(std::string const &File, std::string const &FileOut, - int const &statusfd, int fd[2]); - inline static bool RunGPGV(std::string const &File, std::string const &FileOut, + __deprecated static bool RunGPGV(std::string const &File, std::string const &FileOut, + int const &statusfd, int fd[2]) { + return ExecGPGV(File, FileOut, statusfd, fd); + }; + __deprecated static bool RunGPGV(std::string const &File, std::string const &FileOut, int const &statusfd = -1) { - int fd[2]; - return RunGPGV(File, FileOut, statusfd, fd); + return ExecGPGV(File, FileOut, statusfd); }; }; /*}}}*/ -- cgit v1.2.3 From 99ed26d32226f0dffe5a37fb78c5588f9d9ecfd5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 15 Mar 2013 14:29:46 +0100 Subject: * apt-pkg/contrib/gpgv.cc: - ExecGPGV is a method which should never return, so mark it as such and fix the inconsistency of returning in error cases --- apt-pkg/indexcopy.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apt-pkg/indexcopy.h') diff --git a/apt-pkg/indexcopy.h b/apt-pkg/indexcopy.h index 49e724f2f..aa221158e 100644 --- a/apt-pkg/indexcopy.h +++ b/apt-pkg/indexcopy.h @@ -101,11 +101,13 @@ class SigVerify /*{{{*/ __deprecated static bool RunGPGV(std::string const &File, std::string const &FileOut, int const &statusfd, int fd[2]) { - return ExecGPGV(File, FileOut, statusfd, fd); + ExecGPGV(File, FileOut, statusfd, fd); + return false; }; __deprecated static bool RunGPGV(std::string const &File, std::string const &FileOut, int const &statusfd = -1) { - return ExecGPGV(File, FileOut, statusfd); + ExecGPGV(File, FileOut, statusfd); + return false; }; }; /*}}}*/ -- cgit v1.2.3