aboutsummaryrefslogtreecommitdiff
path: root/src/cli/stasis_indexer
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunkeler@gmail.com>2026-05-10 15:31:06 -0400
committerJoseph Hunkeler <jhunkeler@gmail.com>2026-05-10 15:38:16 -0400
commit3f10306c6ac67eaccbc11b22eed26f6ce2725bfe (patch)
tree948538817d51203173c824c62e90fbe378752080 /src/cli/stasis_indexer
parentdfc38629724eb4f6718cb73ff3de108871e377bd (diff)
downloadstasis-3f10306c6ac67eaccbc11b22eed26f6ce2725bfe.tar.gz
Update SYS* macro calls
Diffstat (limited to 'src/cli/stasis_indexer')
-rw-r--r--src/cli/stasis_indexer/args.c2
-rw-r--r--src/cli/stasis_indexer/helpers.c8
-rw-r--r--src/cli/stasis_indexer/junitxml_report.c2
-rw-r--r--src/cli/stasis_indexer/readmes.c4
-rw-r--r--src/cli/stasis_indexer/stasis_indexer_main.c28
5 files changed, 22 insertions, 22 deletions
diff --git a/src/cli/stasis_indexer/args.c b/src/cli/stasis_indexer/args.c
index e77c0b7..0d0e9b9 100644
--- a/src/cli/stasis_indexer/args.c
+++ b/src/cli/stasis_indexer/args.c
@@ -23,7 +23,7 @@ void usage(char *name) {
const int maxopts = sizeof(long_options) / sizeof(long_options[0]);
char *opts = calloc(maxopts + 1, sizeof(char));
if (!opts) {
- SYSERROR("%s", "Unable to allocate memory for options array");
+ SYSERROR("Unable to allocate memory for options array");
exit(1);
}
for (int i = 0; i < maxopts; i++) {
diff --git a/src/cli/stasis_indexer/helpers.c b/src/cli/stasis_indexer/helpers.c
index a4999a6..1bb5862 100644
--- a/src/cli/stasis_indexer/helpers.c
+++ b/src/cli/stasis_indexer/helpers.c
@@ -167,7 +167,7 @@ int micromamba_configure(const struct Delivery *ctx, struct MicromambaInfo *m) {
// 1 = nul terminator
char *pathvar = calloc(pathvar_len, sizeof(*pathvar));
if (!pathvar) {
- SYSERROR("%s", "Unable to allocate bytes for temporary path string");
+ SYSERROR("Unable to allocate bytes for temporary path string");
exit(1);
}
snprintf(pathvar, pathvar_len, "%s/bin:%s:%s", m->conda_prefix, m->micromamba_prefix, getenv("PATH"));
@@ -252,12 +252,12 @@ int get_files(struct StrList **out, const char *path, const char *pattern, ...)
char userpattern[PATH_MAX] = {0};
const int len = vsnprintf(userpattern, sizeof(userpattern), pattern, args);
if (len < 0) {
- SYSERROR("%s", "vsnprintf failed\n");
+ SYSERROR("vsnprintf failed");
va_end(args);
return -1;
}
if ((size_t) len > sizeof(userpattern)) {
- fprintf(stderr, "WARNING: %s: userpattern truncated!\n", __FUNCTION__);
+ SYSWARN("%s: userpattern truncated!", __FUNCTION__);
}
va_end(args);
if (!strlen(userpattern)) {
@@ -299,7 +299,7 @@ struct StrList *get_docker_images(struct Delivery *ctx, char *pattern) {
char *tarball = NULL;
asprintf(&tarball, "%s*.tar*", pattern);
if (!tarball) {
- SYSERROR("%s", "Unable to allocate bytes for docker image wildcard pattern");
+ SYSERROR("Unable to allocate bytes for docker image wildcard pattern");
return NULL;
}
tolower_s(tarball);
diff --git a/src/cli/stasis_indexer/junitxml_report.c b/src/cli/stasis_indexer/junitxml_report.c
index 6740c07..b767179 100644
--- a/src/cli/stasis_indexer/junitxml_report.c
+++ b/src/cli/stasis_indexer/junitxml_report.c
@@ -39,7 +39,7 @@ static int write_report_output(struct Delivery *ctx, FILE *destfp, const char *x
char result_outfile[PATH_MAX] = {0};
char *short_name_pattern = NULL;
if (asprintf(&short_name_pattern, "-%s", ctx->info.release_name) < 0 || !short_name_pattern) {
- SYSERROR("%s", "unable to allocate bytes for short name pattern");
+ SYSERROR("unable to allocate bytes for short name pattern");
guard_free(bname);
return -1;
}
diff --git a/src/cli/stasis_indexer/readmes.c b/src/cli/stasis_indexer/readmes.c
index 7357fca..d740367 100644
--- a/src/cli/stasis_indexer/readmes.c
+++ b/src/cli/stasis_indexer/readmes.c
@@ -66,7 +66,7 @@ int indexer_readmes(struct Delivery **ctx, const size_t nelem) {
if (asprintf(&pattern, "*%s*%s*",
latest_deliveries[i]->info.build_number,
strstr((*ctx)->rules.release_fmt, "%p") ? latest_deliveries[i]->meta.python_compact : "" ) < 0) {
- SYSERROR("%s", "Unable to allocate bytes for pattern");
+ SYSERROR("Unable to allocate bytes for pattern");
fclose(indexfp);
return -1;
}
@@ -105,7 +105,7 @@ int indexer_readmes(struct Delivery **ctx, const size_t nelem) {
current->info.build_number,
strstr((*ctx)->rules.release_fmt, "%p") ? current->meta.python_compact : "" );
if (!pattern) {
- SYSERROR("%s", "Unable to allocate bytes for pattern");
+ SYSERROR("Unable to allocate bytes for pattern");
fclose(indexfp);
return -1;
}
diff --git a/src/cli/stasis_indexer/stasis_indexer_main.c b/src/cli/stasis_indexer/stasis_indexer_main.c
index ed938b7..33b86c2 100644
--- a/src/cli/stasis_indexer/stasis_indexer_main.c
+++ b/src/cli/stasis_indexer/stasis_indexer_main.c
@@ -143,7 +143,7 @@ void indexer_init_dirs(struct Delivery *ctx, const char *workdir) {
char *user_dir = expandpath("~/.stasis/indexer");
if (!user_dir) {
- SYSERROR("%s", "expandpath failed");
+ SYSERROR("expandpath failed");
}
path_store(&ctx->storage.output_dir, PATH_MAX, ctx->storage.root, "");
@@ -164,7 +164,7 @@ void indexer_init_dirs(struct Delivery *ctx, const char *workdir) {
snprintf(newpath, sizeof(newpath), "%s/bin:%s", ctx->storage.tools_dir, getenv("PATH"));
setenv("PATH", newpath, 1);
} else {
- SYSERROR("%s", "environment variable PATH is undefined. Unable to continue.");
+ SYSERROR("environment variable PATH is undefined. Unable to continue.");
exit(1);
}
}
@@ -213,7 +213,7 @@ int main(const int argc, char *argv[]) {
rootdirs_total = argc - current_index;
rootdirs = calloc(rootdirs_total + 1, sizeof(*rootdirs));
if (!rootdirs) {
- SYSERROR("%s", "unable to allocate memory for rootdirs array");
+ SYSERROR("unable to allocate memory for rootdirs array");
exit(1);
}
@@ -228,7 +228,7 @@ int main(const int argc, char *argv[]) {
// use first positional argument
rootdirs[i] = realpath(argv[optind], NULL);
if (!rootdirs[i]) {
- SYSERROR("%s", "Unable to allocate memory for root directory");
+ SYSERROR("Unable to allocate memory for root directory");
exit(1);
}
optind++;
@@ -311,7 +311,7 @@ int main(const int argc, char *argv[]) {
rootdirs_total > 1 ? "Merging" : "Indexing",
rootdirs_total > 1 ? "directories" : "directory");
if (indexer_combine_rootdirs(workdir, rootdirs, rootdirs_total)) {
- SYSERROR("%s", "Copy operation failed");
+ SYSERROR("Copy operation failed");
rmtree(workdir);
exit(1);
}
@@ -326,19 +326,19 @@ int main(const int argc, char *argv[]) {
struct MicromambaInfo m;
if (micromamba_configure(&ctx, &m)) {
- SYSERROR("%s", "Unable to configure micromamba");
+ SYSERROR("Unable to configure micromamba");
exit(1);
}
msg(STASIS_MSG_L1, "Indexing conda packages\n");
if (indexer_conda(&ctx, m)) {
- SYSERROR("%s", "Conda package indexing operation failed");
+ SYSERROR("Conda package indexing operation failed");
exit(1);
}
msg(STASIS_MSG_L1, "Indexing wheel packages\n");
if (indexer_wheels(&ctx)) {
- SYSERROR("%s", "Python package indexing operation failed");
+ SYSERROR("Python package indexing operation failed");
exit(1);
}
@@ -354,7 +354,7 @@ int main(const int argc, char *argv[]) {
struct Delivery **local = calloc(strlist_count(metafiles) + 1, sizeof(*local));
if (!local) {
- SYSERROR("%s", "Unable to allocate bytes for local delivery context array");
+ SYSERROR("Unable to allocate bytes for local delivery context array");
exit(1);
}
@@ -375,26 +375,26 @@ int main(const int argc, char *argv[]) {
msg(STASIS_MSG_L1, "Generating links to latest release iteration\n");
if (indexer_symlinks(local, strlist_count(metafiles))) {
- SYSERROR("%s", "Link generation failed");
+ SYSERROR("Link generation failed");
exit(1);
}
msg(STASIS_MSG_L1, "Generating README.md\n");
if (indexer_readmes(local, strlist_count(metafiles))) {
- SYSERROR("%s", "README indexing operation failed");
+ SYSERROR("README indexing operation failed");
exit(1);
}
msg(STASIS_MSG_L1, "Indexing test results\n");
if (indexer_junitxml_report(local, strlist_count(metafiles))) {
- SYSERROR("%s", "Test result indexing operation failed");
+ SYSERROR("Test result indexing operation failed");
exit(1);
}
if (do_html) {
msg(STASIS_MSG_L1, "Generating HTML indexes\n");
if (indexer_make_website(local)) {
- SYSERROR("%s", "Site creation failed");
+ SYSERROR("Site creation failed");
exit(1);
}
}
@@ -449,7 +449,7 @@ int main(const int argc, char *argv[]) {
}
if (system(cmd)) {
- SYSERROR("%s", "Copy operation failed");
+ SYSERROR("Copy operation failed");
rmtree(workdir);
exit(1);
}