wic is present in the esdk but it is not in the path. now that we have wic ls,cp,rm there is a lot of value in being able to use wic to manipulate images from within the esdk so it would be nice if it appeared in the path as a std tool.
Created attachment 4054 [details] Error importing wic module
Trying to include wic in eSDK environment, while running wic in eSDK env, it was failed to import module. Will dig deeper for root cause.
wic is playing with the import path to make sure it finds its modules in the standard build mode: # External modules | scripts_path = os.path.abspath(os.path.dirname(__file__)) | lib_path = scripts_path + '/lib' | sys.path.insert(0, lib_path) | oe_lib_path = os.path.join(os.path.dirname(scripts_path), 'meta', 'lib') sys.path.insert(0, oe_lib_path) | | --- One approch would be to append to PYTHONPATH in the environment script
WIP: http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=rebeccas/12177-wic-esdk
The WIP branch has the patches to enable wic image manipulation commands (wic ls,cp,rm). Tested "wic list images" is working too but not for "wic create". I've understand that wic has its own requirements in order for it to work (http://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#wic-requirements), by looking at the bug list on wic, I think this feature is dependent to other bugzilla or it needs a major restructure in wic. 1. "You must have sourced the build environment setup script (i.e. oe-init-build-env) found in the Build Directory." We need to design for better eSDK support as in eSDK environment, there will be no bitbake command available. We could possibly explore eSDK environment setup script (environment-setup-i586-poky-linux) to help setup the variable needed by wic? https://bugzilla.yoctoproject.org/show_bug.cgi?id=11281 2. "You need to have the build artifacts already available, which typically means that you must have already created an image using the Openembedded build system." In eSDK workflow, the artifacts are available in different location under the condition where BUILDDIR is not defined. We need the ability to set arbitrary artifacts to arbitrary locations so we could use this ability to control wic within eSDK environment. https://bugzilla.yoctoproject.org/show_bug.cgi?id=11280 These are my opinions from my exploratory task on wic. I would like to collect more inputs from developers who are working on wic.
WIP branch with workaround on BUILDDIR set in environment: http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=rebeccas/12177-wic-esdk But this might not be the best solutions.
New contrib branch: http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=rebeccas/wic-dev Where BUILDDIR is being set within wic itself instead of setting from eSDK environment.
Pushed to mailing list: http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146283.html
http://git.openembedded.org/openembedded-core/commit/?id=90df6758a9f8753c646b129aa912e3849bf4c987