From ac571d314a51462fc3aa938d4a06cf0a475d8c0b Mon Sep 17 00:00:00 2001 From: morganamilo Date: Thu, 12 Apr 2018 13:01:54 +0100 Subject: [PATCH] Support entering package name during askCleanEdit --- install.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/install.go b/install.go index 6814aee2..3f18a916 100644 --- a/install.go +++ b/install.go @@ -387,12 +387,14 @@ func cleanEditNumberMenu(pkgs []*rpc.Pkg, bases map[string][]*rpc.Pkg, installed continue } - if cIsInclude && cInclude.get(len(pkgs)-i) { + if cIsInclude && (cInclude.get(len(pkgs)-i) || cOtherInclude.get(pkg.PackageBase)) { toClean = append(toClean, pkg) + continue } - if !cIsInclude && !cExclude.get(len(pkgs)-i) { + if !cIsInclude && (!cExclude.get(len(pkgs)-i) && !cOtherExclude.get(pkg.PackageBase)) { toClean = append(toClean, pkg) + continue } } } @@ -436,11 +438,11 @@ func cleanEditNumberMenu(pkgs []*rpc.Pkg, bases map[string][]*rpc.Pkg, installed continue } - if eIsInclude && eInclude.get(len(pkgs)-i) { + if eIsInclude && (eInclude.get(len(pkgs)-i) || eOtherInclude.get(pkg.PackageBase)) { toEdit = append(toEdit, pkg) } - if !eIsInclude && !eExclude.get(len(pkgs)-i) { + if !eIsInclude && (!eExclude.get(len(pkgs)-i) && !eOtherExclude.get(pkg.PackageBase)) { toEdit = append(toEdit, pkg) } }