bitbake: 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.

(Bitbake rev: a70a7376a8708bde07959deb5d5842d7f84ee5f8)

Signed-off-by: Roland Hieber <rhi@pengutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Roland Hieber
2022-05-08 13:33:12 +02:00
committed by Richard Purdie
parent 5b9eb4be12
commit f564bf2bbd

View File

@@ -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)