1
0
Fork 0

Only print ignoring warning when a package is not installed and not required by the root package, fixes #1642

pull/1645/head
Jordi Boggiano 2013-03-02 20:18:38 +01:00
parent ea2938339d
commit 357f0572d1
1 changed files with 6 additions and 1 deletions

View File

@ -653,6 +653,11 @@ class Installer
return;
}
$requiredPackageNames = array();
foreach (array_merge($rootRequires, $rootDevRequires) as $require) {
$requiredPackageNames[] = $require->getTarget();
}
if ($devMode) {
$rootRequires = array_merge($rootRequires, $rootDevRequires);
}
@ -671,7 +676,7 @@ class Installer
$packageQueue = new \SplQueue;
$depPackages = $pool->whatProvides($packageName);
if (count($depPackages) == 0) {
if (count($depPackages) == 0 && !in_array($packageName, $requiredPackageNames)) {
$this->io->write('<warning>Package "' . $packageName . '" listed for update is not installed. Ignoring.<warning>');
}