diff options
author | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-20 17:12:06 +0100 |
---|---|---|
committer | Johannes Löthberg <johannes@kyriasis.com> | 2014-12-20 17:17:22 +0100 |
commit | 17e743557815dd696d883a32c4e3791e7e4c5a90 (patch) | |
tree | f9a7eb49d2d990c0323af5eb8416afc6a2ad7b4e /lib/libalpm/be_local.c | |
parent | 8d4984cc648f72aad78833216400a23e9a25d708 (diff) | |
download | pacman-pkgbase.tar.xz |
libalpm: Add accessors for the base fieldpkgbase
This commit adds the necessary accessor functions to get the PKGBASE of
a package, forcing the desc file to be parsed.
Signed-off-by: Johannes Löthberg <johannes@kyriasis.com>
Diffstat (limited to 'lib/libalpm/be_local.c')
-rw-r--r-- | lib/libalpm/be_local.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c index 54d3099f..dbdfc991 100644 --- a/lib/libalpm/be_local.c +++ b/lib/libalpm/be_local.c @@ -63,6 +63,12 @@ static int local_db_read(alpm_pkg_t *info, alpm_dbinfrq_t inforeq); * initialized. */ +static const char *_cache_get_base(alpm_pkg_t *pkg) +{ + LAZY_LOAD(INFRQ_DESC, NULL); + return pkg->base; +} + static const char *_cache_get_desc(alpm_pkg_t *pkg) { LAZY_LOAD(INFRQ_DESC, NULL); @@ -297,6 +303,7 @@ static int _cache_force_load(alpm_pkg_t *pkg) * logic. */ static struct pkg_operations local_pkg_ops = { + .get_base = _cache_get_base, .get_desc = _cache_get_desc, .get_url = _cache_get_url, .get_builddate = _cache_get_builddate, |