[OE-core] [PATCH 2/3] meta/classes/populate_sdk_base: Only execute write manifest when is populate_sdk
Francisco Pedraza
francisco.j.pedraza.gonzalez at intel.com
Tue Feb 21 22:48:50 UTC 2017
This function is going to be used for generating the eSDK, however the
eSDK package information comes from sstate artifacts instead of package files.
[YOCTO #9038]
Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez at intel.com>
---
meta/classes/populate_sdk_base.bbclass | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/meta/classes/populate_sdk_base.bbclass b/meta/classes/populate_sdk_base.bbclass
index dd3cac5..33665cd 100644
--- a/meta/classes/populate_sdk_base.bbclass
+++ b/meta/classes/populate_sdk_base.bbclass
@@ -60,14 +60,15 @@ SDK_TITLE ?= "${@d.getVar('DISTRO_NAME') or d.getVar('DISTRO')} SDK"
SDK_TARGET_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.target.manifest"
SDK_HOST_MANIFEST = "${SDKDEPLOYDIR}/${TOOLCHAIN_OUTPUTNAME}.host.manifest"
python write_target_sdk_manifest () {
- from oe.sdk import sdk_list_installed_packages
- from oe.utils import format_pkg_list
- sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST"))
- pkgs = sdk_list_installed_packages(d, True)
- if not os.path.exists(sdkmanifestdir):
- bb.utils.mkdirhier(sdkmanifestdir)
- with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output:
- output.write(format_pkg_list(pkgs, 'ver'))
+ if d.getVar('BB_CURRENTTASK') == 'populate_sdk':
+ from oe.sdk import sdk_list_installed_packages
+ from oe.utils import format_pkg_list
+ sdkmanifestdir = os.path.dirname(d.getVar("SDK_TARGET_MANIFEST"))
+ pkgs = sdk_list_installed_packages(d, True)
+ if not os.path.exists(sdkmanifestdir):
+ bb.utils.mkdirhier(sdkmanifestdir)
+ with open(d.getVar('SDK_TARGET_MANIFEST'), 'w') as output:
+ output.write(format_pkg_list(pkgs, 'ver'))
}
python write_sdk_test_data() {
@@ -78,14 +79,15 @@ python write_sdk_test_data() {
}
python write_host_sdk_manifest () {
- from oe.sdk import sdk_list_installed_packages
- from oe.utils import format_pkg_list
- sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST"))
- pkgs = sdk_list_installed_packages(d, False)
- if not os.path.exists(sdkmanifestdir):
- bb.utils.mkdirhier(sdkmanifestdir)
- with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output:
- output.write(format_pkg_list(pkgs, 'ver'))
+ if d.getVar('BB_CURRENTTASK') == 'populate_sdk':
+ from oe.sdk import sdk_list_installed_packages
+ from oe.utils import format_pkg_list
+ sdkmanifestdir = os.path.dirname(d.getVar("SDK_HOST_MANIFEST"))
+ pkgs = sdk_list_installed_packages(d, False)
+ if not os.path.exists(sdkmanifestdir):
+ bb.utils.mkdirhier(sdkmanifestdir)
+ with open(d.getVar('SDK_HOST_MANIFEST'), 'w') as output:
+ output.write(format_pkg_list(pkgs, 'ver'))
}
POPULATE_SDK_POST_TARGET_COMMAND_append = " write_target_sdk_manifest ; write_sdk_test_data ; "
--
1.8.3.1
More information about the Openembedded-core
mailing list