Support entering package name during askCleanEdit

This commit is contained in:
morganamilo 2018-04-12 13:01:54 +01:00
parent 0aae012eb5
commit ac571d314a
No known key found for this signature in database
GPG key ID: 6FE9E7996B0B082E

View file

@ -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)
}
}