diff --git a/GUI/MainInstall.cs b/GUI/MainInstall.cs
index 6abe7ee935..a82d35e170 100644
--- a/GUI/MainInstall.cs
+++ b/GUI/MainInstall.cs
@@ -26,43 +26,32 @@ public partial class Main
/// Module to install
public async void InstallModuleDriver(IRegistryQuerier registry, CkanModule module)
{
- RelationshipResolverOptions install_ops = RelationshipResolver.DefaultOpts();
- install_ops.with_recommends = false;
-
try
{
- var initialChangeSet = new HashSet();
- // Install the selected mod
- initialChangeSet.Add(new ModChange(
- new GUIMod(module, registry, CurrentInstance.VersionCriteria()),
- GUIModChangeType.Install,
- null
- ));
+ var userChangeSet = new List();
InstalledModule installed = registry.InstalledModule(module.identifier);
if (installed != null)
{
// Already installed, remove it first
- initialChangeSet.Add(new ModChange(
+ userChangeSet.Add(new ModChange(
new GUIMod(installed.Module, registry, CurrentInstance.VersionCriteria()),
GUIModChangeType.Remove,
null
));
}
- List fullChangeSet = new List(
- await mainModList.ComputeChangeSetFromModList(
- registry,
- initialChangeSet,
- ModuleInstaller.GetInstance(CurrentInstance, Manager.Cache, GUI.user),
- CurrentInstance.VersionCriteria()
- )
- );
- if (fullChangeSet != null && fullChangeSet.Count > 0)
+ // Install the selected mod
+ userChangeSet.Add(new ModChange(
+ new GUIMod(module, registry, CurrentInstance.VersionCriteria()),
+ GUIModChangeType.Install,
+ null
+ ));
+ if (userChangeSet.Count > 0)
{
// Resolve the provides relationships in the dependencies
installWorker.RunWorkerAsync(
new KeyValuePair, RelationshipResolverOptions>(
- fullChangeSet,
- install_ops
+ userChangeSet,
+ RelationshipResolver.DependsOnlyOpts()
)
);
}