summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-06-23 08:33:06 +0000
committerMichał Górny <mgorny@gentoo.org>2017-06-23 08:33:06 +0000
commit98a0f946f88eaa82a699df7a89675245522bf07f (patch)
tree32b4e4789c3285f034d111a7dbeece23e28b6d78
parent/* Backwards Compatibility */ partially fill in (diff)
downloadglep-98a0f946f88eaa82a699df7a89675245522bf07f.tar.gz
glep-98a0f946f88eaa82a699df7a89675245522bf07f.tar.bz2
glep-98a0f946f88eaa82a699df7a89675245522bf07f.zip
/* Old constraints vs auto-solving */ finish
-rw-r--r--GLEP:73.mw16
1 files changed, 15 insertions, 1 deletions
diff --git a/GLEP:73.mw b/GLEP:73.mw
index 6372a2d..318d2f2 100644
--- a/GLEP:73.mw
+++ b/GLEP:73.mw
@@ -321,7 +321,21 @@ For simplification, this GLEP will reject some of the REQUIRED_USE forms that ar
Not all valid REQUIRED_USE constraints can be reliably solved. There are two major cases for that:
# Constraints that toggle flags that caused previous conditions not to apply. Solving those may require more than one iteration of the solving algorithm. However, they usually can be fixed easily by reordering.
-# Constraints that have conflicts between flags. Solving those will result in repeated results where the constraint is unsatisfied. With multi-iteration solving, they can cause infinite loops.
+# Constraints that have conflicts between flags. Solving those will result in repeated results where the constraint is unsatisfied. With multi-iteration solving, they can cause infinite loops. They have no trivial solution.
+
+However, the problem usually applies to only some of the disallowed USE flag combinations. The verification algorithm should be able to detect most of those cases.
+
+====Constraints with sub-optimal solutions====
+While this specification uses an algorithm that attempts to read REQUIRED_USE constraints in the most natural way, not all constraints in Gentoo are written in this manner. Especially, many any-of, at-most-one-of and exactly-one-of groups are written with no specific ordering in mind. In some cases, they are used interchangeably with USE-conditional groups. Some USE-conditional groups are written without concern for clearly establishing the relation between the condition and the items inside the group.
+
+While the auto-solving algorithm is able to solve many of those constraints, the solution can be considered sub-optimal as they do not follow the solution that the developers would knowingly suggest. For example, per the current rules the two following constraints are equivalent:
+
+ feature? ( dep )
+ !dep? ( !feature )
+
+However, per the auto-solving semantic the first one will favor enabling the dependency, while the second one will favor disabling the feature.
+
+This is probably the most important issue since there is no easy way to automatically detect that.
==Reference Implementation==