diff options
Diffstat (limited to 'src/state.c')
-rw-r--r-- | src/state.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/state.c b/src/state.c index 28a411f..c723460 100644 --- a/src/state.c +++ b/src/state.c @@ -319,7 +319,9 @@ int apk_state_lock_dependency(struct apk_state *state, if (apk_flags & APK_UPGRADE) { use = latest; } else { - if (installed != NULL) + if (installed != NULL && + (installed->repos != 0 || + !(name->flags & APK_NAME_REINSTALL))) use = installed; else use = latest; @@ -500,7 +502,7 @@ int apk_state_lock_name(struct apk_state *state, } /* If the chosen package is installed, all is done here */ - if (oldpkg == newpkg) + if (oldpkg == newpkg && !(newpkg->name->flags & APK_NAME_REINSTALL)) return 0; /* Track change */ |