diff options
Diffstat (limited to 'meta/classes')
| -rw-r--r-- | meta/classes/buildhistory.bbclass | 11 | ||||
| -rw-r--r-- | meta/classes/license.bbclass | 8 | ||||
| -rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 8 | ||||
| -rw-r--r-- | meta/classes/rootfs-postcommands.bbclass | 4 |
4 files changed, 22 insertions, 9 deletions
diff --git a/meta/classes/buildhistory.bbclass b/meta/classes/buildhistory.bbclass index 2c144abb97..9f1744293a 100644 --- a/meta/classes/buildhistory.bbclass +++ b/meta/classes/buildhistory.bbclass | |||
| @@ -337,18 +337,21 @@ def write_pkghistory(pkginfo, d): | |||
| 337 | def buildhistory_list_installed(d, rootfs_type="image"): | 337 | def buildhistory_list_installed(d, rootfs_type="image"): |
| 338 | from oe.rootfs import image_list_installed_packages | 338 | from oe.rootfs import image_list_installed_packages |
| 339 | from oe.sdk import sdk_list_installed_packages | 339 | from oe.sdk import sdk_list_installed_packages |
| 340 | from oe.utils import format_pkg_list | ||
| 340 | 341 | ||
| 341 | process_list = [('file', 'bh_installed_pkgs.txt'),\ | 342 | process_list = [('file', 'bh_installed_pkgs.txt'),\ |
| 342 | ('deps', 'bh_installed_pkgs_deps.txt')] | 343 | ('deps', 'bh_installed_pkgs_deps.txt')] |
| 343 | 344 | ||
| 345 | if rootfs_type == "image": | ||
| 346 | pkgs = image_list_installed_packages(d) | ||
| 347 | else: | ||
| 348 | pkgs = sdk_list_installed_packages(d, rootfs_type == "sdk_target") | ||
| 349 | |||
| 344 | for output_type, output_file in process_list: | 350 | for output_type, output_file in process_list: |
| 345 | output_file_full = os.path.join(d.getVar('WORKDIR', True), output_file) | 351 | output_file_full = os.path.join(d.getVar('WORKDIR', True), output_file) |
| 346 | 352 | ||
| 347 | with open(output_file_full, 'w') as output: | 353 | with open(output_file_full, 'w') as output: |
| 348 | if rootfs_type == "image": | 354 | output.write(format_pkg_list(pkgs, output_type)) |
| 349 | output.write(image_list_installed_packages(d, output_type)) | ||
| 350 | else: | ||
| 351 | output.write(sdk_list_installed_packages(d, rootfs_type == "sdk_target", output_type)) | ||
| 352 | 355 | ||
| 353 | python buildhistory_list_installed_image() { | 356 | python buildhistory_list_installed_image() { |
| 354 | buildhistory_list_installed(d) | 357 | buildhistory_list_installed(d) |
diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass index 8a42874600..301216d5d6 100644 --- a/meta/classes/license.bbclass +++ b/meta/classes/license.bbclass | |||
| @@ -21,8 +21,12 @@ python write_package_manifest() { | |||
| 21 | license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}') | 21 | license_image_dir = d.expand('${LICENSE_DIRECTORY}/${IMAGE_NAME}') |
| 22 | bb.utils.mkdirhier(license_image_dir) | 22 | bb.utils.mkdirhier(license_image_dir) |
| 23 | from oe.rootfs import image_list_installed_packages | 23 | from oe.rootfs import image_list_installed_packages |
| 24 | from oe.utils import format_pkg_list | ||
| 25 | |||
| 26 | pkgs = image_list_installed_packages(d) | ||
| 27 | output = format_pkg_list(pkgs) | ||
| 24 | open(os.path.join(license_image_dir, 'package.manifest'), | 28 | open(os.path.join(license_image_dir, 'package.manifest'), |
| 25 | 'w+').write(image_list_installed_packages(d)) | 29 | 'w+').write(output) |
| 26 | } | 30 | } |
| 27 | 31 | ||
| 28 | python write_deploy_manifest() { | 32 | python write_deploy_manifest() { |
| @@ -38,7 +42,7 @@ python license_create_manifest() { | |||
| 38 | return 0 | 42 | return 0 |
| 39 | 43 | ||
| 40 | pkg_dic = {} | 44 | pkg_dic = {} |
| 41 | for pkg in image_list_installed_packages(d).splitlines(): | 45 | for pkg in sorted(image_list_installed_packages(d)): |
| 42 | pkg_info = os.path.join(d.getVar('PKGDATA_DIR', True), | 46 | pkg_info = os.path.join(d.getVar('PKGDATA_DIR', True), |
| 43 | 'runtime-reverse', pkg) | 47 | 'runtime-reverse', pkg) |
| 44 | pkg_name = os.path.basename(os.readlink(pkg_info)) | 48 | pkg_name = os.path.basename(os.readlink(pkg_info)) |
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 7ca1df67a2..99b64f7429 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
| @@ -62,20 +62,24 @@ SDK_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.target.manifest" | |||
| 62 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" | 62 | SDK_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.host.manifest" |
| 63 | python write_target_sdk_manifest () { | 63 | python write_target_sdk_manifest () { |
| 64 | from oe.sdk import sdk_list_installed_packages | 64 | from oe.sdk import sdk_list_installed_packages |
| 65 | from oe.utils import format_pkg_list | ||
| 65 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST", True)) | 66 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST", True)) |
| 67 | pkgs = sdk_list_installed_packages(d, True) | ||
| 66 | if not os.path.exists(sdkmanifestdir): | 68 | if not os.path.exists(sdkmanifestdir): |
| 67 | bb.utils.mkdirhier(sdkmanifestdir) | 69 | bb.utils.mkdirhier(sdkmanifestdir) |
| 68 | with open(d.getVar('SDK_TARGET_MANIFEST', True), 'w') as output: | 70 | with open(d.getVar('SDK_TARGET_MANIFEST', True), 'w') as output: |
| 69 | output.write(sdk_list_installed_packages(d, True, 'ver')) | 71 | output.write(format_pkg_list(pkgs, 'ver')) |
| 70 | } | 72 | } |
| 71 | 73 | ||
| 72 | python write_host_sdk_manifest () { | 74 | python write_host_sdk_manifest () { |
| 73 | from oe.sdk import sdk_list_installed_packages | 75 | from oe.sdk import sdk_list_installed_packages |
| 76 | from oe.utils import format_pkg_list | ||
| 74 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST", True)) | 77 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST", True)) |
| 78 | pkgs = sdk_list_installed_packages(d, False) | ||
| 75 | if not os.path.exists(sdkmanifestdir): | 79 | if not os.path.exists(sdkmanifestdir): |
| 76 | bb.utils.mkdirhier(sdkmanifestdir) | 80 | bb.utils.mkdirhier(sdkmanifestdir) |
| 77 | with open(d.getVar('SDK_HOST_MANIFEST', True), 'w') as output: | 81 | with open(d.getVar('SDK_HOST_MANIFEST', True), 'w') as output: |
| 78 | output.write(sdk_list_installed_packages(d, False, 'ver')) | 82 | output.write(format_pkg_list(pkgs, 'ver')) |
| 79 | } | 83 | } |
| 80 | 84 | ||
| 81 | POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; " | 85 | POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; " |
diff --git a/meta/classes/rootfs-postcommands.bbclass b/meta/classes/rootfs-postcommands.bbclass index 970e9f34b1..0736d6c533 100644 --- a/meta/classes/rootfs-postcommands.bbclass +++ b/meta/classes/rootfs-postcommands.bbclass | |||
| @@ -207,13 +207,15 @@ insert_feed_uris () { | |||
| 207 | 207 | ||
| 208 | python write_image_manifest () { | 208 | python write_image_manifest () { |
| 209 | from oe.rootfs import image_list_installed_packages | 209 | from oe.rootfs import image_list_installed_packages |
| 210 | from oe.utils import format_pkg_list | ||
| 210 | 211 | ||
| 211 | deploy_dir = d.getVar('DEPLOY_DIR_IMAGE', True) | 212 | deploy_dir = d.getVar('DEPLOY_DIR_IMAGE', True) |
| 212 | link_name = d.getVar('IMAGE_LINK_NAME', True) | 213 | link_name = d.getVar('IMAGE_LINK_NAME', True) |
| 213 | manifest_name = d.getVar('IMAGE_MANIFEST', True) | 214 | manifest_name = d.getVar('IMAGE_MANIFEST', True) |
| 214 | 215 | ||
| 216 | pkgs = image_list_installed_packages(d) | ||
| 215 | with open(manifest_name, 'w+') as image_manifest: | 217 | with open(manifest_name, 'w+') as image_manifest: |
| 216 | image_manifest.write(image_list_installed_packages(d, 'ver')) | 218 | image_manifest.write(format_pkg_list(pkgs, "ver")) |
| 217 | image_manifest.write("\n") | 219 | image_manifest.write("\n") |
| 218 | 220 | ||
| 219 | if manifest_name is not None and os.path.exists(manifest_name): | 221 | if manifest_name is not None and os.path.exists(manifest_name): |
