summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-03-19 13:58:37 +0200
committerTimo Teräs <timo.teras@iki.fi>2011-03-19 14:17:02 +0200
commit4e72075fbab32e9368d1305431924f10e78c0546 (patch)
tree7e717a12f43aea598e5f59f668fc931f5e492a95
parent93eb38a31ae97f1cb470f18c6019ede19c5c314e (diff)
downloadapk-tools-4e72075fbab32e9368d1305431924f10e78c0546.tar.gz
apk-tools-4e72075fbab32e9368d1305431924f10e78c0546.tar.bz2
apk-tools-4e72075fbab32e9368d1305431924f10e78c0546.tar.xz
apk-tools-4e72075fbab32e9368d1305431924f10e78c0546.zip
state: lock package late for names specified on command line
This will fix certain scenarios where multiple packages are installed with full package files specified on command line and they depend on each other.
-rw-r--r--src/state.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/state.c b/src/state.c
index 7991802..005470c 100644
--- a/src/state.c
+++ b/src/state.c
@@ -420,10 +420,17 @@ static int apk_state_fix_package(struct apk_state *state,
return 0;
for (i = 0; i < pkg->depends->num; i++) {
- r = apk_state_lock_dependency(state,
- &pkg->depends->item[i]);
- if (r != 0)
- ret = -1;
+ if (pkg->name->flags & APK_NAME_TOPLEVEL_OVERRIDE) {
+ r = apk_state_prune_dependency(state,
+ &pkg->depends->item[i]);
+ if (r < 0)
+ ret = -1;
+ } else {
+ r = apk_state_lock_dependency(state,
+ &pkg->depends->item[i]);
+ if (r != 0)
+ ret = -1;
+ }
}
return ret;