summaryrefslogtreecommitdiff
path: root/src/upgrade.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-06-12 15:25:16 +0300
committerTimo Teräs <timo.teras@iki.fi>2013-06-13 18:22:00 +0300
commit59678309ea7350a159a3f5ee61c2fb5218dee6d5 (patch)
tree92c9d2dd24da6f628683b58e93b1a881804cd4fa /src/upgrade.c
parente7fd4d03bfd430053cca5161846889d5e2b1e2a1 (diff)
downloadapk-tools-59678309ea7350a159a3f5ee61c2fb5218dee6d5.tar.gz
apk-tools-59678309ea7350a159a3f5ee61c2fb5218dee6d5.tar.bz2
apk-tools-59678309ea7350a159a3f5ee61c2fb5218dee6d5.tar.xz
apk-tools-59678309ea7350a159a3f5ee61c2fb5218dee6d5.zip
solver: corner case fixes
- try harder to not change anything during self-upgrade - also honor locking to packages that where earlier used in merging common dependencies - clarify upgrade applet help messages
Diffstat (limited to 'src/upgrade.c')
-rw-r--r--src/upgrade.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/upgrade.c b/src/upgrade.c
index 1768795..60b19ec 100644
--- a/src/upgrade.c
+++ b/src/upgrade.c
@@ -60,7 +60,7 @@ int apk_do_self_upgrade(struct apk_database *db, unsigned short solver_flags)
goto ret;
}
- if (changeset.num_install + changeset.num_remove + changeset.num_adjust == 0)
+ if (changeset.num_total_changes == 0)
goto ret;
if (apk_flags & APK_SIMULATE) {
@@ -130,16 +130,17 @@ static int upgrade_main(void *ctx, struct apk_database *db, int argc, char **arg
static struct apk_option upgrade_options[] = {
{ 'a', "available",
- "Re-install or downgrade if currently installed package is not "
- "currently available from any repository" },
+ "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" },
{ 0x10000, "no-self-upgrade",
"Do not do early upgrade of 'apk-tools' package" },
};
static struct apk_applet apk_upgrade = {
.name = "upgrade",
- .help = "Upgrade (or downgrade with -a) the currently installed "
- "packages to versions available in repositories.",
+ .help = "Upgrade currently installed packages to match repositories.",
.open_flags = APK_OPENF_WRITE,
.context_size = sizeof(struct upgrade_ctx),
.num_options = ARRAY_SIZE(upgrade_options),