Skip to content

Commit d868024

Browse files
committed
refactored dependency handling to cccp, could be better, but ok for now
1 parent da00334 commit d868024

File tree

3 files changed

+0
-257
lines changed

3 files changed

+0
-257
lines changed

include/libspm.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ char** search(char *term, int *num_results);
6565
int update();
6666
int upgrade();
6767
void create_links(char build_loc[4096], char dest_loc[4096]);
68-
int check_optional_dependencies(char ** dependencies,int dependenciesCount);
6968
int get_repos(char** list);
7069
char** get_all_files(const char* root, const char *path, int *num_files);
7170
int download(char* url, FILE* fp);
@@ -393,19 +392,6 @@ int loadFile(const char* path, const char* file_path);
393392
*/
394393
long get_locations(char*** locations, const char* loc_dir);
395394

396-
// Function to check if all dependencies of a package are installed
397-
/*
398-
Accepts:
399-
- char **dependencies: An array of dependency names.
400-
- int dependenciesCount: The number of dependencies in the array.
401-
402-
Returns:
403-
- int: An integer indicating the result of dependency checking.
404-
- 0: All dependencies are installed.
405-
- -1: An error occurred during dependency checking.
406-
*/
407-
int check_dependencies(char ** dependencies,int dependenciesCount);
408-
409395

410396

411397

src/deps.c

Lines changed: 0 additions & 237 deletions
This file was deleted.

src/install.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,6 @@ int f_install_package_source(const char* spm_path, int as_dep, char* repo) {
122122
fclose(env_file);
123123
}
124124

125-
// Check package dependencies
126-
if (pkg.dependencies != NULL && pkg.dependenciesCount > 0 && strlen(pkg.dependencies[0]) > 0) {
127-
dbg(1, "Checking dependencies...");
128-
check_dependencies(pkg.dependencies, pkg.dependenciesCount);
129-
}
130-
131125
// Set the package info section as environment vadiables for make script
132126

133127
setenv("NAME", pkg.name, 1);

0 commit comments

Comments
 (0)