diff options
| author | Jack Jamison <jackqjamison@gmail.com> | 2026-07-22 14:54:42 -0400 |
|---|---|---|
| committer | Jack Jamison <jackqjamison@gmail.com> | 2026-07-22 14:54:42 -0400 |
| commit | dfff353cf081024f9e145629dd51ef08526bb54d (patch) | |
| tree | 143ea3f1d33edf5d0527768fa9461750e417578a /snag/src/package_db.c | |
| parent | c293d3cc413991e4fb18b963427a6e55afd2b5c0 (diff) | |
basic download and hash with libcurl and libcrypto
Diffstat (limited to 'snag/src/package_db.c')
| -rw-r--r-- | snag/src/package_db.c | 6 |
1 files changed, 3 insertions, 3 deletions
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++; |
