aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2024-10-04 17:35:12 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2024-10-04 17:35:12 -0400
commitace6fe586ff30be57e708f81489b120204d6dd62 (patch)
treed1e0d85f052efb13dbf624fcb002a4fc725ed310 /src
parent4ea0e522551b8d77ed79df9e7edd6ec891019d19 (diff)
downloadstasis-ace6fe586ff30be57e708f81489b120204d6dd62.tar.gz
Use nametmp instead of test->name (i.e. name)
Diffstat (limited to 'src')
-rw-r--r--src/delivery.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/src/delivery.c b/src/delivery.c
index dfe9209..563ef8f 100644
--- a/src/delivery.c
+++ b/src/delivery.c
@@ -235,8 +235,8 @@ void delivery_defer_packages(struct Delivery *ctx, int type) {
version = test->version;
// Is the list item a git+schema:// URL?
- if (strstr(name, "git+") && strstr(name, "://")) {
- char *xrepo = strstr(name, "+");
+ if (strstr(nametmp, "git+") && strstr(nametmp, "://")) {
+ char *xrepo = strstr(nametmp, "+");
if (xrepo) {
xrepo++;
guard_free(test->repository);
@@ -244,7 +244,7 @@ void delivery_defer_packages(struct Delivery *ctx, int type) {
xrepo = NULL;
}
// Extract the name of the package
- char *xbasename = path_basename(name);
+ char *xbasename = path_basename(nametmp);
if (xbasename) {
// Replace the git+schema:// URL with the package name
strlist_set(&dataptr, i, xbasename);
@@ -252,9 +252,11 @@ void delivery_defer_packages(struct Delivery *ctx, int type) {
}
}
- if (DEFER_PIP == type && pip_index_provides(PYPI_INDEX_DEFAULT, name, version)) {
- fprintf(stderr, "(%s present on index %s): ", version, PYPI_INDEX_DEFAULT);
- ignore_pkg = 0;
+ ignore_pkg = 0;
+ if (DEFER_PIP == type && pip_index_provides(PYPI_INDEX_DEFAULT, nametmp, version)) {
+ fprintf(stderr, "(%s provided by index %s): ", version, PYPI_INDEX_DEFAULT);
+ } else if (DEFER_CONDA == type && conda_provides(nametmp)) {
+ fprintf(stderr, "(%s provided by conda channel): ", version);
} else {
ignore_pkg = 1;
}
@@ -263,12 +265,6 @@ void delivery_defer_packages(struct Delivery *ctx, int type) {
}
if (ignore_pkg) {
- char build_at[PATH_MAX];
- if (DEFER_CONDA == type) {
- sprintf(build_at, "%s=%s", name, version);
- name = build_at;
- }
-
printf("BUILD FOR HOST\n");
strlist_append(&deferred, name);
} else {