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:
authorDan McGee <dan@archlinux.org>2011-08-11 20:15:15 -0500
committerDan McGee <dan@archlinux.org>2011-08-15 12:11:55 -0500
commitebb2e36cc4c40d11689a44a2503df40fa96e8fc1 (patch)
treeaa75da8cd9fc082b7b5278ed783bb8ff98f818f9 /lib/libalpm/be_local.c
parent31f2e0cba3281660a2a3ffc6f902a7019cb4699b (diff)
Load and allow access to sha256sum
This adds a field in the package struct for this checksum type as well as allowing access via the API to it. The frontend is now able to display any read value. Note that this does not implement any use or verification of the value internally. Signed-off-by: Dan McGee <dan@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 5d136c9e..67b66f28 100644
--- a/lib/libalpm/be_local.c
+++ b/lib/libalpm/be_local.c
@@ -99,6 +99,12 @@ static const char *_cache_get_md5sum(alpm_pkg_t *pkg)
return pkg->md5sum;
}
+static const char *_cache_get_sha256sum(alpm_pkg_t *pkg)
+{
+ LAZY_LOAD(INFRQ_DESC, NULL);
+ return pkg->sha256sum;
+}
+
static const char *_cache_get_arch(alpm_pkg_t *pkg)
{
LAZY_LOAD(INFRQ_DESC, NULL);
@@ -251,6 +257,7 @@ static struct pkg_operations local_pkg_ops = {
.get_installdate = _cache_get_installdate,
.get_packager = _cache_get_packager,
.get_md5sum = _cache_get_md5sum,
+ .get_sha256sum = _cache_get_sha256sum,
.get_arch = _cache_get_arch,
.get_size = _cache_get_size,
.get_isize = _cache_get_isize,