diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-10-07 12:50:30 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-10-07 12:50:30 -0400 |
commit | 4b6fd13d290f9de731589f936c304c7bc74e6b88 (patch) | |
tree | f2576b909b4d2bf4d7681989c3907f5469b48598 | |
parent | 54a4bd4ee9a608f8a8220db9e2954f33fc68ac5a (diff) | |
download | stasis-4b6fd13d290f9de731589f936c304c7bc74e6b88.tar.gz |
Don't bother extracting the version from the spec
-rw-r--r-- | src/delivery.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/delivery.c b/src/delivery.c index 6c7a675..e7dfece 100644 --- a/src/delivery.c +++ b/src/delivery.c @@ -196,7 +196,6 @@ void delivery_defer_packages(struct Delivery *ctx, int type) { } // Compile a list of packages that are *also* to be tested. - char *version; char *spec_begin = strpbrk(name, "@~=<>!"); char *spec_end = spec_begin; char package_name[255] = {0}; @@ -216,9 +215,8 @@ void delivery_defer_packages(struct Delivery *ctx, int type) { // When spec is present in name, set tests->version to the version detected in the name for (size_t x = 0; x < sizeof(ctx->tests) / sizeof(ctx->tests[0]) && ctx->tests[x].name != NULL; x++) { struct Test *test = &ctx->tests[x]; - version = NULL; - char nametmp[1024] = {0}; + if (spec_end != NULL && spec_begin != NULL) { strncpy(nametmp, name, spec_begin - name); } else { @@ -235,7 +233,6 @@ void delivery_defer_packages(struct Delivery *ctx, int type) { // HEAD is a safe bet. test->version = strdup("HEAD"); } - version = test->version; // Is the list item a git+schema:// URL? if (strstr(nametmp, "git+") && strstr(nametmp, "://")) { |