Skip to content

Commit

Permalink
Add support for local file package check dependencies (%c)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
larchunix committed May 31, 2018
1 parent 3addf91 commit 1638348
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ AC_CHECK_HEADERS([ctype.h getopt.h glob.h libintl.h limits.h locale.h regex.h si

AC_CHECK_LIB([alpm], [alpm_version], ,
AC_MSG_ERROR([pacman is needed to compile package-query]))
PKG_CHECK_MODULES([alpm], [libalpm >= 10.0.0])
PKG_CHECK_MODULES([alpm], [libalpm >= 11.0.0])

AC_CHECK_LIB([yajl], [yajl_free], ,
AC_MSG_ERROR([yajl is needed to compile package-query]))
Expand Down
2 changes: 1 addition & 1 deletion doc/package-query.8
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ Format can contain:
%a: architecture
%b: base package
%B: backups file
%c: check dependencies (AUR)
%c: check dependencies (AUR and local package tarball)
%C: conflicts with
%d: description
%D: depends on
Expand Down
7 changes: 7 additions & 0 deletions src/alpm-query.c
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,13 @@ const char *alpm_pkg_get_str (const void *p, unsigned char c)
info = concat_backup_list (alpm_pkg_get_backup (pkg));
free_info = true;
break;
case 'c':
if (alpm_pkg_get_origin (pkg) != ALPM_PKG_FROM_FILE) {
return NULL;
}
info = concat_dep_list (alpm_pkg_get_checkdepends (pkg));
free_info = true;
break;
case 'C':
info = concat_dep_list (alpm_pkg_get_conflicts (pkg));
free_info = true;
Expand Down

0 comments on commit 1638348

Please sign in to comment.