aboutsummaryrefslogtreecommitdiff
path: root/src/feature/syncinstall.nim
diff options
context:
space:
mode:
authorkitsunyan2018-04-22 23:08:49 +0000
committerkitsunyan2018-04-22 23:08:49 +0000
commit6ffcd68b64f4199b33c8fdd5377cc932466d22de (patch)
tree37bbc2fb783584cdf2dc5f916945ed6403e86c15 /src/feature/syncinstall.nim
parenta1a5e345daaeae0fae1da58e3683041d48e2583a (diff)
Add support for version constraints for sync info
Diffstat (limited to 'src/feature/syncinstall.nim')
-rw-r--r--src/feature/syncinstall.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/feature/syncinstall.nim b/src/feature/syncinstall.nim
index 163bf34..ecca6ef 100644
--- a/src/feature/syncinstall.nim
+++ b/src/feature/syncinstall.nim
@@ -211,7 +211,7 @@ proc filterNotFoundSyncTargetsInternal(syncTargets: seq[SyncPackageTarget],
upToDateNeededTable: Table[string, PackageReference]): seq[SyncPackageTarget] =
# collect packages which were found neither in sync DB nor in AUR
syncTargets.filter(t => not (upToDateNeededTable.opt(t.reference.name)
- .map(r => t.reference.isProvidedBy(r)).get(false)) and t.foundInfo.isNone and
+ .map(r => t.reference.isProvidedBy(r)).get(false)) and t.foundInfos.len == 0 and
not (t.isAurTargetSync and pkgInfoReferencesTable.opt(t.reference.name)
.map(r => t.reference.isProvidedBy(r)).get(false)))
@@ -1071,7 +1071,7 @@ proc handleSyncInstall*(args: seq[Argument], config: Config): int =
let neededPacmanTargets = if printFormat.isNone and build and needed:
pacmanTargets.filter(target => (block:
- let version = target.foundInfo.get.pkg.get.version
+ let version = target.foundInfos[0].pkg.get.version
if installedTable.checkNeeded(target.reference.name, version, true).needed:
true
else:
@@ -1138,7 +1138,7 @@ proc handleSyncInstall*(args: seq[Argument], config: Config): int =
let fullPkgInfos = finalPkgInfos & lc[i | (s <- satisfied.values,
i <- s.buildPkgInfo, not (i.name in buildAndAurTargetSet)), PackageInfo].deduplicate
- let directPacmanTargets = pacmanTargets.map(t => t.formatArgument)
+ let directPacmanTargets = pacmanTargets.map(`$`)
let additionalPacmanTargets = lc[x.name | (x <- satisfied.values,
not x.installed and x.buildPkgInfo.isNone), string]
let orderedPkgInfos = orderInstallation(fullPkgInfos, satisfied)