Closed erickwill closed 3 years ago
https://git.archlinux.org/pacman.git/commit/lib/libalpm/db.c?id=27f354a7874b965bf223832bdf9749504cd1a590 this commit introduces a new behaviour to this libalpm
function, I guess.
Yeah i can confirm this issue. I hope it get fixed.
It's not just alpm_db_search. It's also alpm_option_set_arch and alpm_option_get_arch. There may be others, but I can't compile further.
Edit: also alpm_option_set_logcb, alpm_option_set_questioncb, alpm_option_set_dlcb. Many functions have changed.
alpm-query.c: In function ‘init_alpm’:
alpm-query.c:74:9: warning: implicit declaration of function ‘alpm_option_set_arch’; did you mean ‘alpm_option_set_dlcb’? [-Wimplicit-function-declaration]
74 | alpm_option_set_arch (handle, config.arch);
| ^~~~~~~~
| alpm_option_set_dlcb
alpm-query.c: In function ‘parse_config_server’:
alpm-query.c:96:28: warning: implicit declaration of function ‘alpm_option_get_arch’; did you mean ‘alpm_option_get_dlcb’? [-Wimplicit-function-declaration]
96 | const char arch = alpm_option_get_arch (config.handle);
| ^~~~~~~~
| alpm_option_get_dlcb
alpm-query.c:96:28: warning: initialization of ‘const char ’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion]
alpm-query.c: In function ‘search_pkg’:
alpm-query.c:397:29: error: too few arguments to function ‘alpm_db_search’
397 | alpm_list_t pkgs = alpm_db_search (db, targets);
| ^~~~~~
In file included from util.h:23,
from alpm-query.c:28:
/usr/include/alpm.h:1413:5: note: declared here
1413 | int alpm_db_search(alpm_db_t db, const alpm_list_t *needles,
| ^~~~~~
make[2]: [Makefile:429: alpm-query.o] Error 1
make[2]: Leaving directory '/distro/repository/tmp/package-query/src/package-query-1.11/src'
make[1]: [Makefile:409: all-recursive] Error 1
make[1]: Leaving directory '/distro/repository/tmp/package-query/src/package-query-1.11'
make: *** [Makefile:341: all] Error 2
It's not just alpm_db_search. It's also alpm_option_set_arch and alpm_option_get_arch. There may be others, but I can't compile further.
https://git.archlinux.org/pacman.git/commit/lib/libalpm/alpm.h?id=3179db108a83104d9de6d1d607f55f8118e92160 yeah, this is to provide a new (kinda) functionality of Arch, also live in pacman
6.0, it seems. This could lead to more effort in supporting the whole "multi-arch" feature in package-query
but the easiest way around is to change to use of those new functions with a single value in the list (which simulates the old behaviour).
Edit: also alpm_option_set_logcb, alpm_option_set_questioncb, alpm_option_set_dlcb. Many functions have changed.
Major version change, it's understandable.
This has been fixed with https://github.com/archlinuxfr/package-query/commit/ee70e6e618f112b5f5404a4af6a98adfbf6cf1a7, thanks.
After a recent update, yaourt is broken probably over package-query.
$ yaourt pacman $ package-query: error while loading shared libraries: libalpm.so.12: cannot open shared object file: No such file or directory
Also, I can't compile package-query successfully from git due to this error:
$ alpm-query.c: In function ‘search_pkg’: $ alpm-query.c:397:29: error: too few arguments to function ‘alpm_db_search’ 397 | alpm_list_t pkgs = alpm_db_search (db, targets); | ^
~~~~~ In file included from util.h:23, from alpm-query.c:28: $ /usr/include/alpm.h:1413:5: note: declared here 1413 | int alpm_db_search(alpm_db_t db, const alpm_list_t *needles, | ^~~~~~ $ make[2]: [Makefile:429: alpm-query.o] Error 1 $ make[2]: Leaving directory '/home/erick/Downloads/package-query/src/package-query-1.11/src' $ make[1]: [Makefile:409: all-recursive] Error 1 $ make[1]: Leaving directory '/home/erick/Downloads/package-query/src/package-query-1.11' $ make: *** [Makefile:341: all] Error 2 ==> ERROR: A failure occurred in build(). Aborting...Is there any workaround for this issue?