Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib/libalpm/be_local.c
diff options
context:
space:
mode:
authorJohannes Löthberg <johannes@kyriasis.com>2014-12-22 15:11:39 +0100
committerAllan McRae <allan@archlinux.org>2014-12-24 11:19:30 +1000
commit1f1e53c208cfa0e284511470acb679fe10c4d80c (patch)
treecfb91aa4ac252813f46e2b5db821a41e523c6c7d /lib/libalpm/be_local.c
parent9f527d2de453b542293e24d85ee894fa6452259a (diff)
libalpm: Add accessors for the base field
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> Signed-off-by: Allan McRae <allan@archlinux.org>
Diffstat (limited to 'lib/libalpm/be_local.c')
-rw-r--r--lib/libalpm/be_local.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libalpm/be_local.c b/lib/libalpm/be_local.c
index 852baa4c..0771aaf1 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,