diff --git a/ConsoleUI/DependencyScreen.cs b/ConsoleUI/DependencyScreen.cs index 597e3133aa..df14345c7a 100644 --- a/ConsoleUI/DependencyScreen.cs +++ b/ConsoleUI/DependencyScreen.cs @@ -111,14 +111,33 @@ private void AddDependencies(HashSet 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 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 } diff --git a/ConsoleUI/README.md b/ConsoleUI/README.md index 02c30f6bac..2ad85fe53f 100644 --- a/ConsoleUI/README.md +++ b/ConsoleUI/README.md @@ -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.