Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/package.c
diff options
context:
space:
mode:
authorMark Weiman <mark.weiman@markzz.com>2017-01-03 17:32:27 -0500
committerAllan McRae <allan@archlinux.org>2017-01-04 13:59:15 +1000
commit0994893b0e6b627d45a63884ac01af7d0967eff2 (patch)
treea8bba222e088abd8bc53f332c05d804b0ae3934b /lib/libalpm/package.c
parentaa44824788582cd3278ff74a60dfb276cf1aebfc (diff)
Add alpm_pkg_get_makedepends and alpm_pkg_get_checkdepends
makepkg adds makedepends and checkdepends to a package's .PKGINFO file. Add functions that allow use of these from libalpm. Signed-off-by: Mark Weiman <mark.weiman@markzz.com> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r--lib/libalpm/package.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c
index 2206afe8..d0f902f0 100644
--- a/lib/libalpm/package.c
+++ b/lib/libalpm/package.c
@@ -99,6 +99,8 @@ static alpm_list_t *_pkg_get_licenses(alpm_pkg_t *pkg) { return pkg->licenses;
static alpm_list_t *_pkg_get_groups(alpm_pkg_t *pkg) { return pkg->groups; }
static alpm_list_t *_pkg_get_depends(alpm_pkg_t *pkg) { return pkg->depends; }
static alpm_list_t *_pkg_get_optdepends(alpm_pkg_t *pkg) { return pkg->optdepends; }
+static alpm_list_t *_pkg_get_checkdepends(alpm_pkg_t *pkg) { return pkg->checkdepends; }
+static alpm_list_t *_pkg_get_makedepends(alpm_pkg_t *pkg) { return pkg->makedepends; }
static alpm_list_t *_pkg_get_conflicts(alpm_pkg_t *pkg) { return pkg->conflicts; }
static alpm_list_t *_pkg_get_provides(alpm_pkg_t *pkg) { return pkg->provides; }
static alpm_list_t *_pkg_get_replaces(alpm_pkg_t *pkg) { return pkg->replaces; }
@@ -161,6 +163,8 @@ struct pkg_operations default_pkg_ops = {
.get_groups = _pkg_get_groups,
.get_depends = _pkg_get_depends,
.get_optdepends = _pkg_get_optdepends,
+ .get_checkdepends = _pkg_get_checkdepends,
+ .get_makedepends = _pkg_get_makedepends,
.get_conflicts = _pkg_get_conflicts,
.get_provides = _pkg_get_provides,
.get_replaces = _pkg_get_replaces,
@@ -335,6 +339,20 @@ alpm_list_t SYMEXPORT *alpm_pkg_get_optdepends(alpm_pkg_t *pkg)
return pkg->ops->get_optdepends(pkg);
}
+alpm_list_t SYMEXPORT *alpm_pkg_get_checkdepends(alpm_pkg_t *pkg)
+{
+ ASSERT(pkg != NULL, return NULL);
+ pkg->handle->pm_errno = ALPM_ERR_OK;
+ return pkg->ops->get_checkdepends(pkg);
+}
+
+alpm_list_t SYMEXPORT *alpm_pkg_get_makedepends(alpm_pkg_t *pkg)
+{
+ ASSERT(pkg != NULL, return NULL);
+ pkg->handle->pm_errno = ALPM_ERR_OK;
+ return pkg->ops->get_makedepends(pkg);
+}
+
alpm_list_t SYMEXPORT *alpm_pkg_get_conflicts(alpm_pkg_t *pkg)
{
ASSERT(pkg != NULL, return NULL);