defines: introduce APK_DEFAULT_ABI_TAG

for most cases, this replaces APK_DEFAULT_ARCH.  if apk-tools is built without
a configured abi-tag, the ABI tag is equivalent to APK_DEFAULT_ARCH, providing
backwards compatibility with apk v2

the /etc/apk/arch configuration file is assumed to actually describe an ABI
tag.
cute-signatures
Ariadne Conill 2022-01-13 08:19:36 -06:00 committed by Timo Teräs
parent 8051d458c6
commit fee0587660
1 changed files with 6 additions and 0 deletions

View File

@ -142,6 +142,12 @@ static inline int IS_ERR(const void *ptr) { return (unsigned long)ptr >= (unsign
#error APK_DEFAULT_ARCH not detected for this architecture
#endif
#ifndef APK_ABI_TAG
#define APK_DEFAULT_ABI_TAG APK_DEFAULT_ARCH
#else
#define APK_DEFAULT_ABI_TAG APK_ABI_TAG "-" APK_DEFAULT_ARCH
#endif
#define APK_MAX_REPOS 32 /* see struct apk_package */
#define APK_MAX_TAGS 16 /* see solver; unsigned short */
#define APK_CACHE_CSUM_BYTES 4