aboutsummaryrefslogtreecommitdiff
path: root/src/feature
diff options
context:
space:
mode:
authorkitsunyan2018-06-09 19:26:16 +0000
committerkitsunyan2018-06-09 19:26:16 +0000
commit0b6c3e6732c5c0d5b6613d2fe450c3b7760c0827 (patch)
tree72fac7f0d47d7ef1683bc2be639fb3cea524ee17 /src/feature
parent56e82963b465116af32231aa531e8f6344826eab (diff)
Add support for "--disable-download-timeout" option
Diffstat (limited to 'src/feature')
-rw-r--r--src/feature/syncinfo.nim3
-rw-r--r--src/feature/syncinstall.nim16
-rw-r--r--src/feature/syncsearch.nim3
-rw-r--r--src/feature/syncsource.nim3
4 files changed, 15 insertions, 10 deletions
diff --git a/src/feature/syncinfo.nim b/src/feature/syncinfo.nim
index 483df3c..546c631 100644
--- a/src/feature/syncinfo.nim
+++ b/src/feature/syncinfo.nim
@@ -110,7 +110,8 @@ proc handleSyncInfo*(args: seq[Argument], config: Config): int =
for e in errors: printError(config.color, e)
findSyncTargets(handle, dbs, targets, config.aurRepo, false, false)
- let (pkgInfos, _, aerrors) = getAurPackageInfos(checkAurNames, config.aurRepo, config.arch)
+ let (pkgInfos, _, aerrors) = getAurPackageInfos(checkAurNames,
+ config.aurRepo, config.arch, config.downloadTimeout)
for e in aerrors: printError(config.color, e)
let fullTargets = mapAurTargets[PackageInfo](syncTargets, pkgInfos, config.aurRepo)
diff --git a/src/feature/syncinstall.nim b/src/feature/syncinstall.nim
index b583fe6..7b5bd5d 100644
--- a/src/feature/syncinstall.nim
+++ b/src/feature/syncinstall.nim
@@ -199,13 +199,13 @@ proc findDependencies(config: Config, handle: ptr AlpmHandle, dbs: seq[ptr AlpmD
try:
withAur():
let (pkgInfos, additionalPkgInfos, paths) = if printMode: (block:
- let (pkgInfos, additionalPkgInfos, aerrors) =
- getAurPackageInfos(aurCheck.map(r => r.name), config.aurRepo, config.arch)
+ let (pkgInfos, additionalPkgInfos, aerrors) = getAurPackageInfos(aurCheck
+ .map(r => r.name), config.aurRepo, config.arch, config.downloadTimeout)
for e in aerrors: printError(config.color, e)
(pkgInfos, additionalPkgInfos, newSeq[string]()))
else: (block:
let (rpcInfos, aerrors) = getRpcPackageInfos(aurCheck.map(r => r.name),
- config.aurRepo)
+ config.aurRepo, config.downloadTimeout)
for e in aerrors: printError(config.color, e)
let (pkgInfos, additionalPkgInfos, paths, cerrors) =
cloneAurReposWithPackageInfos(config, rpcInfos, not printMode, update, true)
@@ -1135,11 +1135,12 @@ proc obtainAurPackageInfos(config: Config, rpcInfos: seq[RpcPackageInfo],
let (update, terminate) = createCloneProgress(config, fullRpcInfos.len, true, printMode)
let (pkgInfos, additionalPkgInfos, paths, errors) = if printMode: (block:
- let (pkgInfos, additionalPkgInfos, aerrors) =
- getAurPackageInfos(fullRpcInfos.map(i => i.name), config.aurRepo, config.arch)
+ let (pkgInfos, additionalPkgInfos, aerrors) = getAurPackageInfos(fullRpcInfos
+ .map(i => i.name), config.aurRepo, config.arch, config.downloadTimeout)
(pkgInfos, additionalPkgInfos, newSeq[string](), aerrors.deduplicate))
else: (block:
- let (rpcInfos, aerrors) = getRpcPackageInfos(fullRpcInfos.map(i => i.name), config.aurRepo)
+ let (rpcInfos, aerrors) = getRpcPackageInfos(fullRpcInfos.map(i => i.name),
+ config.aurRepo, config.downloadTimeout)
let (pkgInfos, additionalPkgInfos, paths, cerrors) =
cloneAurReposWithPackageInfos(config, rpcInfos, not printMode, update, true)
(pkgInfos, additionalPkgInfos, paths, (toSeq(aerrors.items) & cerrors).deduplicate))
@@ -1248,7 +1249,8 @@ proc resolveBuildTargets(config: Config, targets: seq[PackageTarget],
if checkAurNames.len > 0:
echo(tr"checking AUR database...")
- let (rpcInfos, rerrors) = getRpcPackageInfos(checkAurNames, config.aurRepo)
+ let (rpcInfos, rerrors) = getRpcPackageInfos(checkAurNames,
+ config.aurRepo, config.downloadTimeout)
for e in rerrors: printError(config.color, e)
let rpcNotFoundTargets = filterNotFoundSyncTargets(syncTargets,
diff --git a/src/feature/syncsearch.nim b/src/feature/syncsearch.nim
index 7a9199d..9aa179e 100644
--- a/src/feature/syncsearch.nim
+++ b/src/feature/syncsearch.nim
@@ -11,7 +11,8 @@ proc handleSyncSearch*(args: seq[Argument], config: Config): int =
else:
let quiet = args.check(%%%"quiet")
- let (aurPackages, aerrors) = findAurPackages(args.targets, config.aurRepo)
+ let (aurPackages, aerrors) = findAurPackages(args.targets,
+ config.aurRepo, config.downloadTimeout)
for e in aerrors: printError(config.color, e)
type Package = tuple[rpcInfo: RpcPackageInfo, installedVersion: Option[string]]
diff --git a/src/feature/syncsource.nim b/src/feature/syncsource.nim
index df543c7..e0531bc 100644
--- a/src/feature/syncsource.nim
+++ b/src/feature/syncsource.nim
@@ -168,7 +168,8 @@ proc handleSyncSource*(args: seq[Argument], config: Config): int =
for e in errors: printError(config.color, e)
findSyncTargets(handle, dbs, targets, config.aurRepo, false, false)
- let (rpcInfos, aerrors) = getRpcPackageInfos(checkAurNames, config.aurRepo)
+ let (rpcInfos, aerrors) = getRpcPackageInfos(checkAurNames,
+ config.aurRepo, config.downloadTimeout)
for e in aerrors: printError(config.color, e)
let notFoundTargets = filterNotFoundSyncTargets(syncTargets,