From 501f1f187bb3c3609d191be00aeae0d99636cf7a Mon Sep 17 00:00:00 2001 From: Denis Ollier Date: Thu, 31 May 2018 18:30:04 +0200 Subject: [PATCH] Add support for local file package make dependencies (%M) Supported by libalpm since https://git.archlinux.org/pacman.git/commit/?id=0994893 but only for package alpm backend. It is not implemented yet by localdb and syncdb backends. Bump libalpm requirement to 11.0.0 --- doc/package-query.8 | 2 +- src/alpm-query.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/package-query.8 b/doc/package-query.8 index 509682d..3de098c 100644 --- a/doc/package-query.8 +++ b/doc/package-query.8 @@ -263,7 +263,7 @@ Format can contain: %l: local version %L: last submission (AUR) %m: maintainer or packager -%M: make dependencies (AUR) +%M: make dependencies (AUR and local package tarball) %n: name %N: required by (Needed by) %o: out of date (1 for true) diff --git a/src/alpm-query.c b/src/alpm-query.c index edd5dcf..d5fcb46 100644 --- a/src/alpm-query.c +++ b/src/alpm-query.c @@ -595,6 +595,13 @@ const char *alpm_pkg_get_str (const void *p, unsigned char c) case 'm': info = (char *) alpm_pkg_get_packager (pkg); break; + case 'M': + if (alpm_pkg_get_origin (pkg) != ALPM_PKG_FROM_FILE) { + return NULL; + } + info = concat_dep_list (alpm_pkg_get_makedepends (pkg)); + free_info = true; + break; case 'n': info = (char *) alpm_pkg_get_name (pkg); break;