bitbake: buildinfohelper: discover kernel artifacts correctly
Because some image_license.manifest files contain multiple FILES lines, and because those lines can sometimes not contain a list of files (i.e. they look like "FILES:\n"), we were resetting the list of kernel artifacts when we hit the second "empty" line. Fix by ignoring any FILES line which doesn't list files, and by appending any files found in a valid FILES line, rather than overwriting the existing list. [YOCTO #10107] (Bitbake rev: 927ec3524625ac731326b3c1c1361c2a4d2bd9e1) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
46bad463ef
commit
d2797b5ec2
|
@ -1616,7 +1616,10 @@ class BuildInfoHelper(object):
|
||||||
if line.startswith('FILES'):
|
if line.startswith('FILES'):
|
||||||
files_str = line.split(':')[1].strip()
|
files_str = line.split(':')[1].strip()
|
||||||
files_str = re.sub(r' {2,}', ' ', files_str)
|
files_str = re.sub(r' {2,}', ' ', files_str)
|
||||||
files = files_str.split(' ')
|
|
||||||
|
# ignore lines like "FILES:" with no filenames
|
||||||
|
if files_str:
|
||||||
|
files += files_str.split(' ')
|
||||||
return files
|
return files
|
||||||
|
|
||||||
def _endswith(self, str_to_test, endings):
|
def _endswith(self, str_to_test, endings):
|
||||||
|
@ -1734,9 +1737,9 @@ class BuildInfoHelper(object):
|
||||||
real_image_name,
|
real_image_name,
|
||||||
'image_license.manifest')
|
'image_license.manifest')
|
||||||
|
|
||||||
# if image_license.manifest exists, we can read the names of bzImage
|
# if image_license.manifest exists, we can read the names of
|
||||||
# and modules files for this build from it, then look for them
|
# bzImage, modules etc. files for this build from it, then look for
|
||||||
# in the DEPLOY_DIR_IMAGE; note that this file is only produced
|
# them in the DEPLOY_DIR_IMAGE; note that this file is only produced
|
||||||
# if an image file was produced
|
# if an image file was produced
|
||||||
if os.path.isfile(image_license_manifest_path):
|
if os.path.isfile(image_license_manifest_path):
|
||||||
has_files = True
|
has_files = True
|
||||||
|
|
Loading…
Reference in New Issue