aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkitsunyan2018-05-05 19:04:45 +0000
committerkitsunyan2018-05-05 19:04:45 +0000
commit220c977d972821298db64571e553b6c5bc36d374 (patch)
treee2c91cc4df4c5e5489208b7569b8ba99ec9da4c5 /src
parent9c7c88d41a3a4f59602f1e4b42635551379ccc99 (diff)
Don't turn dependencies into explicits
Diffstat (limited to 'src')
-rw-r--r--src/feature/syncinstall.nim31
1 files changed, 14 insertions, 17 deletions
diff --git a/src/feature/syncinstall.nim b/src/feature/syncinstall.nim
index 1ee40c4..3b61eea 100644
--- a/src/feature/syncinstall.nim
+++ b/src/feature/syncinstall.nim
@@ -1091,24 +1091,21 @@ proc findSyncTargetsWithInstalled(config: Config, targets: seq[PackageTarget],
let installed = lc[($p.name, $p.version, p.groupsSeq, p.reason == AlpmReason.explicit) |
(p <- handle.local.packages), Installed]
- let foreignUpgrade = if upgradeCount > 0: (block:
- proc checkForeignAndIrreplaceable(name: string): bool =
- if dbs.filter(d => d[name] != nil).len > 0:
- return false
- else:
- for db in dbs:
- for pkg in db.packages:
- for replaces in pkg.replaces:
- if replaces.name == name:
- return false
- return true
-
- installed
- .map(i => i.name)
- .filter(checkForeignAndIrreplaceable)
- .toSet)
+ proc checkForeignAndIrreplaceable(name: string): bool =
+ if dbs.filter(d => d[name] != nil).len > 0:
+ return false
else:
- initSet[string]()
+ for db in dbs:
+ for pkg in db.packages:
+ for replaces in pkg.replaces:
+ if replaces.name == name:
+ return false
+ return true
+
+ let foreignUpgrade = installed
+ .map(i => i.name)
+ .filter(checkForeignAndIrreplaceable)
+ .toSet
let checkAurNamesFull = if noaur:
@[]