Correctly generate conflict and alias rules for installed packages
parent
d592c0a55e
commit
1211d8f7d4
|
@ -190,23 +190,18 @@ class RuleSetGenerator
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// check implicit obsoletes
|
$obsoleteProviders = $this->pool->whatProvides($package->getName(), null);
|
||||||
// for installed packages we only need to check installed/installed problems,
|
|
||||||
// as the others are picked up when looking at the uninstalled package.
|
|
||||||
if (!$isInstalled) {
|
|
||||||
$obsoleteProviders = $this->pool->whatProvides($package->getName(), null);
|
|
||||||
|
|
||||||
foreach ($obsoleteProviders as $provider) {
|
foreach ($obsoleteProviders as $provider) {
|
||||||
if ($provider === $package) {
|
if ($provider === $package) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (($package instanceof AliasPackage) && $package->getAliasOf() === $provider) {
|
if (($package instanceof AliasPackage) && $package->getAliasOf() === $provider) {
|
||||||
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createRequireRule($package, array($provider), Rule::RULE_PACKAGE_ALIAS, (string) $package));
|
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createRequireRule($package, array($provider), Rule::RULE_PACKAGE_ALIAS, (string) $package));
|
||||||
} elseif (!$this->obsoleteImpossibleForAlias($package, $provider)) {
|
} elseif (!$this->obsoleteImpossibleForAlias($package, $provider)) {
|
||||||
$reason = ($package->getName() == $provider->getName()) ? Rule::RULE_PACKAGE_SAME_NAME : Rule::RULE_PACKAGE_IMPLICIT_OBSOLETES;
|
$reason = ($package->getName() == $provider->getName()) ? Rule::RULE_PACKAGE_SAME_NAME : Rule::RULE_PACKAGE_IMPLICIT_OBSOLETES;
|
||||||
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createConflictRule($package, $provider, $reason, (string) $package));
|
$this->addRule(RuleSet::TYPE_PACKAGE, $rule = $this->createConflictRule($package, $provider, $reason, (string) $package));
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue