summaryrefslogtreecommitdiff
path: root/src/state.c
diff options
context:
space:
mode:
authorTimo Teras <timo.teras@iki.fi>2009-08-19 15:37:21 +0300
committerTimo Teras <timo.teras@iki.fi>2009-08-19 15:37:21 +0300
commitf936d78d5fa6fd3457ae9b1a3eeab3580cd82ea2 (patch)
tree3f0ddca7d046be358369d8fea74e3d3d306b9515 /src/state.c
parentf9b2035897ae0d4e0ad0f45b39a318d019b76fe3 (diff)
downloadapk-tools-f936d78d5fa6fd3457ae9b1a3eeab3580cd82ea2.tar.gz
apk-tools-f936d78d5fa6fd3457ae9b1a3eeab3580cd82ea2.tar.bz2
apk-tools-f936d78d5fa6fd3457ae9b1a3eeab3580cd82ea2.tar.xz
apk-tools-f936d78d5fa6fd3457ae9b1a3eeab3580cd82ea2.zip
state: require an available package for re-installs
otherwise we would not be able to pick a package that exists as a candidate for re-installation. fixes #138.
Diffstat (limited to 'src/state.c')
-rw-r--r--src/state.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/state.c b/src/state.c
index e308f48..94afe86 100644
--- a/src/state.c
+++ b/src/state.c
@@ -310,7 +310,8 @@ int apk_state_lock_dependency(struct apk_state *state,
continue;
}
- if (apk_flags & APK_PREFER_AVAILABLE) {
+ if ((apk_flags & APK_PREFER_AVAILABLE) ||
+ (name->flags & APK_NAME_REINSTALL)) {
if (latest->repos != 0 && pkg->repos == 0)
continue;