diff options
author | Elliot Smith <elliot.smith@intel.com> | 2016-07-12 15:54:54 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-07-19 08:56:52 +0100 |
commit | 2db40e377148c862161125a56bb3b9d5d2ed9a7c (patch) | |
tree | 70b5ec7b437a13488061fd5a798a26268790a9d7 /bitbake/lib/bb/ui | |
parent | 1027e0e313c4743a7ddb5e192013fba5d7ad0e1c (diff) | |
download | poky-2db40e377148c862161125a56bb3b9d5d2ed9a7c.tar.gz |
bitbake: toaster: add package manifest path to Target objects
Store the path to the *.rootfs.manifest file for targets which
generate images.
A link to the package manifest is displayed in the build dashboard
for targets which produce image files.
Like the license manifest path, if a target would have produced
the package manifest (but didn't, because it already existed), that
path is copied from the target which did produce the package
manifest.
(Bitbake rev: 79b8e349a0da2ea6b97ad82daa5837e6dfffe0af)
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: bavery <brian.avery@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/ui')
-rw-r--r-- | bitbake/lib/bb/ui/buildinfohelper.py | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/bitbake/lib/bb/ui/buildinfohelper.py b/bitbake/lib/bb/ui/buildinfohelper.py index 52b5e12bff..91189f60ec 100644 --- a/bitbake/lib/bb/ui/buildinfohelper.py +++ b/bitbake/lib/bb/ui/buildinfohelper.py | |||
@@ -256,6 +256,10 @@ class ORMWrapper(object): | |||
256 | target.license_manifest_path = license_manifest_path | 256 | target.license_manifest_path = license_manifest_path |
257 | target.save() | 257 | target.save() |
258 | 258 | ||
259 | def update_target_set_package_manifest(self, target, package_manifest_path): | ||
260 | target.package_manifest_path = package_manifest_path | ||
261 | target.save() | ||
262 | |||
259 | def update_task_object(self, build, task_name, recipe_name, task_stats): | 263 | def update_task_object(self, build, task_name, recipe_name, task_stats): |
260 | """ | 264 | """ |
261 | Find the task for build which matches the recipe and task name | 265 | Find the task for build which matches the recipe and task name |
@@ -1597,7 +1601,7 @@ class BuildInfoHelper(object): | |||
1597 | machine = self.server.runCommand(['getVariable', 'MACHINE'])[0] | 1601 | machine = self.server.runCommand(['getVariable', 'MACHINE'])[0] |
1598 | image_name = self.server.runCommand(['getVariable', 'IMAGE_NAME'])[0] | 1602 | image_name = self.server.runCommand(['getVariable', 'IMAGE_NAME'])[0] |
1599 | 1603 | ||
1600 | # location of the image_license.manifest files for this build; | 1604 | # location of the manifest files for this build; |
1601 | # note that this file is only produced if an image is produced | 1605 | # note that this file is only produced if an image is produced |
1602 | license_directory = \ | 1606 | license_directory = \ |
1603 | self.server.runCommand(['getVariable', 'LICENSE_DIRECTORY'])[0] | 1607 | self.server.runCommand(['getVariable', 'LICENSE_DIRECTORY'])[0] |
@@ -1636,6 +1640,11 @@ class BuildInfoHelper(object): | |||
1636 | real_image_name, | 1640 | real_image_name, |
1637 | 'image_license.manifest') | 1641 | 'image_license.manifest') |
1638 | 1642 | ||
1643 | image_package_manifest_path = os.path.join( | ||
1644 | license_directory, | ||
1645 | real_image_name, | ||
1646 | 'image_license.manifest') | ||
1647 | |||
1639 | # if image_license.manifest exists, we can read the names of bzImage | 1648 | # if image_license.manifest exists, we can read the names of bzImage |
1640 | # and modules files for this build from it, then look for them | 1649 | # and modules files for this build from it, then look for them |
1641 | # in the DEPLOY_DIR_IMAGE; note that this file is only produced | 1650 | # in the DEPLOY_DIR_IMAGE; note that this file is only produced |
@@ -1657,11 +1666,20 @@ class BuildInfoHelper(object): | |||
1657 | 1666 | ||
1658 | # store the license manifest path on the target | 1667 | # store the license manifest path on the target |
1659 | # (this file is also created any time an image file is created) | 1668 | # (this file is also created any time an image file is created) |
1660 | license_path = os.path.join(license_directory, | 1669 | license_manifest_path = os.path.join(license_directory, |
1661 | real_image_name, 'license.manifest') | 1670 | real_image_name, 'license.manifest') |
1662 | 1671 | ||
1663 | self.orm_wrapper.update_target_set_license_manifest( | 1672 | self.orm_wrapper.update_target_set_license_manifest( |
1664 | image_target, license_path) | 1673 | image_target, license_manifest_path) |
1674 | |||
1675 | # store the package manifest path on the target (this file | ||
1676 | # is created any time an image file is created) | ||
1677 | package_manifest_path = os.path.join(deploy_dir_image, | ||
1678 | real_image_name + '.rootfs.manifest') | ||
1679 | |||
1680 | if os.path.exists(package_manifest_path): | ||
1681 | self.orm_wrapper.update_target_set_package_manifest( | ||
1682 | image_target, package_manifest_path) | ||
1665 | 1683 | ||
1666 | # scan the directory for image files relating to this build | 1684 | # scan the directory for image files relating to this build |
1667 | # (via real_image_name); note that we don't have to set | 1685 | # (via real_image_name); note that we don't have to set |