pkg: fix dependency checking against non-installed packages

the solver requires this.
cute-signatures
Timo Teräs 2011-09-27 11:38:16 +03:00
parent 012bcbe41c
commit f4ac687a8a
1 changed files with 5 additions and 0 deletions

View File

@ -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) {