summaryrefslogtreecommitdiff
path: root/src/solver_private.h
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2014-02-12 19:42:48 +0100
committerMichael Schroeder <mls@suse.de>2014-02-12 19:42:48 +0100
commit5b07accd422fcdc8c583f3f0b6b4798c408cb441 (patch)
tree787a2ac5e13e11bebce47c5cdd3b4578b3609ab4 /src/solver_private.h
parent8c000d8c3a5062aa9098989c99997cd31028a6f6 (diff)
downloadlibsolv-5b07accd422fcdc8c583f3f0b6b4798c408cb441.tar.gz
libsolv-5b07accd422fcdc8c583f3f0b6b4798c408cb441.tar.bz2
libsolv-5b07accd422fcdc8c583f3f0b6b4798c408cb441.zip
refactor a bit
- clean up comments in rule generation - refactor is_otherproviders_dep helper function - treat COND as AND in supplements handling - special case OR in supplements handling so that AND functionality does not get lost
Diffstat (limited to 'src/solver_private.h')
-rw-r--r--src/solver_private.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/solver_private.h b/src/solver_private.h
index 43bc66e..170efc2 100644
--- a/src/solver_private.h
+++ b/src/solver_private.h
@@ -28,12 +28,18 @@ solver_dep_fulfilled(Solver *solv, Id dep)
if (ISRELDEP(dep))
{
Reldep *rd = GETRELDEP(pool, dep);
- if (rd->flags == REL_AND)
+ if (rd->flags == REL_AND || rd->flags == REL_COND)
{
if (!solver_dep_fulfilled(solv, rd->name))
return 0;
return solver_dep_fulfilled(solv, rd->evr);
}
+ if (rd->flags == REL_OR)
+ {
+ if (solver_dep_fulfilled(solv, rd->name))
+ return 1;
+ return solver_dep_fulfilled(solv, rd->evr);
+ }
if (rd->flags == REL_NAMESPACE && rd->name == NAMESPACE_SPLITPROVIDES)
return solver_splitprovides(solv, rd->evr);
if (rd->flags == REL_NAMESPACE && rd->name == NAMESPACE_INSTALLED)