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.
cute-signatures
Timo Teras 2009-08-19 15:37:21 +03:00
parent f9b2035897
commit f936d78d5f
1 changed files with 2 additions and 1 deletions

View File

@ -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;