From dfff353cf081024f9e145629dd51ef08526bb54d Mon Sep 17 00:00:00 2001 From: Jack Jamison Date: Wed, 22 Jul 2026 14:54:42 -0400 Subject: basic download and hash with libcurl and libcrypto --- snag/src/package_db.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'snag/src/package_db.c') diff --git a/snag/src/package_db.c b/snag/src/package_db.c index 0bae257..3974120 100644 --- a/snag/src/package_db.c +++ b/snag/src/package_db.c @@ -80,7 +80,7 @@ bool load_package_info(char* pkgid, package_info_t* info) { // wait for child to finish int wstatus; if (waitpid(pid, &wstatus, 0) < 0) die("waitpid failed: %s", strerror(errno)); - if (WEXITSTATUS(wstatus) != 0) die("the child failed to execute get_pkg_attr script"); + if (WEXITSTATUS(wstatus) != 0) die("the child failed to execute get_pkg_attr script: %d", WEXITSTATUS(wstatus)); // read all bytes from pipe into attr buffer ssize_t bytes_read = read(pipefds[0], info->attrs.buffer, sizeof(info->attrs.buffer)); @@ -108,8 +108,8 @@ bool load_package_info(char* pkgid, package_info_t* info) { info->attrs.version = &info->attrs.buffer[i]; break; case 'u': info->attrs.source_url = &info->attrs.buffer[i]; break; - case 'h': - info->attrs.source_hash = &info->attrs.buffer[i]; break; + case 'c': + info->attrs.source_checksum = &info->attrs.buffer[i]; break; } for(;info->attrs.buffer[i] && i < bytes_read; i++); i++; -- cgit v1.2.3