1
0
Fork 0

Fix bogus operations that trigger a "package is not installed" exception for dev installs, refs #789

pull/1186/merge
Jordi Boggiano 2012-10-22 15:55:29 +02:00
parent bd826d7644
commit b4bcc5b5c8
1 changed files with 13 additions and 0 deletions

View File

@ -374,6 +374,19 @@ class Installer
return false;
}
if ($devMode) {
// remove bogus operations that the solver creates for stuff that was force-updated in the non-dev pass
// TODO this should not be necessary ideally, but it seems to work around the problem quite well
foreach ($operations as $index => $op) {
if ('update' === $op->getJobType() && $op->getInitialPackage()->getUniqueName() === $op->getTargetPackage()->getUniqueName()
&& $op->getInitialPackage()->getSourceReference() === $op->getTargetPackage()->getSourceReference()
&& $op->getInitialPackage()->getDistReference() === $op->getTargetPackage()->getDistReference()
) {
unset($operations[$index]);
}
}
}
// force dev packages to be updated if we update or install from a (potentially new) lock
foreach ($localRepo->getPackages() as $package) {
// skip non-dev packages