aboutsummaryrefslogtreecommitdiff
path: root/src/spm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/spm.c')
-rw-r--r--src/spm.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/spm.c b/src/spm.c
index 0e2a725..052ac09 100644
--- a/src/spm.c
+++ b/src/spm.c
@@ -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)) {