From 565ded7b65240b25ad8551789ac388c8ce72b1f4 Mon Sep 17 00:00:00 2001 From: Johannes Schauer Date: Tue, 25 Feb 2014 00:12:20 +0100 Subject: implement BuildProfileSpec support as dpkg has in 1.17.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Build-dependencies are now able to include a specification limiting usage similar to already supported [arch …]. More details: https://wiki.debian.org/BuildProfileSpec Closes: 661537 --- apt-pkg/deb/deblistparser.h | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) (limited to 'apt-pkg/deb/deblistparser.h') diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 386d291a2..0531b20f3 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -72,11 +72,20 @@ class debListParser : public pkgCacheGenerator::ListParser bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File, std::string section); - + + static const char *ParseDepends(const char *Start,const char *Stop, + std::string &Package,std::string &Ver,unsigned int &Op); static const char *ParseDepends(const char *Start,const char *Stop, - std::string &Package,std::string &Ver,unsigned int &Op, - bool const &ParseArchFlags = false, - bool const &StripMultiArch = true); + std::string &Package,std::string &Ver,unsigned int &Op, + bool const &ParseArchFlags); + static const char *ParseDepends(const char *Start,const char *Stop, + std::string &Package,std::string &Ver,unsigned int &Op, + bool const &ParseArchFlags, bool const &StripMultiArch); + static const char *ParseDepends(const char *Start,const char *Stop, + std::string &Package,std::string &Ver,unsigned int &Op, + bool const &ParseArchFlags, bool const &StripMultiArch, + bool const &ParseRestrictionsList); + static const char *ConvertRelation(const char *I,unsigned int &Op); debListParser(FileFd *File, std::string const &Arch = ""); -- cgit v1.2.3 From 453b82a388013e522b3a1b9fcd6ed0810dab1f4f Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 5 Mar 2014 22:11:25 +0100 Subject: cleanup headers and especially #includes everywhere Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use) --- apt-pkg/deb/deblistparser.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apt-pkg/deb/deblistparser.h') diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 0531b20f3..c0973260f 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -13,11 +13,18 @@ #include #include +#include +#include + +#include +#include #ifndef APT_8_CLEANER_HEADERS #include #endif +class FileFd; + class debListParser : public pkgCacheGenerator::ListParser { public: -- cgit v1.2.3 From e33dbfe5cea09b2124be8db5a6ae0eb82ad7e9c5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Wed, 12 Mar 2014 16:53:44 +0100 Subject: factor out parsing of MultiArch flag Git-Dch: Ignore --- apt-pkg/deb/deblistparser.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apt-pkg/deb/deblistparser.h') diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index c0973260f..03733ae8c 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -97,6 +97,9 @@ class debListParser : public pkgCacheGenerator::ListParser debListParser(FileFd *File, std::string const &Arch = ""); virtual ~debListParser() {}; + + private: + unsigned char ParseMultiArch(bool const showErrors); }; #endif -- cgit v1.2.3 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/deb/deblistparser.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'apt-pkg/deb/deblistparser.h') diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 03733ae8c..286244cc9 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -70,6 +70,9 @@ class debListParser : public pkgCacheGenerator::ListParser virtual std::string DescriptionLanguage(); virtual MD5SumValue Description_md5(); virtual unsigned short VersionHash(); +#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 13) + virtual bool SameVersion(unsigned short const Hash, pkgCache::VerIterator const &Ver); +#endif virtual bool UsePackage(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver); virtual unsigned long Offset() {return iOffset;}; -- cgit v1.2.3 From ce62f1def6565375ce9c56eb1237ccdc0ca138ba Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Fri, 21 Mar 2014 16:26:01 +0100 Subject: mark optional (private) symbols as hidden This methods should not be used by anyone expect the library itself as they are helpers for the specific class and therefore perfect candidates for hidding. Git-Dch: Ignore --- apt-pkg/deb/deblistparser.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb/deblistparser.h') diff --git a/apt-pkg/deb/deblistparser.h b/apt-pkg/deb/deblistparser.h index 286244cc9..baace79fe 100644 --- a/apt-pkg/deb/deblistparser.h +++ b/apt-pkg/deb/deblistparser.h @@ -15,6 +15,7 @@ #include #include #include +#include #include #include @@ -102,7 +103,7 @@ class debListParser : public pkgCacheGenerator::ListParser virtual ~debListParser() {}; private: - unsigned char ParseMultiArch(bool const showErrors); + APT_HIDDEN unsigned char ParseMultiArch(bool const showErrors); }; #endif -- cgit v1.2.3