summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2020-01-16 17:31:38 -0500
committerTimo Teräs <timo.teras@iki.fi>2020-01-26 09:03:18 +0200
commitb62d252b7b51cd4ca8030577849842b07e1913fb (patch)
tree657a053d882c5d642e3700862fc65795c5d22152
parent5b6c6e3573f241b19a174ea74d8258f4b547d860 (diff)
downloadapk-tools-b62d252b7b51cd4ca8030577849842b07e1913fb.tar.gz
apk-tools-b62d252b7b51cd4ca8030577849842b07e1913fb.tar.bz2
apk-tools-b62d252b7b51cd4ca8030577849842b07e1913fb.tar.xz
apk-tools-b62d252b7b51cd4ca8030577849842b07e1913fb.zip
Update apk to make man pages sole source of truth
Detailed docs have been removed from the apk binaries, in favor of git-style short summaries of each command.
-rw-r--r--src/add.c16
-rw-r--r--src/apk.c149
-rw-r--r--src/apk_applet.h2
-rw-r--r--src/audit.c12
-rw-r--r--src/cache.c8
-rw-r--r--src/del.c4
-rw-r--r--src/dot.c6
-rw-r--r--src/fetch.c13
-rw-r--r--src/fix.c12
-rw-r--r--src/index.c15
-rw-r--r--src/info.c31
-rw-r--r--src/list.c15
-rw-r--r--src/manifest.c1
-rw-r--r--src/policy.c1
-rw-r--r--src/search.c15
-rw-r--r--src/stats.c1
-rw-r--r--src/update.c1
-rw-r--r--src/upgrade.c19
-rw-r--r--src/ver.c13
-rw-r--r--src/verify.c1
20 files changed, 107 insertions, 228 deletions
diff --git a/src/add.c b/src/add.c
index 7e15f10..0292995 100644
--- a/src/add.c
+++ b/src/add.c
@@ -46,16 +46,10 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_applet[] = {
- { 0x10000, "initdb", "Initialize database" },
- { 'u', "upgrade", "Prefer to upgrade package" },
- { 'l', "latest",
- "Select latest version of package (if it is not pinned), and "
- "print error if it cannot be installed due to other dependencies" },
- { 't', "virtual",
- "Instead of adding all the packages to 'world', create a new virtual "
- "package with the listed dependencies and add that to 'world'; the "
- "actions of the command are easily reverted by deleting the virtual "
- "package", required_argument, "NAME" },
+ { 0x10000, "initdb" },
+ { 'u', "upgrade" },
+ { 'l', "latest" },
+ { 't', "virtual", required_argument, "NAME" },
};
static const struct apk_option_group optgroup_applet = {
@@ -202,8 +196,6 @@ static int add_main(void *ctx, struct apk_database *db, struct apk_string_array
static struct apk_applet apk_add = {
.name = "add",
- .help = "Add PACKAGEs to 'world' and install (or upgrade) "
- "them, while ensuring that all dependencies are met",
.arguments = "PACKAGE...",
.open_flags = APK_OPENF_WRITE,
.command_groups = APK_COMMAND_GROUP_INSTALL,
diff --git a/src/apk.c b/src/apk.c
index 57ac46b..2b4a41d 100644
--- a/src/apk.c
+++ b/src/apk.c
@@ -191,49 +191,39 @@ static int option_parse_global(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_global[] = {
- { 'h', "help", "Show generic help or applet specific help" },
- { 'p', "root", "Install packages to DIR",
- required_argument, "DIR" },
- { 'X', "repository", "Use packages from REPO",
- required_argument, "REPO" },
- { 'q', "quiet", "Print less information" },
- { 'v', "verbose", "Print more information (can be doubled)" },
- { 'i', "interactive", "Ask confirmation for certain operations" },
- { 'V', "version", "Print program version and exit" },
- { 'f', "force", "Enable selected --force-* (deprecated)" },
- { 0x125, "force-binary-stdout", "Continue even if binary data is to be output" },
- { 0x122, "force-broken-world", "Continue even if 'world' cannot be satisfied" },
- { 0x124, "force-non-repository", "Continue even if packages may be lost on reboot" },
- { 0x121, "force-old-apk", "Continue even if packages use unsupported features" },
- { 0x120, "force-overwrite", "Overwrite files in other packages" },
- { 0x123, "force-refresh", "Do not use cached files (local or from proxy)" },
- { 'U', "update-cache", "Alias for --cache-max-age 1" },
- { 0x101, "progress", "Show a progress bar" },
- { 0x10f, "progress-fd", "Write progress to fd", required_argument, "FD" },
- { 0x110, "no-progress", "Disable progress bar even for TTYs" },
- { 0x106, "purge", "Delete also modified configuration files (pkg removal) "
- "and uninstalled packages from cache (cache clean)" },
- { 0x103, "allow-untrusted", "Install packages with untrusted signature or no signature" },
- { 0x105, "wait", "Wait for TIME seconds to get an exclusive "
- "repository lock before failing",
- required_argument, "TIME" },
- { 0x107, "keys-dir", "Override directory of trusted keys",
- required_argument, "KEYSDIR" },
- { 0x108, "repositories-file", "Override repositories file",
- required_argument, "REPOFILE" },
- { 0x109, "no-network", "Do not use network (cache is still used)" },
- { 0x115, "no-cache", "Do not use any local cache path" },
- { 0x116, "cache-dir", "Override cache directory",
- required_argument, "CACHEDIR" },
- { 0x119, "cache-max-age", "Maximum AGE (in minutes) for index in cache before refresh",
- required_argument, "AGE" },
- { 0x112, "arch", "Use architecture with --root",
- required_argument, "ARCH" },
- { 0x114, "print-arch", "Print default arch and exit" },
+ { 'h', "help" },
+ { 'p', "root", required_argument, "DIR" },
+ { 'X', "repository", required_argument, "REPO" },
+ { 'q', "quiet" },
+ { 'v', "verbose" },
+ { 'i', "interactive" },
+ { 'V', "version" },
+ { 'f', "force" },
+ { 0x125, "force-binary-stdout" },
+ { 0x122, "force-broken-world" },
+ { 0x124, "force-non-repository" },
+ { 0x121, "force-old-apk" },
+ { 0x120, "force-overwrite" },
+ { 0x123, "force-refresh" },
+ { 'U', "update-cache" },
+ { 0x101, "progress" },
+ { 0x10f, "progress-fd", required_argument, "FD" },
+ { 0x110, "no-progress" },
+ { 0x106, "purge" },
+ { 0x103, "allow-untrusted" },
+ { 0x105, "wait", required_argument, "TIME" },
+ { 0x107, "keys-dir", required_argument, "KEYSDIR" },
+ { 0x108, "repositories-file", required_argument, "REPOFILE" },
+ { 0x109, "no-network" },
+ { 0x115, "no-cache" },
+ { 0x116, "cache-dir", required_argument, "CACHEDIR" },
+ { 0x119, "cache-max-age", required_argument, "AGE" },
+ { 0x112, "arch", required_argument, "ARCH" },
+ { 0x114, "print-arch" },
#ifdef TEST_MODE
- { 0x200, "test-repo", "Repository", required_argument, "REPO" },
- { 0x201, "test-instdb", "Installed db", required_argument, "INSTALLED" },
- { 0x202, "test-world", "World", required_argument, "WORLD DEPS" },
+ { 0x200, "test-repo", required_argument, "REPO" },
+ { 0x201, "test-instdb", required_argument, "INSTALLED" },
+ { 0x202, "test-world", required_argument, "WORLD DEPS" },
#endif
};
@@ -275,13 +265,12 @@ static int option_parse_commit(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_commit[] = {
- { 's', "simulate", "Show what would be done without actually doing it" },
- { 0x102, "clean-protected", "Do not create .apk-new files in configuration dirs" },
- { 0x111, "overlay-from-stdin", "Read list of overlay files from stdin" },
- { 0x113, "no-scripts", "Do not execute any scripts" },
- { 0x117, "no-commit-hooks", "Skip pre/post hook scripts (but not other scripts)" },
- { 0x118, "initramfs-diskless-boot",
- "Enables options for diskless initramfs boot (e.g. skip hooks)" },
+ { 's', "simulate" },
+ { 0x102, "clean-protected" },
+ { 0x111, "overlay-from-stdin" },
+ { 0x113, "no-scripts" },
+ { 0x117, "no-commit-hooks" },
+ { 0x118, "initramfs-diskless-boot" },
};
const struct apk_option_group optgroup_commit = {
@@ -333,71 +322,13 @@ static void print_usage(const char *cmd, const char *args, const struct apk_opti
printf("\n");
}
-static void print_options(int num_opts, const struct apk_option *opts)
-{
- struct apk_indent indent = { .indent = 26 };
- char word[128];
- int i;
-
- for (i = 0; i < num_opts; i++) {
- format_option(word, sizeof(word), &opts[i], ", ");
- indent.x = printf(" %-*s", indent.indent - 3, word);
- apk_print_indented_words(&indent, opts[i].help);
- printf("\n");
- }
-}
-
-static void print_applets(const char *desc, unsigned int group)
-{
- struct apk_applet *a;
-
- printf("\n%s\n", desc);
-
- foreach_applet(a) {
- if (group && (a->command_groups & group) != group)
- continue;
-
- struct apk_indent indent = { .indent = 12 };
- indent.x = printf(" %-*s", indent.indent - 3, a->name);
- apk_print_indented_words(&indent, a->help);
- printf("\n");
- }
-}
-
static int usage(struct apk_applet *applet)
{
- const struct apk_option_group **optgroups = default_optgroups;
- int i;
-
version();
if (applet == NULL) {
- if (apk_verbosity > 1) {
- print_usage("COMMAND", "[ARGS]...", default_optgroups);
- print_applets("The following commands are available:", 0);
- } else {
- print_applets("Installing and removing packages:", APK_COMMAND_GROUP_INSTALL);
- print_applets("System maintenance:", APK_COMMAND_GROUP_SYSTEM);
- print_applets("Querying information about packages:", APK_COMMAND_GROUP_QUERY);
- print_applets("Repository maintenance:", APK_COMMAND_GROUP_REPO);
-
- printf("\nUse apk <command> --help for command-specific help.\n");
- printf("Use apk --help --verbose for a full command listing.\n");
- }
+ print_usage("<COMMAND>", "[<args>...]", default_optgroups);
} else {
- struct apk_indent indent = { .indent = 2 };
-
- if (applet->optgroups[0]) optgroups = applet->optgroups;
- print_usage(applet->name, applet->arguments, applet->optgroups);
- printf("\nDescription:\n");
- apk_print_indented_words(&indent, applet->help);
- printf("\n");
- }
-
- if (applet != NULL || apk_verbosity > 1) {
- for (i = 0; optgroups[i]; i++) {
- printf("\n%s options:\n", optgroups[i]->name);
- print_options(optgroups[i]->num_options, optgroups[i]->options);
- }
+ print_usage(applet->name, applet->arguments, &applet->optgroups[1]);
}
printf("\nThis apk has coffee making abilities.\n");
diff --git a/src/apk_applet.h b/src/apk_applet.h
index 0c7687e..1c637a6 100644
--- a/src/apk_applet.h
+++ b/src/apk_applet.h
@@ -25,7 +25,6 @@
struct apk_option {
int val;
const char *name;
- const char *help;
int has_arg;
const char *arg_name;
};
@@ -44,7 +43,6 @@ struct apk_applet {
const char *name;
const char *arguments;
- const char *help;
const struct apk_option_group *optgroups[4];
unsigned int open_flags, forced_flags, forced_force, command_groups;
diff --git a/src/audit.c b/src/audit.c
index 0c1fbfc..4f86b40 100644
--- a/src/audit.c
+++ b/src/audit.c
@@ -64,12 +64,11 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_applet[] = {
- { 0x10000, "backup", "List all modified configuration files (in "
- "protected_paths.d) that need to be backed up" },
- { 0x10001, "system", "Verify checksums of all installed non-configuration files " },
- { 0x10002, "check-permissions", "Check file and directory uid/gid/mode too" },
- { 'r', "recursive", "List individually all entries in new directories" },
- { 0x10003, "packages", "List only the changed packages (or names only with -q)" },
+ { 0x10000, "backup" },
+ { 0x10001, "system" },
+ { 0x10002, "check-permissions" },
+ { 'r', "recursive" },
+ { 0x10003, "packages" },
};
static const struct apk_option_group optgroup_applet = {
@@ -347,7 +346,6 @@ static int audit_main(void *ctx, struct apk_database *db, struct apk_string_arra
static struct apk_applet apk_audit = {
.name = "audit",
- .help = "Audit the directories for changes",
.arguments = "[directory to audit]...",
.open_flags = APK_OPENF_READ|APK_OPENF_NO_SCRIPTS|APK_OPENF_NO_REPOS,
.context_size = sizeof(struct audit_ctx),
diff --git a/src/cache.c b/src/cache.c
index bea241b..d663f56 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -48,10 +48,8 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_applet[] = {
- { 'u', "upgrade", "Prefer to upgrade package" },
- { 'l', "latest",
- "Select latest version of package (if it is not pinned), and "
- "print error if it cannot be installed due to other dependencies" },
+ { 'u', "upgrade" },
+ { 'l', "latest" },
};
static const struct apk_option_group optgroup_applet = {
@@ -184,8 +182,6 @@ err:
static struct apk_applet apk_cache = {
.name = "cache",
- .help = "Download missing PACKAGEs to cache and/or delete "
- "unneeded files from cache",
.arguments = "sync | clean | download",
.open_flags = APK_OPENF_READ|APK_OPENF_NO_SCRIPTS|APK_OPENF_CACHE_WRITE,
.command_groups = APK_COMMAND_GROUP_SYSTEM,
diff --git a/src/del.c b/src/del.c
index a67bc23..c48cd21 100644
--- a/src/del.c
+++ b/src/del.c
@@ -36,8 +36,7 @@ static int option_parse_applet(void *pctx, struct apk_db_options *dbopts, int op
}
static const struct apk_option options_applet[] = {
- { 'r', "rdepends", "Recursively delete all top-level reverse "
- "dependencies too" },
+ { 'r', "rdepends" },
};
static const struct apk_option_group optgroup_applet = {
@@ -168,7 +167,6 @@ static int del_main(void *pctx, struct apk_database *db, struct apk_string_array
static struct apk_applet apk_del = {
.name = "del",
- .help = "Remove PACKAGEs from 'world' and uninstall them",
.arguments = "PACKAGE...",
.open_flags = APK_OPENF_WRITE | APK_OPENF_NO_AUTOUPDATE,
.command_groups = APK_COMMAND_GROUP_INSTALL,
diff --git a/src/dot.c b/src/dot.c
index 7dda73e..7b48486 100644
--- a/src/dot.c
+++ b/src/dot.c
@@ -43,9 +43,8 @@ static int option_parse_applet(void *pctx, struct apk_db_options *dbopts, int op
}
static const struct apk_option options_applet[] = {
- { 0x10000, "errors", "Output only parts of the graph which are considered "
- "erroneous: e.g. cycles and missing packages" },
- { 0x10001, "installed", "Consider only installed packages" },
+ { 0x10000, "errors" },
+ { 0x10001, "installed" },
};
static const struct apk_option_group optgroup_applet = {
@@ -169,7 +168,6 @@ static int dot_main(void *pctx, struct apk_database *db, struct apk_string_array
static struct apk_applet apk_dot = {
.name = "dot",
- .help = "Generate graphviz graphs",
.arguments = "PKGMASK...",
.open_flags = APK_OPENF_READ | APK_OPENF_NO_STATE,
.command_groups = APK_COMMAND_GROUP_QUERY,
diff --git a/src/fetch.c b/src/fetch.c
index 9a7c46a..dacc7d1 100644
--- a/src/fetch.c
+++ b/src/fetch.c
@@ -92,13 +92,11 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_applet[] = {
- { 'L', "link", "Create hard links if possible" },
- { 'R', "recursive", "Fetch the PACKAGE and all its dependencies" },
- { 0x104, "simulate", "Show what would be done without actually doing it" },
- { 's', "stdout", "Dump the .apk to stdout (incompatible "
- "with -o, -R, --progress)" },
- { 'o', "output", "Directory to place the PACKAGEs to",
- required_argument, "DIR" },
+ { 'L', "link" },
+ { 'R', "recursive" },
+ { 0x104, "simulate" },
+ { 's', "stdout" },
+ { 'o', "output", required_argument, "DIR" },
};
static const struct apk_option_group optgroup_applet = {
@@ -345,7 +343,6 @@ static int fetch_main(void *pctx, struct apk_database *db, struct apk_string_arr
static struct apk_applet apk_fetch = {
.name = "fetch",
- .help = "Download PACKAGEs from global repositories to a local directory",
.arguments = "PACKAGE...",
.open_flags = APK_OPENF_READ | APK_OPENF_NO_STATE,
.command_groups = APK_COMMAND_GROUP_REPO,
diff --git a/src/fix.c b/src/fix.c
index d28d913..8a7c6b2 100644
--- a/src/fix.c
+++ b/src/fix.c
@@ -50,11 +50,11 @@ static int option_parse_applet(void *pctx, struct apk_db_options *dbopts, int op
}
static const struct apk_option options_applet[] = {
- { 'd', "depends", "Fix all dependencies too" },
- { 'r', "reinstall", "Reinstall the package (default)" },
- { 'u', "upgrade", "Prefer to upgrade package" },
- { 'x', "xattr", "Fix packages with broken xattrs" },
- { 0x10000, "directory-permissions", "Reset all directory permissions" },
+ { 'd', "depends" },
+ { 'r', "reinstall" },
+ { 'u', "upgrade" },
+ { 'x', "xattr" },
+ { 0x10000, "directory-permissions" },
};
static const struct apk_option_group optgroup_applet = {
@@ -115,8 +115,6 @@ static int fix_main(void *pctx, struct apk_database *db, struct apk_string_array
static struct apk_applet apk_fix = {
.name = "fix",
- .help = "Repair package or upgrade it without modifying main "
- "dependencies",
.arguments = "PACKAGE...",
.open_flags = APK_OPENF_WRITE,
.command_groups = APK_COMMAND_GROUP_SYSTEM,
diff --git a/src/index.c b/src/index.c
index 09c32ba..2508e9e 100644
--- a/src/index.c
+++ b/src/index.c
@@ -56,16 +56,10 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_applet[] = {
- { 'o', "output", "Write the generated index to FILE",
- required_argument, "FILE" },
- { 'x', "index", "Read INDEX to speed up new index creation by reusing "
- "the information from an old index",
- required_argument, "INDEX" },
- { 'd', "description", "Embed TEXT as description and version "
- "information of the repository index",
- required_argument, "TEXT" },
- { 0x10000, "rewrite-arch", "Use ARCH as architecture for all packages",
- required_argument, "ARCH" },
+ { 'o', "output", required_argument, "FILE" },
+ { 'x', "index", required_argument, "INDEX" },
+ { 'd', "description", required_argument, "TEXT" },
+ { 0x10000, "rewrite-arch", required_argument, "ARCH" },
};
static const struct apk_option_group optgroup_applet = {
@@ -259,7 +253,6 @@ static int index_main(void *ctx, struct apk_database *db, struct apk_string_arra
static struct apk_applet apk_index = {
.name = "index",
- .help = "Create repository index file from FILEs",
.arguments = "FILE...",
.open_flags = APK_OPENF_READ | APK_OPENF_NO_STATE | APK_OPENF_NO_REPOS,
.command_groups = APK_COMMAND_GROUP_REPO,
diff --git a/src/info.c b/src/info.c
index e9a2b06..89e5521 100644
--- a/src/info.c
+++ b/src/info.c
@@ -450,21 +450,21 @@ static int info_main(void *ctx, struct apk_database *db, struct apk_string_array
}
static const struct apk_option options_applet[] = {
- { 'L', "contents", "List contents of the PACKAGE" },
- { 'e', "installed", "Check if PACKAGE is installed" },
- { 'W', "who-owns", "Print the package owning the specified file" },
- { 'R', "depends", "List packages that the PACKAGE depends on" },
- { 'P', "provides", "List virtual packages provided by PACKAGE" },
- { 'r', "rdepends", "List all packages depending on PACKAGE" },
- { 0x10000, "replaces", "List packages whom files PACKAGE might replace" },
- { 0x10002, "install-if", "List the PACKAGE's install_if rule" },
- { 0x10003, "rinstall-if", "List all packages having install_if referencing PACKAGE" },
- { 'w', "webpage", "Show URL for more information about PACKAGE" },
- { 's', "size", "Show installed size of PACKAGE" },
- { 'd', "description", "Print description for PACKAGE" },
- { 0x10001, "license", "Print license for PACKAGE" },
- { 't', "triggers", "Print active triggers of PACKAGE" },
- { 'a', "all", "Print all information about PACKAGE" },
+ { 'L', "contents" },
+ { 'e', "installed" },
+ { 'W', "who-owns" },
+ { 'R', "depends" },
+ { 'P', "provides" },
+ { 'r', "rdepends" },
+ { 0x10000, "replaces" },
+ { 0x10002, "install-if" },
+ { 0x10003, "rinstall-if" },
+ { 'w', "webpage" },
+ { 's', "size" },
+ { 'd', "description" },
+ { 0x10001, "license" },
+ { 't', "triggers" },
+ { 'a', "all" },
};
static const struct apk_option_group optgroup_applet = {
@@ -476,7 +476,6 @@ static const struct apk_option_group optgroup_applet = {
static struct apk_applet apk_info = {
.name = "info",
- .help = "Give detailed information about PACKAGEs or repositories",
.arguments = "PACKAGE...",
.open_flags = APK_OPENF_READ,
.command_groups = APK_COMMAND_GROUP_QUERY,
diff --git a/src/list.c b/src/list.c
index 593e7d2..f121ae5 100644
--- a/src/list.c
+++ b/src/list.c
@@ -227,13 +227,13 @@ static int option_parse_applet(void *pctx, struct apk_db_options *dbopts, int op
}
static const struct apk_option options_applet[] = {
- { 'I', "installed", "List installed packages only" },
- { 'O', "orphaned", "List orphaned packages only" },
- { 'a', "available", "List available packages only" },
- { 'u', "upgradable", "List upgradable packages only" },
- { 'o', "origin", "List packages by origin" },
- { 'd', "depends", "List packages by dependency" },
- { 'P', "providers", "List packages by provider" },
+ { 'I', "installed" },
+ { 'O', "orphaned" },
+ { 'a', "available" },
+ { 'u', "upgradable" },
+ { 'o', "origin" },
+ { 'd', "depends" },
+ { 'P', "providers" },
};
static const struct apk_option_group optgroup_applet = {
@@ -261,7 +261,6 @@ static int list_main(void *pctx, struct apk_database *db, struct apk_string_arra
static struct apk_applet apk_list = {
.name = "list",
- .help = "List packages by PATTERN and other criteria",
.arguments = "PATTERN",
.open_flags = APK_OPENF_READ,
.command_groups = APK_COMMAND_GROUP_QUERY,
diff --git a/src/manifest.c b/src/manifest.c
index a75f771..1106a74 100644
--- a/src/manifest.c
+++ b/src/manifest.c
@@ -124,7 +124,6 @@ static int manifest_main(void *ctx, struct apk_database *db, struct apk_string_a
static struct apk_applet apk_manifest = {
.name = "manifest",
- .help = "Show checksums of package contents",
.arguments = "PACKAGE...",
.open_flags = APK_OPENF_READ,
.command_groups = APK_COMMAND_GROUP_REPO,
diff --git a/src/policy.c b/src/policy.c
index 2fcd265..dc33a0b 100644
--- a/src/policy.c
+++ b/src/policy.c
@@ -70,7 +70,6 @@ static int policy_main(void *ctx, struct apk_database *db, struct apk_string_arr
static struct apk_applet apk_policy = {
.name = "policy",
- .help = "Show repository policy for packages",
.open_flags = APK_OPENF_READ,
.command_groups = APK_COMMAND_GROUP_QUERY,
.main = policy_main,
diff --git a/src/search.c b/src/search.c
index 0b00a3b..fa5b267 100644
--- a/src/search.c
+++ b/src/search.c
@@ -109,13 +109,13 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_applet[] = {
- { 'a', "all", "Show all package versions (instead of latest only)" },
- { 'd', "description", "Search package descriptions (implies -a)" },
- { 'x', "exact", "Require exact match (instead of substring match)" },
- { 'e', NULL, "Synonym for -x (deprecated)" },
- { 'o', "origin", "Print origin package name instead of the subpackage" },
- { 'r', "rdepends", "Print reverse dependencies of package" },
- { 0x10000, "has-origin","List packages that have the given origin" },
+ { 'a', "all" },
+ { 'd', "description" },
+ { 'x', "exact" },
+ { 'e', NULL },
+ { 'o', "origin" },
+ { 'r', "rdepends" },
+ { 0x10000, "has-origin" },
};
static const struct apk_option_group optgroup_applet = {
@@ -206,7 +206,6 @@ static int search_main(void *pctx, struct apk_database *db, struct apk_string_ar
static struct apk_applet apk_search = {
.name = "search",
- .help = "Search package by PATTERNs or by indexed dependencies",
.arguments = "PATTERN",
.open_flags = APK_OPENF_READ | APK_OPENF_NO_STATE,
.command_groups = APK_COMMAND_GROUP_QUERY,
diff --git a/src/stats.c b/src/stats.c
index 5dc2561..33a3285 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -55,7 +55,6 @@ static int stats_main(void *ctx, struct apk_database *db, struct apk_string_arra
static struct apk_applet stats_applet = {
.name = "stats",
- .help = "Show statistics about repositories and installations",
.open_flags = APK_OPENF_READ,
.main = stats_main,
};
diff --git a/src/update.c b/src/update.c
index c7b0926..5742127 100644
--- a/src/update.c
+++ b/src/update.c
@@ -47,7 +47,6 @@ static int update_main(void *ctx, struct apk_database *db, struct apk_string_arr
static struct apk_applet apk_update = {
.name = "update",
- .help = "Update repository indexes from all remote repositories",
.open_flags = APK_OPENF_WRITE,
.forced_force = APK_FORCE_REFRESH,
.command_groups = APK_COMMAND_GROUP_SYSTEM,
diff --git a/src/upgrade.c b/src/upgrade.c
index d1ec36c..f0bf16c 100644
--- a/src/upgrade.c
+++ b/src/upgrade.c
@@ -52,19 +52,11 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_applet[] = {
- { 'a', "available",
- "Resets versioned world dependencies, and changes to prefer "
- "replacing or downgrading packages (instead of holding them) "
- "if the currently installed package is no longer available "
- "from any repository" },
- { 'l', "latest",
- "Select latest version of package (if it is not pinned), and "
- "print error if it cannot be installed due to other dependencies" },
- { 0x10000, "no-self-upgrade",
- "Do not do early upgrade of 'apk-tools' package" },
- { 0x10001, "self-upgrade-only", "Only do self-upgrade" },
- { 0x10002, "ignore", "Ignore the upgrade of PACKAGE. Partial "
- "upgrades not supported, this might break your system."},
+ { 'a', "available" },
+ { 'l', "latest" },
+ { 0x10000, "no-self-upgrade" },
+ { 0x10001, "self-upgrade-only" },
+ { 0x10002, "ignore" },
};
static const struct apk_option_group optgroup_applet = {
@@ -195,7 +187,6 @@ static int upgrade_main(void *ctx, struct apk_database *db, struct apk_string_ar
static struct apk_applet apk_upgrade = {
.name = "upgrade",
- .help = "Upgrade currently installed packages to match repositories",
.open_flags = APK_OPENF_WRITE,
.command_groups = APK_COMMAND_GROUP_SYSTEM,
.context_size = sizeof(struct upgrade_ctx),
diff --git a/src/ver.c b/src/ver.c
index 3a08359..e3508a2 100644
--- a/src/ver.c
+++ b/src/ver.c
@@ -96,12 +96,11 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
}
static const struct apk_option options_applet[] = {
- { 'I', "indexes", "Print description and versions of indexes" },
- { 't', "test", "Compare two given versions, output '<', '=' or '>'" },
- { 'c', "check", "Check the given version strings, output any that are invalid" },
- { 'a', "all", "Consider packages from all repository tags" },
- { 'l', "limit", "Limit output to packages with status matching one of LIMCHARs",
- required_argument, "LIMCHARs" },
+ { 'I', "indexes" },
+ { 't', "test" },
+ { 'c', "check" },
+ { 'a', "all" },
+ { 'l', "limit", required_argument, "LIMCHARs" },
};
static const struct apk_option_group optgroup_applet = {
@@ -199,8 +198,6 @@ static int ver_main(void *pctx, struct apk_database *db, struct apk_string_array
static struct apk_applet apk_ver = {
.name = "version",
- .help = "Compare package versions (in installed database vs. available) "
- "or do tests on literal version strings",
.open_flags = APK_OPENF_READ,
.context_size = sizeof(struct ver_ctx),
.optgroups = { &optgroup_global, &optgroup_applet },
diff --git a/src/verify.c b/src/verify.c
index eb1ca42..098e23c 100644
--- a/src/verify.c
+++ b/src/verify.c
@@ -48,7 +48,6 @@ static int verify_main(void *ctx, struct apk_database *db, struct apk_string_arr
static struct apk_applet apk_verify = {
.name = "verify",
- .help = "Verify package integrity and signature",
.arguments = "FILE...",
.open_flags = APK_OPENF_READ | APK_OPENF_NO_STATE,
.command_groups = APK_COMMAND_GROUP_REPO,