cache: correctly handle file names containing colons
A message that is not in the archive (sent off-list or not yet received): 6d5ede2c6ee8a46782e0b1c251516602c35a024e.camel@linuxfoundation.org
PATCH v2 1/1 cache: correctly handle file names containing colons
File names containing colons cause split() to return a list with more than two elements, which will lead to a stack trace ending in:
ValueError: too many values to unpack (expected 2)
Split only once at the last colon, thereby making sure that only two elements are returned.
Signed-off-by Roland Hieber <[email protected]>
---
* v1 -> v2: add Signed-off-by
lib/bb/cache.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/bb/cache.py +1 -1
@@ -619,7 +619,7 @@ class Cache(NoCache): for f in flist: if not f: continue - f, exist = f.split(":") + f, exist = f.rsplit(":", 1) if (exist == "True" and not os.path.exists(f)) or (exist == "False" and os.path.exists(f)): self.logger.debug2("%s's file checksum list file %s changed", fn, f)
Signature · 1 line
2.30.2