aboutsummaryrefslogtreecommitdiff
path: root/src/common.nim
diff options
context:
space:
mode:
authorkitsunyan2018-03-18 20:58:13 +0000
committerkitsunyan2018-03-18 20:58:13 +0000
commit471650128626145a3f45c543eecb6e5be4f273dd (patch)
tree3b020a6ddd72b72f91b66eaeb2b99cc00a5cc975 /src/common.nim
parent75b2f60bf15a9d49859b262a47da30ec70614a5e (diff)
Add PGP keys importing
Diffstat (limited to 'src/common.nim')
-rw-r--r--src/common.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common.nim b/src/common.nim
index 23ef7f3..779dacb 100644
--- a/src/common.nim
+++ b/src/common.nim
@@ -237,6 +237,15 @@ proc obtainSrcInfo*(path: string): string =
execProcess(bashCmd, ["-c", """cd "$2" && "$1" --printsrcinfo""",
"bash", makePkgCmd, path], options = {})
+proc reloadPkgInfos*(config: Config, path: string, pkgInfos: seq[PackageInfo]): seq[PackageInfo] =
+ let srcInfo = obtainSrcInfo(path)
+ let res = parseSrcInfo(pkgInfos[0].repo, srcInfo, config.arch,
+ pkgInfos[0].gitUrl, pkgInfos[0].gitBranch, pkgInfos[0].gitCommit, pkgInfos[0].gitPath)
+ if res.len > 0:
+ res
+ else:
+ pkgInfos
+
proc obtainBuildPkgInfos*(config: Config,
pacmanTargets: seq[FullPackageTarget[RpcPackageInfo]]): (seq[PackageInfo], seq[string]) =
type