There is a bug regarding which panel can be showed.
The panel condition associated along panel declaration (in install.xml / panels / panel)
is sometimes ignored causing the panel to appear although the condition
is not met.
The source of the problem is that the checking, whether to show the panel or not,
is done in two places. InstallerFrame can decide whether to show the panel
by checking the condition attribute associated along the panel declaration. The panel
itself can decide whether it should be displayed or not, by checking conditions
defined using createForPack elements within UserInputPanel's body.
Here is simplified list of steps how this is done currently:
1) InstallerFrame searches for next/prev panel that can be showed using #canShow method.
If it was found and condition is met, then panel will be activated. Here, we can go to step 2.
2) The panel itself can decide whether it wants to be showed or not, for example
UserInputPanel does this checking in the method: #panelActivate. If the conditions
are not met, then it invokes InstallerFrame#skipPanel(). The skipPanel searches next/previous
panel without doing any checking, hence the panel is being displayed although it shouldn't be.
This method skips conditions checking that otherwise would be issued using
InstallerFrame#canShow().
The fix is to amend InstallerFrame#skipPanel() to use #navigateNext() and
#navigatePrevious() instead of #switchPanel(). These two methods invokes canShow()
method, to check whether panel is allowed to be showed.
In the attachment one can find patch that corrects the problem. Feel free to comment.
I agree to merge the proposed fix.