diff options
author | kitsunyan | 2018-03-16 15:31:18 +0000 |
---|---|---|
committer | kitsunyan | 2018-03-16 15:31:18 +0000 |
commit | de2164726d1d80fd41996db164eae932adef0807 (patch) | |
tree | 5782db6b07eb85b878d6e07c75b718cdebbe9b06 /src/common.nim | |
parent | 864cc0373fd6095295f68cc44d1657bd17269732 (diff) |
Take pkgname change into account
Diffstat (limited to 'src/common.nim')
-rw-r--r-- | src/common.nim | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common.nim b/src/common.nim index 2da7dc0..0dc73f3 100644 --- a/src/common.nim +++ b/src/common.nim @@ -245,6 +245,10 @@ proc bisectVersion(repoPath: string, debug: bool, firstCommit: Option[string], else: none(string) +proc obtainSrcInfo*(path: string): string = + execProcess(bashCmd, ["-c", """cd "$2" && "$1" --printsrcinfo""", + "bash", makePkgCmd, path], options = {}) + proc obtainBuildPkgInfos*(config: Config, pacmanTargets: seq[FullPackageTarget[RpcPackageInfo]]): (seq[PackageInfo], seq[string]) = type @@ -296,10 +300,8 @@ proc obtainBuildPkgInfos*(config: Config, else: discard forkWait(() => execResult(gitCmd, "-C", repoPath, "checkout", "-q", commit.unsafeGet)) - let output = execProcess(bashCmd, ["-c", - """cd "$2/$3" && "$1" --printsrcinfo""", - "bash", makePkgCmd, repoPath, git.path], options = {}) - parseSrcInfo(repo, output, config.arch, + let srcInfo = obtainSrcInfo(repoPath & "/" & git.path) + parseSrcInfo(repo, srcInfo, config.arch, git.url, some(git.branch), commit, some(git.path)) .filter(i => i.version == version) else: |