summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-09-27 11:38:16 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-09-27 11:38:16 +0300
commitf4ac687a8a448d7dc89d1c9dc42a5b10e3f86957 (patch)
treedf152413ef4d6d57e8c2cc749956924726cf5218 /src
parent012bcbe41c045a00e112608fe9dac4097d90dc1e (diff)
downloadapk-tools-f4ac687a8a448d7dc89d1c9dc42a5b10e3f86957.tar.gz
apk-tools-f4ac687a8a448d7dc89d1c9dc42a5b10e3f86957.tar.bz2
apk-tools-f4ac687a8a448d7dc89d1c9dc42a5b10e3f86957.tar.xz
apk-tools-f4ac687a8a448d7dc89d1c9dc42a5b10e3f86957.zip
pkg: fix dependency checking against non-installed packages
the solver requires this.
Diffstat (limited to 'src')
-rw-r--r--src/package.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/package.c b/src/package.c
index 9b25834..0f882e2 100644
--- a/src/package.c
+++ b/src/package.c
@@ -279,6 +279,11 @@ static int parse_depend(void *ctx, apk_blob_t blob)
int apk_dep_is_satisfied(struct apk_dependency *dep, struct apk_package *pkg)
{
+ if (pkg == NULL) {
+ if (dep->result_mask == APK_DEPMASK_CONFLICT)
+ return 1;
+ return 0;
+ }
if (dep->name != pkg->name)
return 0;
if (dep->result_mask == APK_DEPMASK_CHECKSUM) {