Skip to content
Browse files

Merge pull request #184 from wolfgangmm/develop

[bugfix] Package manager: ignored package dependencies.
  • Loading branch information...
2 parents 56e28f9 + bbef137 commit 4d16e5a80f3427f77f42a7387eed250f15c7b443 @shabanovd shabanovd committed Mar 30, 2014
Showing with 11 additions and 11 deletions.
  1. +11 −11 src/org/exist/repo/Deployment.java
View
22 src/org/exist/repo/Deployment.java
@@ -189,9 +189,9 @@ public String installAndDeploy(File xar, PackageLoader loader, boolean enforceDe
}
if (pkgName != null) {
LOG.info("Package " + name + " depends on " + pkgName);
+ boolean isInstalled = false;
if (repo.getParentRepo().getPackages(pkgName) != null) {
LOG.debug("Package " + pkgName + " already installed");
- boolean isInstalled = false;
Packages pkgs = repo.getParentRepo().getPackages(pkgName);
// check if installed package matches required version
if (pkgs != null) {
@@ -215,17 +215,17 @@ public String installAndDeploy(File xar, PackageLoader loader, boolean enforceDe
LOG.debug("Package " + pkgName + " already installed");
}
}
- if (!isInstalled && loader != null) {
- final File depFile = loader.load(pkgName, version);
- if (depFile != null) {
- installAndDeploy(depFile, loader);
- } else {
- if (enforceDeps) {
- LOG.warn("Missing dependency: package " + pkgName + " could not be resolved. This error " +
+ }
+ if (!isInstalled && loader != null) {
+ final File depFile = loader.load(pkgName, version);
+ if (depFile != null) {
+ installAndDeploy(depFile, loader);
+ } else {
+ if (enforceDeps) {
+ LOG.warn("Missing dependency: package " + pkgName + " could not be resolved. This error " +
"is not fatal, but the package may not work as expected");
- } else {
- throw new PackageException("Missing dependency: package " + pkgName + " could not be resolved.");
- }
+ } else {
+ throw new PackageException("Missing dependency: package " + pkgName + " could not be resolved.");
}
}
}

0 comments on commit 4d16e5a

Please sign in to comment.
Something went wrong with that request. Please try again.