summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2018-09-11 10:34:14 +0300
committerTimo Teräs <timo.teras@iki.fi>2018-09-11 10:34:14 +0300
commit4c6fc8147444d989521b31e2c7ce297a9681296f (patch)
tree1a44d2deb70f4af58333fae0003965816fb2cc55 /src
parent11bd821c691a2d19f9ad4e77e78e3666681d7802 (diff)
downloadapk-tools-4c6fc8147444d989521b31e2c7ce297a9681296f.tar.gz
apk-tools-4c6fc8147444d989521b31e2c7ce297a9681296f.tar.bz2
apk-tools-4c6fc8147444d989521b31e2c7ce297a9681296f.tar.xz
apk-tools-4c6fc8147444d989521b31e2c7ce297a9681296f.zip
add: add --latest flag to help analyze why upgrade fails
Diffstat (limited to 'src')
-rw-r--r--src/add.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/add.c b/src/add.c
index a28425e..23b8dd4 100644
--- a/src/add.c
+++ b/src/add.c
@@ -32,6 +32,9 @@ static int option_parse_applet(void *ctx, struct apk_db_options *dbopts, int opt
case 'u':
actx->solver_flags |= APK_SOLVERF_UPGRADE;
break;
+ case 'l':
+ actx->solver_flags |= APK_SOLVERF_LATEST;
+ break;
case 't':
actx->virtpkg = optarg;
break;
@@ -44,6 +47,9 @@ 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 "