All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] buildinfohelper: discover kernel artifacts correctly
@ 2016-08-23  9:47 Elliot Smith
  2016-08-23 10:46 ` Barros Pena, Belen
  2016-08-23 11:21 ` Ed Bartosh
  0 siblings, 2 replies; 4+ messages in thread
From: Elliot Smith @ 2016-08-23  9:47 UTC (permalink / raw)
  To: toaster

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 <elliot.smith@intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index a5a42cd..7dbb560 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -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
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] buildinfohelper: discover kernel artifacts correctly
  2016-08-23  9:47 Elliot Smith
@ 2016-08-23 10:46 ` Barros Pena, Belen
  2016-08-23 11:21 ` Ed Bartosh
  1 sibling, 0 replies; 4+ messages in thread
From: Barros Pena, Belen @ 2016-08-23 10:46 UTC (permalink / raw)
  To: Smith, Elliot, toaster@yoctoproject.org



On 23/08/2016 10:47, "toaster-bounces@yoctoproject.org on behalf of Elliot
Smith" <toaster-bounces@yoctoproject.org on behalf of
elliot.smith@intel.com> wrote:

>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

>
>Signed-off-by: Elliot Smith <elliot.smith@intel.com>
>---
> bitbake/lib/bb/ui/buildinfohelper.py | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
>diff --git a/bitbake/lib/bb/ui/buildinfohelper.py
>b/bitbake/lib/bb/ui/buildinfohelper.py
>index a5a42cd..7dbb560 100644
>--- a/bitbake/lib/bb/ui/buildinfohelper.py
>+++ b/bitbake/lib/bb/ui/buildinfohelper.py
>@@ -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
>-- 
>2.7.4
>
>-- 
>_______________________________________________
>toaster mailing list
>toaster@yoctoproject.org
>https://lists.yoctoproject.org/listinfo/toaster



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] buildinfohelper: discover kernel artifacts correctly
@ 2016-08-23 11:18 Ed Bartosh
  0 siblings, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2016-08-23 11:18 UTC (permalink / raw)
  To: bitbake-devel

From: Elliot Smith <elliot.smith@intel.com>

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 <elliot.smith@intel.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
---
 bitbake/lib/bb/ui/buildinfohelper.py | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index 7a16ec6..0f09b5c 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -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):
@@ -1734,9 +1737,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
-- 
2.1.4



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] buildinfohelper: discover kernel artifacts correctly
  2016-08-23  9:47 Elliot Smith
  2016-08-23 10:46 ` Barros Pena, Belen
@ 2016-08-23 11:21 ` Ed Bartosh
  1 sibling, 0 replies; 4+ messages in thread
From: Ed Bartosh @ 2016-08-23 11:21 UTC (permalink / raw)
  To: Elliot Smith; +Cc: toaster

upstreamed and pushed to toaster-next

Thanks,
Ed

On Tue, Aug 23, 2016 at 10:47:38AM +0100, Elliot Smith wrote:
> 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 <elliot.smith@intel.com>
> ---
>  bitbake/lib/bb/ui/buildinfohelper.py | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
> index a5a42cd..7dbb560 100644
> --- a/bitbake/lib/bb/ui/buildinfohelper.py
> +++ b/bitbake/lib/bb/ui/buildinfohelper.py
> @@ -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
> -- 
> 2.7.4
> 
> -- 
> _______________________________________________
> toaster mailing list
> toaster@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/toaster

-- 
--
Regards,
Ed


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-23 11:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-23 11:18 [PATCH] buildinfohelper: discover kernel artifacts correctly Ed Bartosh
  -- strict thread matches above, loose matches on Subject: below --
2016-08-23  9:47 Elliot Smith
2016-08-23 10:46 ` Barros Pena, Belen
2016-08-23 11:21 ` Ed Bartosh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.