diff options
author | Aníbal Limón <anibal.limon@linux.intel.com> | 2017-06-30 16:07:30 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-07-06 14:38:14 +0100 |
commit | 2d84c7a55daf3777ea31f557cf940f587ec62ab5 (patch) | |
tree | 16c5628be86468e22bafb289fe1ad600e76e78b6 /meta/classes/populate_sdk_base.bbclass | |
parent | 1542de816c805919435bd7d44beeba877e1938a3 (diff) | |
download | poky-2d84c7a55daf3777ea31f557cf940f587ec62ab5.tar.gz |
classes/populate_sdk_base: Fix SDK manifest generation
The write_{host,target}_sdk_manifest don't need to be set as
SDK_POSTPROCESS_COMMAND because are already append to
POPULATE_SDK_POST_{HOST,TARGET}_COMMAND and the if doesn't
make sense because are only added for populate sdk task.
[YOCTO #11741]
(From OE-Core rev: b10ecbab3acd46e48d36910e30544e9f5f08d6d7)
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/populate_sdk_base.bbclass')
-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 |