Closed eli-schwartz closed 3 years ago
Thanks for the heads up! However, I'm reluctant to change anything at this point as that would probably break building against the current libalpm release. Do you have an idea when new pacman version is going to be released?
No release date has been scheduled yet.
You can use AC_COMPILE_IFELSE
in configure.ac
to check which version of the function successfully compiles a dummy code snippet, and use that to set e.g. DB_SEARCH_TWO_ARGS
or DB_SEARCH_THREE_ARGS
macros in config.h
, then use that as an #if/#else
in alpm-query.c
.
That's the usual way to portably write code that works on multiple versions of a function. The resulting package-query binary would then compile on either version of libalpm, and since the latter case is a git development version without a distinguishing soname yet, using the wrong libalpm version would lead to a runtime crash instead of a missing shared library. (Since this only affects users of the git development version, they can live with that limitation.)
https://github.com/archlinuxfr/package-query/issues/149 is the same issue but against a fresh release of pacman
, so the changes are live now.
This has been fixed with https://github.com/archlinuxfr/package-query/commit/ee70e6e618f112b5f5404a4af6a98adfbf6cf1a7, thanks.
See the following pacman commit which changed the way alpm_db_search worked: https://git.archlinux.org/pacman.git/commit/?id=27f354a7874b965bf223832bdf9749504cd1a590