*/
protected void installPackage(PackageContext pkgContext, InstallOptions installOptions) throws PackageManagerException
{
if (pkgContext == null)
{
throw new PackageManagerException("Package context is null");
}
// check if package is already installed
boolean packageAlreadyInstalled = this.pkgDatabaseManager.isPackageInstalled(pkgContext.getPackageName());
if (packageAlreadyInstalled)
{
throw new PackageManagerException("Package " + pkgContext + " is already installed");
}
logger.debug("New package " + pkgContext + " being installed");
// proceed with installation of the package
if (pkgContext.getInstallationFiles() == null)
{
throw new PackageManagerException("There are no files to install for package: " + pkgContext);
}
// work on dependencies first (because if deps are not satisfied then no point
// running the pre-install step.
// BUT, think about this (should we first run pre-install and then deps?).
// What would be a ideal behaviour?