Skip to content

Commit

Permalink
refactored dependency handling to cccp, could be better, but ok for now
Browse files Browse the repository at this point in the history
  • Loading branch information
AleksArt000 committed Aug 31, 2024
1 parent da00334 commit d868024
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 257 deletions.
14 changes: 0 additions & 14 deletions include/libspm.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ char** search(char *term, int *num_results);
int update();
int upgrade();
void create_links(char build_loc[4096], char dest_loc[4096]);
int check_optional_dependencies(char ** dependencies,int dependenciesCount);
int get_repos(char** list);
char** get_all_files(const char* root, const char *path, int *num_files);
int download(char* url, FILE* fp);
Expand Down Expand Up @@ -393,19 +392,6 @@ int loadFile(const char* path, const char* file_path);
*/
long get_locations(char*** locations, const char* loc_dir);

// Function to check if all dependencies of a package are installed
/*
Accepts:
- char **dependencies: An array of dependency names.
- int dependenciesCount: The number of dependencies in the array.
Returns:
- int: An integer indicating the result of dependency checking.
- 0: All dependencies are installed.
- -1: An error occurred during dependency checking.
*/
int check_dependencies(char ** dependencies,int dependenciesCount);




Expand Down
237 changes: 0 additions & 237 deletions src/deps.c

This file was deleted.

6 changes: 0 additions & 6 deletions src/install.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@ int f_install_package_source(const char* spm_path, int as_dep, char* repo) {
fclose(env_file);
}

// Check package dependencies
if (pkg.dependencies != NULL && pkg.dependenciesCount > 0 && strlen(pkg.dependencies[0]) > 0) {
dbg(1, "Checking dependencies...");
check_dependencies(pkg.dependencies, pkg.dependenciesCount);
}

// Set the package info section as environment vadiables for make script

setenv("NAME", pkg.name, 1);
Expand Down

0 comments on commit d868024

Please sign in to comment.