From 66508034ce18a0d0e0f569c430a62e22eb311bb2 Mon Sep 17 00:00:00 2001 From: kitsunyan Date: Fri, 11 May 2018 08:17:50 +0300 Subject: Track package install reason for all packages Previously only foreign packages were tracked, which led to incorrect install reason switch for built repo packages. --- src/feature/syncinstall.nim | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/feature/syncinstall.nim b/src/feature/syncinstall.nim index c046df4..45613f1 100644 --- a/src/feature/syncinstall.nim +++ b/src/feature/syncinstall.nim @@ -1262,19 +1262,16 @@ proc handleSyncInstall*(args: seq[Argument], config: Config): int = handlePrint(pacmanArgs, config, printFormat.unsafeGet, upgradeCount, nodepsCount, pacmanTargets, pkgInfos, additionalPkgInfos, noaur) else: - let foreignInstalled = installed.filter(i => i.foreign) - let foreignExplicitsNamesSet = foreignInstalled - .filter(i => i.explicit).map(i => i.name).toSet - let foreignDepsNamesSet = foreignInstalled - .filter(i => not i.explicit).map(i => i.name).toSet - let keepNames = foreignExplicitsNamesSet + foreignDepsNamesSet + targetNamesSet + let explicitsNamesSet = installed.filter(i => i.explicit).map(i => i.name).toSet + let depsNamesSet = installed.filter(i => not i.explicit).map(i => i.name).toSet + let keepNames = explicitsNamesSet + depsNamesSet + targetNamesSet let explicits = if args.check(%%%"asexplicit"): - targetNamesSet + foreignExplicitsNamesSet + foreignDepsNamesSet + targetNamesSet + explicitsNamesSet + depsNamesSet elif args.check(%%%"asdeps"): initSet[string]() else: - foreignExplicitsNamesSet + (targetNamesSet - foreignDepsNamesSet) + explicitsNamesSet + (targetNamesSet - depsNamesSet) handleInstall(pacmanArgs, config, upgradeCount, nodepsCount, noconfirm, explicits, installed, pacmanTargets, pkgInfos, additionalPkgInfos, keepNames, -- cgit v1.2.3-70-g09d2