Skip to content

Commit

Permalink
[GR-30738] Fetch missing info from local, not catalog info.
Browse files Browse the repository at this point in the history
PullRequest: graal/8746
  • Loading branch information
sdedic committed Apr 19, 2021
2 parents 95323f5 + eec22a0 commit 3dd7259
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ UPGRADE_GraalVMDirNameEdition@=graalvm-{1}-java{2}-{0}
# {0} - required version
UPGRADE_NoVersionSatisfiesComponents=No GraalVM version satisfies all the requested components. At least {0} is required.
UPGRADE_ComponentsCannotMigrate=Some of the installed components cannot migrate to the new version. Please upgrade to a specific GraalVM version first.
UPGRADE_ComponentsMissingFromEdition=Some of the installed components may be missing from edition "{0}". Use --ignore-missing to install anyway.
UPGRADE_CannotMigrateLicense=Could not migrate license acceptance: component {0}, license ID {1}.
UPGRADE_MissingParameter=Missing required parameter.
UPGRADE_CannotDowngrade=Cannot downgrade to an old version {0}. Please install manually.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ public ComponentInfo findGraalVersion(Version.Match minimum) throws IOException
} else {
Set<String> miss = new HashSet<>(toMigrate);
miss.removeAll(canMigrate);
missingParts.put(candidate, miss.stream().map((id) -> input.getRegistry().findComponent(id)).collect(Collectors.toSet()));
missingParts.put(candidate, miss.stream().map((id) -> input.getLocalRegistry().findComponent(id)).collect(Collectors.toSet()));
}
}
if (installables == null) {
Expand All @@ -525,7 +525,11 @@ public ComponentInfo findGraalVersion(Version.Match minimum) throws IOException

feedback.error("UPGRADE_MissingComponents", null, core.getName(), core.getVersion().displayString(), msg);
}
throw feedback.failure("UPGRADE_ComponentsCannotMigrate", null);
if (editionUpgrade != null) {
throw feedback.failure("UPGRADE_ComponentsMissingFromEdition", null, editionUpgrade);
} else {
throw feedback.failure("UPGRADE_ComponentsCannotMigrate", null);
}
}
if (versions.isEmpty()) {
throw feedback.failure("UPGRADE_NoVersionSatisfiesComponents", null);
Expand Down

0 comments on commit 3dd7259

Please sign in to comment.