From 04109c847a30c9637cc93d929a1d2be64be057e6 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 22 Jul 2022 14:49:45 +0200 Subject: apt-pkg: (re)export pkgTagSection::Key to fix FTBFS in python-apt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With apt 2.5.1 python-apt fails to build with: ``` ... x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.10 -c python/acquire-item.cc -o build/temp.linux-x86_64-3.10/python/acquire-item.o -std=c++11 -Wno-write-strings -DAPT_8_CLEANER_HEADERS -DAPT_9_CLEANER_HEADERS -DAPT_10_CLEANER_HEADERS -DPY_SSIZE_T_CLEAN In file included from python/python-apt.h:30, from python/apt_pkgmodule.h:211, from python/acquire-item.cc:25: /usr/include/apt-pkg/deblistparser.h:48:65: error: ‘pkgTagSection::Key’ has not been declared 48 | bool ParseDepends(pkgCache::VerIterator &Ver, pkgTagSection::Key Key, | ^~~ ``` This commit adds a small fix by (re)exporting `pkgTagSection::Key`. --- apt-pkg/tagfile.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/tagfile.h b/apt-pkg/tagfile.h index 54562d07c..a9f581424 100644 --- a/apt-pkg/tagfile.h +++ b/apt-pkg/tagfile.h @@ -70,9 +70,9 @@ class APT_PUBLIC pkgTagSection std::string FindS(APT::StringView sv) const { return Find(sv).to_string(); } std::string FindRawS(APT::StringView sv) const { return FindRaw(sv).to_string(); }; -#ifdef APT_COMPILING_APT // Functions for lookup with a perfect hash function enum class Key; +#ifdef APT_COMPILING_APT bool Find(Key key,const char *&Start, const char *&End) const; bool Find(Key key,unsigned int &Pos) const; signed int FindI(Key key,signed long Default = 0) const; -- cgit v1.2.3-70-g09d2