buildinfohelper: discover kernel artifacts correctly
PATCH 1/1 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/lib/bb/ui/buildinfohelper.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
bitbake/lib/bb/ui/buildinfohelper.py +7 -4
@@ -1616,7 +1616,10 @@ class BuildInfoHelper(object): if line.startswith('FILES'): files_str = line.split(':')[1].strip() 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 def _endswith(self, str_to_test, endings):
@@ -1729,9 +1732,9 @@ class BuildInfoHelper(object): real_image_name, 'image_license.manifest') - # if image_license.manifest exists, we can read the names of bzImage - # and modules files for this build from it, then look for them - # in the DEPLOY_DIR_IMAGE; note that this file is only produced + # if image_license.manifest exists, we can read the names of + # bzImage, modules etc. files for this build from it, then look for + # them in the DEPLOY_DIR_IMAGE; note that this file is only produced # if an image file was produced if os.path.isfile(image_license_manifest_path): has_files = True
Signature · 1 line
2.7.4
Quoted 11 lines · On 23/08/2016 10:47, "[email protected] on behalf of Elliot…
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]
This works for me.
Thanks!
Belén
Quoted 49 lines
Signed-off-by Elliot Smith <[email protected]>---
bitbake/lib/bb/ui/buildinfohelper.py| 11 +++++++----1 file changed, 7 insertions(+), 4 deletions(-)bitbake/lib/bb/ui/buildinfohelper.py +4
-2@@ -1616,7 +1616,10 @@ class BuildInfoHelper(object): if line.startswith('FILES'): files_str = line.split(':')[1].strip() 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 def _endswith(self, str_to_test, endings):@@ -1729,9 +1732,9 @@ class BuildInfoHelper(object): real_image_name, 'image_license.manifest') - # if image_license.manifest exists, we can read the names ofbzImage
- # and modules files for this build from it, then look for
them
- # in theDEPLOY_DIR_IMAGE; note that this file is only
producedbitbake/lib/bb/ui/buildinfohelper.py +2
-0+ # if image_license.manifest exists, we can read the names of + # bzImage, modules etc. files for this build from it, thenlook for
+ # them in theDEPLOY_DIR_IMAGE; note that this file is only
produced# if an image file was produced if os.path.isfile(image_license_manifest_path): has_files = TrueSignature · 7 lines
2.7.4 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
upstreamed and pushed to toaster-next
Thanks,
Ed
Quoted 54 lines · Elliot Smith
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]
Signed-off-by Elliot Smith <[email protected]>--- bitbake/lib/bb/ui/buildinfohelper.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)bitbake/lib/bb/ui/buildinfohelper.py +7
-4@@ -1616,7 +1616,10 @@ class BuildInfoHelper(object): if line.startswith('FILES'): files_str = line.split(':')[1].strip() 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 def _endswith(self, str_to_test, endings):@@ -1729,9 +1732,9 @@ class BuildInfoHelper(object): real_image_name, 'image_license.manifest') - # if image_license.manifest exists, we can read the names of bzImage - # and modules files for this build from it, then look for them - # in the DEPLOY_DIR_IMAGE; note that this file is only produced + # if image_license.manifest exists, we can read the names of + # bzImage, modules etc. files for this build from it, then look for + # them in the DEPLOY_DIR_IMAGE; note that this file is only produced # if an image file was produced if os.path.isfile(image_license_manifest_path): has_files = TrueSignature · 7 lines
2.7.4 -- _______________________________________________ toaster mailing list [email protected] https://lists.yoctoproject.org/listinfo/toaster
Signature · 3 lines
-- Regards, Ed