From 68134bda8868a8614edf137aad7e9be61cd2a6ee Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 12 Mar 2014 17:55:08 +0100 Subject: abstract version hash comparison a bit In #737085 we see that apt can be confused if informations about versions only differ slightly. This commit adds a way of at least adding a few more data points with the next abi break to help a bit with it. Git-Dch: Ignore --- apt-pkg/pkgcachegen.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apt-pkg/pkgcachegen.h') diff --git a/apt-pkg/pkgcachegen.h b/apt-pkg/pkgcachegen.h index 898b34358..5994dab9f 100644 --- a/apt-pkg/pkgcachegen.h +++ b/apt-pkg/pkgcachegen.h @@ -164,6 +164,15 @@ class pkgCacheGenerator::ListParser virtual std::string DescriptionLanguage() = 0; virtual MD5SumValue Description_md5() = 0; virtual unsigned short VersionHash() = 0; + /** compare currently parsed version with given version + * + * \param Hash of the currently parsed version + * \param Ver to compare with + */ +#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) + virtual +#endif + APT_PURE bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver); virtual bool UsePackage(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver) = 0; virtual unsigned long Offset() = 0; -- cgit v1.2.3