summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bitbake/lib/bb/ui/buildinfohelper.py20
1 files changed, 15 insertions, 5 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py
index bf032ae835..52b5e12bff 100644
--- a/bitbake/lib/bb/ui/buildinfohelper.py
+++ b/bitbake/lib/bb/ui/buildinfohelper.py
@@ -875,6 +875,11 @@ class BuildInfoHelper(object):
875 Keeps in memory all data that needs matching before writing it to the database 875 Keeps in memory all data that needs matching before writing it to the database
876 """ 876 """
877 877
878 # tasks which produce image files; note we include '', as we set
879 # the task for a target to '' (i.e. 'build') if no target is
880 # explicitly defined
881 IMAGE_GENERATING_TASKS = ['', 'build', 'image', 'populate_sdk_ext']
882
878 # pylint: disable=protected-access 883 # pylint: disable=protected-access
879 # the code will look into the protected variables of the event; no easy way around this 884 # the code will look into the protected variables of the event; no easy way around this
880 # pylint: disable=bad-continuation 885 # pylint: disable=bad-continuation
@@ -1235,11 +1240,16 @@ class BuildInfoHelper(object):
1235 logger.warning("KeyError in save_target_package_information" 1240 logger.warning("KeyError in save_target_package_information"
1236 "%s ", e) 1241 "%s ", e)
1237 1242
1238 try: 1243 # only try to find files in the image if the task for this
1239 self.orm_wrapper.save_target_file_information(self.internal_state['build'], target, filedata) 1244 # target is one which produces image files; otherwise, the old
1240 except KeyError as e: 1245 # list of files in the files-in-image.txt file will be
1241 logger.warning("KeyError in save_target_file_information" 1246 # appended to the target even if it didn't produce any images
1242 "%s ", e) 1247 if target.task in BuildInfoHelper.IMAGE_GENERATING_TASKS:
1248 try:
1249 self.orm_wrapper.save_target_file_information(self.internal_state['build'], target, filedata)
1250 except KeyError as e:
1251 logger.warning("KeyError in save_target_file_information"
1252 "%s ", e)
1243 1253
1244 1254
1245 1255