Call GPM::checkPackagesCanBeInstalled() when trying to install/update a package

This commit is contained in:
Flavio Copes
2016-03-15 19:36:00 +01:00
parent d53d10c495
commit 6b22932d43
2 changed files with 21 additions and 1 deletions

View File

@@ -522,6 +522,26 @@ class Admin
return $dependencies;
}
/**
* Check the passed packages list can be updated
*
* @param $packages
*
* @throws \Exception
* @return bool
*/
public function checkPackagesCanBeInstalled($packages)
{
$gpm = $this->gpm();
if (!$gpm) {
return false;
}
$this->gpm->checkPackagesCanBeInstalled($packages);
return true;
}
/**
* Get an array of dependencies needed to be installed or updated for a list of packages
* to be installed.
@@ -539,7 +559,6 @@ class Admin
$dependencies = $this->gpm->getDependencies($packages);
return $dependencies;
}