variable name clash

This commit is contained in:
Christoph Reiter
2019-06-08 22:57:43 +02:00
parent 6921954d41
commit 7c4bbb545b

View File

@@ -34,14 +34,14 @@ from multiprocessing import cpu_count
def get_cache_key(pkgbuild_path):
pkgbuild_path = os.path.abspath(pkgbuild_path)
git_cwd = os.path.dirname(pkgbuild_path)
relpath = os.path.relpath(pkgbuild_path, git_cwd)
git_path = os.path.relpath(pkgbuild_path, git_cwd)
h = hashlib.new("SHA1")
with open(pkgbuild_path, "rb") as f:
h.update(f.read())
fileinfo = subprocess.check_output(
["git", "ls-files", "-s", "--full-name", relpath],
["git", "ls-files", "-s", "--full-name", git_path],
cwd=git_cwd).decode("utf-8").strip()
h.update(fileinfo.encode("utf-8"))
@@ -56,7 +56,7 @@ def get_cache_key(pkgbuild_path):
def get_srcinfo_for_pkgbuild(pkgbuild_path):
pkgbuild_path = os.path.abspath(pkgbuild_path)
git_cwd = os.path.dirname(pkgbuild_path)
relpath = os.path.relpath(pkgbuild_path, git_cwd)
git_path = os.path.relpath(pkgbuild_path, git_cwd)
key = get_cache_key(pkgbuild_path)
print("Parsing %r" % pkgbuild_path)
@@ -64,7 +64,7 @@ def get_srcinfo_for_pkgbuild(pkgbuild_path):
with open(os.devnull, 'wb') as devnull:
text = subprocess.check_output(
["bash", "/usr/bin/makepkg-mingw", "--printsrcinfo", "-p",
relpath],
git_path],
cwd=git_cwd,
stderr=devnull).decode("utf-8")
@@ -73,12 +73,12 @@ def get_srcinfo_for_pkgbuild(pkgbuild_path):
cwd=git_cwd).decode("utf-8").strip()
relpath = subprocess.check_output(
["git", "ls-files", "--full-name", relpath],
["git", "ls-files", "--full-name", git_path],
cwd=git_cwd).decode("utf-8").strip()
relpath = os.path.dirname(relpath)
date = subprocess.check_output(
["git", "log", "-1", "--format=%ci", relpath],
["git", "log", "-1", "--format=%ci", git_path],
cwd=git_cwd).decode("utf-8")
date = date.rsplit(" ", 1)[0]