diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-06 14:45:07 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-04-14 09:48:33 +0100 |
commit | 73d0fcf5d55f0319bfee5de970258bc1b27fa18f (patch) | |
tree | 0142dc21eb959e8cb2ebbe871acd86b1dfcb510d /bitbake | |
parent | 0be2abfe7c9e249da4c237c12925c507d569e2e4 (diff) | |
download | poky-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')
-rw-r--r-- | bitbake/lib/bb/checksum.py | 10 |
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 | |||
11 | import stat | 11 | import stat |
12 | import bb.utils | 12 | import bb.utils |
13 | import logging | 13 | import logging |
14 | import re | ||
14 | from bb.cache import MultiProcessCache | 15 | from bb.cache import MultiProcessCache |
15 | 16 | ||
16 | logger = logging.getLogger("BitBake.Cache") | 17 | logger = logging.getLogger("BitBake.Cache") |
17 | 18 | ||
19 | filelist_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 |
20 | class FileMtimeCache(object): | 23 | class 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 |