summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2022-07-22 14:49:45 +0200
committerMichael Vogt <mvo@ubuntu.com>2022-07-22 14:49:45 +0200
commit04109c847a30c9637cc93d929a1d2be64be057e6 (patch)
treea0ba9b9016800fa20292c517ab2aa07931630c2a /apt-pkg
parent01634926847e7c70ce51ea4592d8da0a25d9150d (diff)
apt-pkg: (re)export pkgTagSection::Key to fix FTBFS in python-apt
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`.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/tagfile.h2
1 files changed, 1 insertions, 1 deletions
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;