aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-16 17:34:27 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-17 22:52:03 +0100
commit735f7deee8e8d9d3db0778f8d12d8f7abdab4739 (patch)
tree57400b4e206b59d628f29becdc9dda2b9b367f6b
parent9a9b4650bdc038fbe579647cdce201ebe9dc762a (diff)
downloadbitbake-master-next.tar.gz
bitbake-master-next.tar.bz2
bitbake-master-next.zip
Revert "fetch2/checksum/siggen: Fix taskhashes not tracking file directories"master-next
This reverts commit bd42c4dd0f2309cc8e84c89da589e858dcac3d9d.
-rw-r--r--lib/bb/checksum.py11
-rw-r--r--lib/bb/siggen.py11
2 files changed, 2 insertions, 20 deletions
diff --git a/lib/bb/checksum.py b/lib/bb/checksum.py
index 4b39bee0..1d50a264 100644
--- a/lib/bb/checksum.py
+++ b/lib/bb/checksum.py
@@ -50,7 +50,6 @@ class FileChecksumCache(MultiProcessCache):
MultiProcessCache.__init__(self)
def get_checksum(self, f):
- f = os.path.normpath(f)
entry = self.cachedata[0].get(f)
cmtime = self.mtime_cache.cached_mtime(f)
if entry:
@@ -85,14 +84,6 @@ class FileChecksumCache(MultiProcessCache):
return None
return checksum
- #
- # Changing the format of file-checksums is problematic as both OE and Bitbake have
- # knowledge of them. We need to encode a new piece of data, the portion of the path
- # we care about from a checksum perspective. This means that files that change subdirectory
- # are tracked by the task hashes. To do this, we do something horrible and put a "/./" into
- # the path. The filesystem handles it but it gives us a marker to know which subsection
- # of the path to cache.
- #
def checksum_dir(pth):
# Handle directories recursively
if pth == "/":
@@ -101,7 +92,7 @@ class FileChecksumCache(MultiProcessCache):
for root, dirs, files in os.walk(pth, topdown=True):
[dirs.remove(d) for d in list(dirs) if d in localdirsexclude]
for name in files:
- fullpth = os.path.join(root, name).replace(pth, os.path.join(pth, "."))
+ fullpth = os.path.join(root, name)
checksum = checksum_file(fullpth)
if checksum:
dirchecksums.append((fullpth, checksum))
diff --git a/lib/bb/siggen.py b/lib/bb/siggen.py
index 730e0f9a..578ba5d6 100644
--- a/lib/bb/siggen.py
+++ b/lib/bb/siggen.py
@@ -328,8 +328,6 @@ class SignatureGeneratorBasic(SignatureGenerator):
for (f, cs) in self.file_checksum_values[tid]:
if cs:
- if "/./" in f:
- data = data + f.split("/./")[1]
data = data + cs
if tid in self.taints:
@@ -387,12 +385,7 @@ class SignatureGeneratorBasic(SignatureGenerator):
if runtime and tid in self.taskhash:
data['runtaskdeps'] = self.runtaskdeps[tid]
- data['file_checksum_values'] = []
- for f,cs in self.file_checksum_values[tid]:
- if "/./" in f:
- data['file_checksum_values'].append((f.split("/./")[1], cs))
- else:
- data['file_checksum_values'].append((os.path.basename(f), cs))
+ data['file_checksum_values'] = [(os.path.basename(f), cs) for f,cs in self.file_checksum_values[tid]]
data['runtaskhashes'] = {}
for dep in data['runtaskdeps']:
data['runtaskhashes'][dep] = self.get_unihash(dep)
@@ -1035,8 +1028,6 @@ def calc_taskhash(sigdata):
for c in sigdata['file_checksum_values']:
if c[1]:
- if "/" in c[0]:
- data = data + c[0]
data = data + c[1]
if 'taint' in sigdata: