testpkg: set gpgdir
Without setting gpgdir, testpkg outputs: warning: Public keyring not found; have you run 'pacman-key --init'? Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
7a3f59cd66
commit
e530993392
2 changed files with 5 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
# paths set at make time
|
# paths set at make time
|
||||||
conffile = ${sysconfdir}/pacman.conf
|
conffile = ${sysconfdir}/pacman.conf
|
||||||
dbpath = ${localstatedir}/lib/pacman/
|
dbpath = ${localstatedir}/lib/pacman/
|
||||||
|
gpgdir = ${sysconfdir}/pacman.d/gnupg/
|
||||||
cachedir = ${localstatedir}/cache/pacman/pkg/
|
cachedir = ${localstatedir}/cache/pacman/pkg/
|
||||||
|
|
||||||
bin_PROGRAMS = vercmp testpkg testdb cleanupdelta pacsort pactree
|
bin_PROGRAMS = vercmp testpkg testdb cleanupdelta pacsort pactree
|
||||||
|
@ -8,6 +9,7 @@ bin_PROGRAMS = vercmp testpkg testdb cleanupdelta pacsort pactree
|
||||||
DEFS = -DLOCALEDIR=\"@localedir@\" \
|
DEFS = -DLOCALEDIR=\"@localedir@\" \
|
||||||
-DCONFFILE=\"$(conffile)\" \
|
-DCONFFILE=\"$(conffile)\" \
|
||||||
-DDBPATH=\"$(dbpath)\" \
|
-DDBPATH=\"$(dbpath)\" \
|
||||||
|
-DGPGDIR=\"$(gpgdir)\" \
|
||||||
-DCACHEDIR=\"$(cachedir)\" \
|
-DCACHEDIR=\"$(cachedir)\" \
|
||||||
@DEFS@
|
@DEFS@
|
||||||
|
|
||||||
|
|
|
@ -59,6 +59,9 @@ int main(int argc, char *argv[])
|
||||||
/* let us get log messages from libalpm */
|
/* let us get log messages from libalpm */
|
||||||
alpm_option_set_logcb(handle, output_cb);
|
alpm_option_set_logcb(handle, output_cb);
|
||||||
|
|
||||||
|
/* set gpgdir to default */
|
||||||
|
alpm_option_set_gpgdir(handle, GPGDIR);
|
||||||
|
|
||||||
if(alpm_pkg_load(handle, argv[1], 1, level, &pkg) == -1
|
if(alpm_pkg_load(handle, argv[1], 1, level, &pkg) == -1
|
||||||
|| pkg == NULL) {
|
|| pkg == NULL) {
|
||||||
err = alpm_errno(handle);
|
err = alpm_errno(handle);
|
||||||
|
|
Loading…
Add table
Reference in a new issue