The Slicer returns all missing requirements properly
but if there's an attempt to calculate the minimal explanation, some of these
reqirements are cut off and only the first one is returned to the end
user.
Here's the part of code that calculates the
explanation:
if
(s.getCode() != UNSATISFIABLE || (context != null
&& !(context.getProperty(EXPLANATION) == null
|| Boolean.TRUE.toString().equalsIgnoreCase(context.getProperty(EXPLANATION))))) {
...
return plan; //that plan status contains all problematic
requirements though all substatus codes are
"Warning"
}
//Extract the
explanation
Set<Explanation> explanation =
projector.getExplanation(sub.newChild(ExpandWork / 4)); //here some of missing
requirements are removed and the only one remaining is marked as
Error.
Test case attached.
What is the minimal explanation supposed to contain?
Thanks,
Katya
From a quick code inspection to SimplePlanner, setting explanation
to false will completely disable the explanation support (this is used in the
case of the dropins to avoid computing the explanation since there is no one
to read it).
Some of the missing requirements are filtered as part of the Slicer (but
this is expected and filter out the noise), but after that the explanation is
constructed by the solver and it tries to return the minimal explanation
between what you have installed and what you are trying to install.
However if you have several missing requirements I think it will stop at
the first one. Is that the pb you are seeing?
If you can provide an automated test case, we could see what can be
done.
On 2011-05-12, at 1:40 PM, Todorova, Katya wrote:
Hi guys,
I came across a strange behavior of p2 planner - it hides information
when trying to resolve an IU and resolution fails (due to missing
requirements for example).
If there are more than one missing requirements the final explanation
(and corresponding MultiStatus) will contain only the first one found. This
default behavior
could be avoided if "org.eclipse.equinox.p2.director.explain" property
is set to "false" in the provisioning context used by the planner.
I thought that the explanation is supposed to contain more details than
the "ordinary" status but it turned out it's not the case and it contains
even less. Is that expected?
If yes, any idea why?
Thanks in advance,
Katya
_______________________________________________
p2-dev
mailing list
p2-dev@xxxxxxxxxxxhttps://dev.eclipse.org/mailman/listinfo/p2-dev