diff options
author | Dan McGee <dan@archlinux.org> | 2011-08-29 06:41:17 +0200 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-08-29 06:41:17 +0200 |
commit | 040083b97fab61c8afc16a1c49a8384d097c272a (patch) | |
tree | 97fb452adccf6f9f9d09356fdaae6115c878310b /lib/libalpm/package.c | |
parent | 3a458783a2617b7b22a756f95b5f66f3da79146f (diff) | |
download | pacman-040083b97fab61c8afc16a1c49a8384d097c272a.tar.gz pacman-040083b97fab61c8afc16a1c49a8384d097c272a.tar.xz |
Allow access to package origin data
Add new alpm_pkg_get_origin() method, use it in the front end now that
the enum constants are publicly available.
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'lib/libalpm/package.c')
-rw-r--r-- | lib/libalpm/package.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libalpm/package.c b/lib/libalpm/package.c index 3d73a433..487b56d9 100644 --- a/lib/libalpm/package.c +++ b/lib/libalpm/package.c @@ -185,6 +185,13 @@ const char SYMEXPORT *alpm_pkg_get_version(alpm_pkg_t *pkg) return pkg->version; } +alpm_pkgfrom_t SYMEXPORT alpm_pkg_get_origin(alpm_pkg_t *pkg) +{ + ASSERT(pkg != NULL, return -1); + pkg->handle->pm_errno = 0; + return pkg->origin; +} + const char SYMEXPORT *alpm_pkg_get_desc(alpm_pkg_t *pkg) { ASSERT(pkg != NULL, return NULL); |