summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-16 21:44:20 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-18 09:05:31 +0100
commit07aef86c3a5fde8c335c6697ebbb751f79bbde1d (patch)
treedbaf34f22ad997d93b8abbf2784d4eab92e6df90 /bitbake
parent96795000eab6520d4c919bcdb1a622a346d1cb69 (diff)
downloadpoky-07aef86c3a5fde8c335c6697ebbb751f79bbde1d.tar.gz
bitbake: cache: Handle spaces and colons in directory names for file-checksums
If there is a space in a directory name containing a file in file-checksums (e.g. from a file:// url), you currently get tracebacks from bitbake. This improves the code to handle colons and spaces in the file-checksums names since it possible to figure out the correct names. [YOCTO #8267] (Bitbake rev: 87282b283921a58426f24fb21151db457c5bca66) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/cache.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py
index ef4d660e85..ab09b08b58 100644
--- a/bitbake/lib/bb/cache.py
+++ b/bitbake/lib/bb/cache.py
@@ -528,7 +528,20 @@ class Cache(object):
528 528
529 if hasattr(info_array[0], 'file_checksums'): 529 if hasattr(info_array[0], 'file_checksums'):
530 for _, fl in info_array[0].file_checksums.items(): 530 for _, fl in info_array[0].file_checksums.items():
531 for f in fl.split(): 531 fl = fl.strip()
532 while fl:
533 # A .split() would be simpler but means spaces or colons in filenames would break
534 a = fl.find(":True")
535 b = fl.find(":False")
536 if ((a < 0) and b) or ((b > 0) and (b < a)):
537 f = fl[:b+6]
538 fl = fl[b+7:]
539 elif ((b < 0) and a) or ((a > 0) and (a < b)):
540 f = fl[:a+5]
541 fl = fl[a+6:]
542 else:
543 break
544 fl = fl.strip()
532 if "*" in f: 545 if "*" in f:
533 continue 546 continue
534 f, exist = f.split(":") 547 f, exist = f.split(":")