The resolving process seems to not update restrictions properly in some
cases. Here's how it fails to update them:
reloadCfg loads settings and restrictions (and other data too, but
that's not relevant here) for all packages resolved in previous pass
configuration change is detected
dependencies are resolved
At this point package X is added due to pkg.deps constraints based on
syscfg Y.
reloadCfg loads settings and restrictions again
configuration change is detected
dependencies are resolved one more time
At this point, syscfg Y changed and package X is removed as previous
pkg.deps constraints do not apply anymore. Removing package X means
r.cfg.Settings is updated - this is crucial here.
reloadCfg load settings and restrictions one more time
And here's the problem: it does not detect that settings have changed
since those from removed package were already removed in previous pass.
Consequently it does not update r.cfg so restrictions state is kept
from previous pass, i.e. before package X was removed.
This can be fixed by always updating r.cfg to latest configuration as
load by reloadCfg.
The resolving process seems to not update restrictions properly in some cases. Here's how it fails to update them:
At this point package X is added due to pkg.deps constraints based on syscfg Y.
At this point, syscfg Y changed and package X is removed as previous pkg.deps constraints do not apply anymore. Removing package X means r.cfg.Settings is updated - this is crucial here.
And here's the problem: it does not detect that settings have changed since those from removed package were already removed in previous pass. Consequently it does not update r.cfg so restrictions state is kept from previous pass, i.e. before package X was removed.
This can be fixed by always updating r.cfg to latest configuration as load by reloadCfg.