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.cute-signatures
parent
5b6c6e3573
commit
b62d252b7b
16
src/add.c
16
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,
|
||||
|
|
149
src/apk.c
149
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);
|
||||
print_usage("<COMMAND>", "[<args>...]", default_optgroups);
|
||||
} 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");
|
||||
}
|
||||
} 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");
|
||||
|
|
|
@ -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;
|
||||
|
|
12
src/audit.c
12
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),
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
13
src/fetch.c
13
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,
|
||||
|
|
12
src/fix.c
12
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,
|
||||
|
|
15
src/index.c
15
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,
|
||||
|
|
31
src/info.c
31
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,
|
||||
|
|
15
src/list.c
15
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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
15
src/search.c
15
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,
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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),
|
||||
|
|
13
src/ver.c
13
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 },
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue