Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/alpm.h
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2012-08-12 16:28:42 +1000
committerAllan McRae <allan@archlinux.org>2012-12-14 12:35:34 +1000
commitd0e5cd2c7faef6159ab353714fa5227739994b2f (patch)
tree290fa301adf0daa733f7ec298593a456b3c01e61 /lib/libalpm/alpm.h
parent9a24f1ffc50deb7d979430ac85475b10b4a98d28 (diff)
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