summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-08-12 08:28:42 +0200
committerAllan McRae <allan@archlinux.org>2012-12-14 03:35:34 +0100
commitd0e5cd2c7faef6159ab353714fa5227739994b2f (patch)
tree290fa301adf0daa733f7ec298593a456b3c01e61 /lib/libalpm/alpm.h
parent9a24f1ffc50deb7d979430ac85475b10b4a98d28 (diff)
downloadpacman-d0e5cd2c7faef6159ab353714fa5227739994b2f.tar.gz
pacman-d0e5cd2c7faef6159ab353714fa5227739994b2f.tar.xz
Add "Optional for" to package information output
Much like packages that require a give package are displayed in the "Required by" field of its information output, alos display packages that optionally require the package. Inspired-by: Benedikt Morbach <benedikt.morbach@googlemail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/alpm.h')
-rw-r--r--lib/libalpm/alpm.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/libalpm/alpm.h b/lib/libalpm/alpm.h
index bf726fc2..8d6edb81 100644
--- a/lib/libalpm/alpm.h
+++ b/lib/libalpm/alpm.h
@@ -712,6 +712,14 @@ int alpm_pkg_vercmp(const char *a, const char *b);
*/
alpm_list_t *alpm_pkg_compute_requiredby(alpm_pkg_t *pkg);
+/** Computes the list of packages optionally requiring a given package.
+ * The return value of this function is a newly allocated
+ * list of package names (char*), it should be freed by the caller.
+ * @param pkg a package
+ * @return the list of packages optionally requiring pkg
+ */
+alpm_list_t *alpm_pkg_compute_optionalfor(alpm_pkg_t *pkg);
+
/** @name Package Property Accessors
* Any pointer returned by these functions points to internal structures
* allocated by libalpm. They should not be freed nor modified in any