Bug 1341213 - Make the index path for toolchain jobs independent of the source path. r?dustin
When I refactored hash_paths to add caching, I mixed things up such that
for each file, we end up hashing:
(u'$sha256sum', u'$topsrcdir/$relpath') $relpath
when the intent was to hash:
$sha256sum $relpath
This change fixes it, such that now the index paths are independent of
the source path, as originally intended.
--- a/taskcluster/taskgraph/util/hash.py
+++ b/taskcluster/taskgraph/util/hash.py
@@ -7,18 +7,17 @@ from mozbuild.util import memoize
from mozpack.files import FileFinder
import mozpack.path as mozpath
import hashlib
@memoize
def _hash_path(path):
with open(path) as fh:
- return (hashlib.sha256(fh.read()).hexdigest(),
- mozpath.normsep(path))
+ return hashlib.sha256(fh.read()).hexdigest()
def hash_paths(base_path, patterns):
"""
Give a list of path patterns, return a digest of the contents of all
the corresponding files, similarly to git tree objects or mercurial
manifests.