diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-13 11:36:10 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-02-13 11:36:10 -0500 |
commit | 74ed8c549a360330643ef32ac6070a834820b611 (patch) | |
tree | 460a43a3046a7a9990157b3fb787faa6a22b0d57 /src/manifest.c | |
parent | 094375a5c0ee18e9144c73c543d5218f261cc561 (diff) | |
download | spmc-74ed8c549a360330643ef32ac6070a834820b611.tar.gz |
Begin refactoring to support multiple manifests:
* Add more commands useful for building packages
* Fix mkmanifest_interface not looking for the correct number of arguments
Diffstat (limited to 'src/manifest.c')
-rw-r--r-- | src/manifest.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/manifest.c b/src/manifest.c index 5a1eeb8..4f3fa8c 100644 --- a/src/manifest.c +++ b/src/manifest.c @@ -59,7 +59,9 @@ Manifest *manifest_from(const char *package_dir) { dep_init(&deps); if (dep_all(&deps, basename(fsdata->files[i])) < 0) { dep_free(&deps); - // TODO: Why is this freed *and* the program continues? I don't know why this is here. + fprintf(stderr, "%s: dependency not found\n", fsdata->files[i]); + fprintf(SYSERROR); + return NULL; } // Initialize package record @@ -194,7 +196,7 @@ int manifest_write(Manifest *info, const char *outfile) { printf("[%3.0f%%] %s\n", percent, info->packages[i]->archive); } reqs = join(info->packages[i]->requirements, ","); - char *archive = join((char *[]) {SPM_GLOBAL.package_dir, info->packages[i]->archive, NULL}, DIRSEPS); + char *archive = join((char *[]) {SPM_GLOBAL.package_dir, SPM_GLOBAL.repo_target, info->packages[i]->archive, NULL}, DIRSEPS); char *checksum_sha256 = sha256sum(archive); sprintf(dptr, "%s|" // archive @@ -492,4 +494,8 @@ ManifestPackage *manifest_package_copy(ManifestPackage *manifest) { } return result; +} + +int manifest_merge(Manifest *a, Manifest *b) { + }
\ No newline at end of file |