diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-24 09:40:28 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2020-01-24 09:40:28 -0500 |
commit | ea01a40084b4e09c8407886a5070a77aeba56d63 (patch) | |
tree | 04321c52b97ad66179d523f5de01f2d9bbb46b83 /src/spm.c | |
parent | bb13dd28686146c07ca9054a95ae19d09b320c8d (diff) | |
download | spmc-ea01a40084b4e09c8407886a5070a77aeba56d63.tar.gz |
Begin hooking up version spec function(s) to installation
Diffstat (limited to 'src/spm.c')
-rw-r--r-- | src/spm.c | 12 |
1 files changed, 4 insertions, 8 deletions
@@ -245,24 +245,20 @@ int main(int argc, char *argv[], char *arge[]) { printf("Installing package:\n"); for (int i = 0; i < PACKAGE_MAX; i++) { - char *match = NULL; + //char *match = NULL; + ManifestPackage *match = NULL; char *package = NULL; if (!packages[i]) { break; } - if ((match = find_package(packages[i])) == NULL) { + if ((match = manifest_search(manifest, packages[i])) == NULL) { fprintf(SYSERROR); runtime_free(rt); exit(1); } - - if ((package = basename(match)) == NULL) { - fprintf(stderr, "Unable to derive package name from package path:\n\t-> %s\n", match); - runtime_free(rt); - exit(1); - } + package = match->archive; // If the package was installed as a requirement of another dependency, skip it if (dep_seen(&deps, package)) { |