[PATCH 2/2] pactree: Set the gpg directory
Edward E
develinthedetail at gmail.com
Fri Jan 3 21:57:00 UTC 2020
Addresses https://github.com/msys2/MSYS2-packages/issues/1720
Signed-off-by: Edward E <develinthedetail at gmail.com>
---
src/Makefile.am | 4 +++-
src/pactree.c | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
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);
--
2.24.0
More information about the pacman-contrib
mailing list