Skip to content

Commit

Permalink
Remove Mac warning, prompt for "provides" optional dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
HebaruSan committed Nov 24, 2017
1 parent 5d6888d commit e73eb2f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
23 changes: 21 additions & 2 deletions ConsoleUI/DependencyScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,33 @@ private void AddDependencies(HashSet<string> alreadyInstalling, string identifie
if (source != null) {
foreach (RelationshipDescriptor dependency in source) {
try {
if (registry.LatestAvailable(dependency.name, manager.CurrentInstance.VersionCriteria()) != null
if (registry.LatestAvailable(
dependency.name,
manager.CurrentInstance.VersionCriteria(),
dependency
) != null
&& !registry.IsInstalled(dependency.name)
&& !alreadyInstalling.Contains(dependency.name)) {

AddDep(dependency.name, installByDefault, identifier);
}
} catch (ModuleNotFoundKraken k) {
// LatestAvailable throws if you recommend a "provides" name,
// so ask the registry again for provides-based choices
List<CkanModule> opts = registry.LatestAvailableWithProvides(
dependency.name,
manager.CurrentInstance.VersionCriteria(),
dependency
);
foreach (CkanModule provider in opts) {
if (!registry.IsInstalled(provider.identifier)
&& !alreadyInstalling.Contains(provider.identifier)) {

// Default to not installing because these probably conflict with each other
AddDep(provider.identifier, false, identifier);
}
}
} catch (Kraken) {
// LatestAvailable throws if you recommend a "provides" name
// GUI/MainInstall.cs::AddMod just ignores all exceptions,
// so that's baked into the infrastructure
}
Expand Down
4 changes: 0 additions & 4 deletions ConsoleUI/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

A cross-platform text UI inspired by Borland's Turbo Vision and IBM's Common User Access circa 1990.

## Caution

Not tested on MacOS X.

## Technical summary

The core framework classes are in the `ConsoleUI\Toolkit` folder, while the application classes are in the `ConsoleUI` folder.
Expand Down

0 comments on commit e73eb2f

Please sign in to comment.