diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/classes/populate_sdk_base.bbclass | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass index 20ba219deb..0354ee1ab3 100644 --- a/meta/classes/populate_sdk_base.bbclass +++ b/meta/classes/populate_sdk_base.bbclass | |||
@@ -63,15 +63,14 @@ SDK_EXT_TARGET_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.target.manif | |||
63 | SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest" | 63 | SDK_EXT_HOST_MANIFEST = "${SDK_DEPLOY}/${TOOLCHAINEXT_OUTPUTNAME}.host.manifest" |
64 | 64 | ||
65 | python write_target_sdk_manifest () { | 65 | python write_target_sdk_manifest () { |
66 | if d.getVar('BB_CURRENTTASK') == 'populate_sdk': | 66 | from oe.sdk import sdk_list_installed_packages |
67 | from oe.sdk import sdk_list_installed_packages | 67 | from oe.utils import format_pkg_list |
68 | from oe.utils import format_pkg_list | 68 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST")) |
69 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST")) | 69 | pkgs = sdk_list_installed_packages(d, True) |
70 | pkgs = sdk_list_installed_packages(d, True) | 70 | if not os.path.exists(sdkmanifestdir): |
71 | if not os.path.exists(sdkmanifestdir): | 71 | bb.utils.mkdirhier(sdkmanifestdir) |
72 | bb.utils.mkdirhier(sdkmanifestdir) | 72 | with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output: |
73 | with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output: | 73 | output.write(format_pkg_list(pkgs, 'ver')) |
74 | output.write(format_pkg_list(pkgs, 'ver')) | ||
75 | } | 74 | } |
76 | 75 | ||
77 | python write_sdk_test_data() { | 76 | python write_sdk_test_data() { |
@@ -82,22 +81,21 @@ python write_sdk_test_data() { | |||
82 | } | 81 | } |
83 | 82 | ||
84 | python write_host_sdk_manifest () { | 83 | python write_host_sdk_manifest () { |
85 | if d.getVar('BB_CURRENTTASK') == 'populate_sdk': | 84 | from oe.sdk import sdk_list_installed_packages |
86 | from oe.sdk import sdk_list_installed_packages | 85 | from oe.utils import format_pkg_list |
87 | from oe.utils import format_pkg_list | 86 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST")) |
88 | sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST")) | 87 | pkgs = sdk_list_installed_packages(d, False) |
89 | pkgs = sdk_list_installed_packages(d, False) | 88 | if not os.path.exists(sdkmanifestdir): |
90 | if not os.path.exists(sdkmanifestdir): | 89 | bb.utils.mkdirhier(sdkmanifestdir) |
91 | bb.utils.mkdirhier(sdkmanifestdir) | 90 | with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output: |
92 | with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output: | 91 | output.write(format_pkg_list(pkgs, 'ver')) |
93 | output.write(format_pkg_list(pkgs, 'ver')) | ||
94 | } | 92 | } |
95 | 93 | ||
96 | POPULATE_SDK_POST_TARGET_COMMAND_append = " write_sdk_test_data ; " | 94 | POPULATE_SDK_POST_TARGET_COMMAND_append = " write_sdk_test_data ; " |
97 | POPULATE_SDK_POST_TARGET_COMMAND_append_task-populate-sdk = " write_target_sdk_manifest ; " | 95 | POPULATE_SDK_POST_TARGET_COMMAND_append_task-populate-sdk = " write_target_sdk_manifest ; " |
98 | POPULATE_SDK_POST_HOST_COMMAND_append_task-populate-sdk = " write_host_sdk_manifest; " | 96 | POPULATE_SDK_POST_HOST_COMMAND_append_task-populate-sdk = " write_host_sdk_manifest; " |
99 | SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}" | 97 | SDK_PACKAGING_COMMAND = "${@'${SDK_PACKAGING_FUNC};' if '${SDK_PACKAGING_FUNC}' else ''}" |
100 | SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; write_target_sdk_manifest; write_host_sdk_manifest; ${SDK_PACKAGING_COMMAND} " | 98 | SDK_POSTPROCESS_COMMAND = " create_sdk_files; check_sdk_sysroots; tar_sdk; ${SDK_PACKAGING_COMMAND} " |
101 | 99 | ||
102 | def populate_sdk_common(d): | 100 | def populate_sdk_common(d): |
103 | from oe.sdk import populate_sdk | 101 | from oe.sdk import populate_sdk |