aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitsunyan2018-05-11 05:17:50 +0000
committerkitsunyan2018-05-11 05:17:50 +0000
commit66508034ce18a0d0e0f569c430a62e22eb311bb2 (patch)
treeb9705f043da4b93ed493fb29fff6a0a9438cee04
parenta329e692c9ac316ebacc183dd90d985a66a62cc5 (diff)
Track package install reason for all packages
Previously only foreign packages were tracked, which led to incorrect install reason switch for built repo packages.
-rw-r--r--src/feature/syncinstall.nim13
1 files 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,