From 1fea5639b455ae4267a7dc17ef19b8d2506978b0 Mon Sep 17 00:00:00 2001 From: Timo Teras Date: Tue, 4 Aug 2009 15:19:29 +0300 Subject: fix: new applet to reinstall and fix package also makes it possibly to upgrade package without adding it to top-level deps. fixes #69. --- src/state.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/state.c') 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 */ -- cgit v1.2.3-60-g2f50