diff --git a/src/Makefile.am b/src/Makefile.am index 8d33be8..eef0590 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,6 +7,7 @@ DIST_SUBDIRS = $(SUBDIRS) # paths set at make time conffile = ${sysconfdir}/pacman.conf dbpath = ${localstatedir}/lib/pacman/ +gpgdir = ${sysconfdir}/pacman.d/gnupg/ bin_SCRIPTS = \ $(OURSCRIPTS) @@ -82,7 +83,8 @@ endif AM_CPPFLAGS = \ -DLOCALEDIR=\"@localedir@\" \ -DCONFFILE=\"$(conffile)\" \ - -DDBPATH=\"$(dbpath)\" + -DDBPATH=\"$(dbpath)\" \ + -DGPGDIR=\"$(gpgdir)\" AM_CFLAGS = \ -pedantic \ diff --git a/src/pactree.c b/src/pactree.c index 8b77f05..f7c4d39 100644 --- a/src/pactree.c +++ b/src/pactree.c @@ -125,6 +125,7 @@ static int searchsyncs = 0; static int debug = 0; static const char *dbpath = DBPATH; static const char *configfile = CONFFILE; +static const char *gpgdir = GPGDIR; void cb_log(alpm_loglevel_t level, const char *fmt, va_list args) { @@ -545,6 +546,9 @@ int main(int argc, char *argv[]) alpm_option_set_logcb(handle, cb_log); } + /* no need to fail on error */ + alpm_option_set_gpgdir(handle, gpgdir); + if(searchsyncs) { if(register_syncs() != 0) { cleanup(1);