summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-06 14:45:07 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-04-14 09:48:33 +0100
commit73d0fcf5d55f0319bfee5de970258bc1b27fa18f (patch)
tree0142dc21eb959e8cb2ebbe871acd86b1dfcb510d /bitbake/lib/bb
parent0be2abfe7c9e249da4c237c12925c507d569e2e4 (diff)
downloadpoky-73d0fcf5d55f0319bfee5de970258bc1b27fa18f.tar.gz
bitbake: checksum: Allow spaces in URI filenames
If there are spaces in the URI filenames it can break the code. We already solved this issue once somewhere else in the code so use the same regex trick here as well. We should ultimately refactor this code but at least fix the issue for now. (Bitbake rev: 57e2fc4d7f60afea4d4b2c84761324dd99e74a87) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb')
-rw-r--r--bitbake/lib/bb/checksum.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/bitbake/lib/bb/checksum.py b/bitbake/lib/bb/checksum.py
index fb8a77f6ab..557793d366 100644
--- a/bitbake/lib/bb/checksum.py
+++ b/bitbake/lib/bb/checksum.py
@@ -11,10 +11,13 @@ import os
11import stat 11import stat
12import bb.utils 12import bb.utils
13import logging 13import logging
14import re
14from bb.cache import MultiProcessCache 15from bb.cache import MultiProcessCache
15 16
16logger = logging.getLogger("BitBake.Cache") 17logger = logging.getLogger("BitBake.Cache")
17 18
19filelist_regex = re.compile(r'(?:(?<=:True)|(?<=:False))\s+')
20
18# mtime cache (non-persistent) 21# mtime cache (non-persistent)
19# based upon the assumption that files do not change during bitbake run 22# based upon the assumption that files do not change during bitbake run
20class FileMtimeCache(object): 23class FileMtimeCache(object):
@@ -109,7 +112,12 @@ class FileChecksumCache(MultiProcessCache):
109 return dirchecksums 112 return dirchecksums
110 113
111 checksums = [] 114 checksums = []
112 for pth in filelist.split(): 115 for pth in filelist_regex.split(filelist):
116 if not pth:
117 continue
118 pth = pth.strip()
119 if not pth:
120 continue
113 exist = pth.split(":")[1] 121 exist = pth.split(":")[1]
114 if exist == "False": 122 if exist == "False":
115 continue 123 continue