diff options
| author | forever2k38 <forever2k38@noreply.codeberg.org> | 2026-09-07 13:47:57 +0200 |
|---|---|---|
| committer | forever2k38 <forever2k38@noreply.codeberg.org> | 2026-09-07 13:47:57 +0200 |
| commit | 119d56047e5bd49c42ca7378a332707c021a81cc (patch) | |
| tree | 8485a0f931aa534444db0346ae1f6aa19729bfe6 /src/repo.c | |
| parent | 82ac5c841b8181e99d00c76dbc8dd29c619bb926 (diff) | |
remove testing repo, begin testing with main repo
Diffstat (limited to 'src/repo.c')
| -rw-r--r-- | src/repo.c | 29 |
1 files changed, 26 insertions, 3 deletions
@@ -42,15 +42,38 @@ int pow_repo_get_package(pow_repo **repos, size_t repo_count, pow_package *pkg, dp = opendir(package_path); - free(package_path); - if (!dp) { + free(package_path); + continue; } printf("found package %s in repo %s\n", query, repos[i]->path); - pow_package_open(pkg, "./testing/sys-build/samurai/1.3.lua"); + char *full_path = malloc(PATH_MAX); + + if (!full_path) { + free(package_path); + + printf("failed to malloc full path for build script\n"); + + return 1; + } + + written = snprintf(full_path, PATH_MAX, "%s/%s", package_path, "build.lua"); + + if (written >= PATH_MAX) { + printf("something went seriously wrong. the path for the package build " + "script %s is " + "too long?\n", + query); + + free(package_path); + + return 1; + } + + pow_package_open(pkg, full_path); closedir(dp); } |
