<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>12177</bug_id>
          
          <creation_ts>2017-10-03 22:32:07 +0000</creation_ts>
          <short_desc>Support wic in the esdk</short_desc>
          <delta_ts>2018-01-15 00:59:51 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>eSDK</product>
          <component>eSDK</component>
          <version>2.4</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.5 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="brian avery">brian.avery</reporter>
          <assigned_to name="Rebecca Chang">rebecca.swee.fun.chang</assigned_to>
          <cc>amber.n.elliot</cc>
    
    <cc>bluelightning</cc>
    
    <cc>california.l.sullivan</cc>
    
    <cc>rebecca.swee.fun.chang</cc>
    
    <cc>sgw</cc>
    
    <cc>stephano</cc>
          
          <qa_contact name="Francisco Pedraza">francisco.j.pedraza.gonzalez</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>77327</commentid>
    <comment_count>0</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-10-03 22:32:07 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77373</commentid>
    <comment_count>1</comment_count>
      <attachid>4054</attachid>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-10-05 02:29:30 +0000</bug_when>
    <thetext>Created attachment 4054
Error importing wic module</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77374</commentid>
    <comment_count>2</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-10-05 02:30:35 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77595</commentid>
    <comment_count>3</comment_count>
    <who name="brian avery">brian.avery</who>
    <bug_when>2017-10-14 17:27:37 +0000</bug_when>
    <thetext>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 + &apos;/lib&apos;                                      |
sys.path.insert(0, lib_path)                                          |
oe_lib_path = os.path.join(os.path.dirname(scripts_path), &apos;meta&apos;, &apos;lib&apos;)
sys.path.insert(0, oe_lib_path)                                       |
                                                                      |
---
One approch would be to append to PYTHONPATH in the environment script</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77685</commentid>
    <comment_count>4</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2017-10-19 06:26:01 +0000</bug_when>
    <thetext>WIP:
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=rebeccas/12177-wic-esdk</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78861</commentid>
    <comment_count>5</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-01-02 07:38:11 +0000</bug_when>
    <thetext>The WIP branch has the patches to enable wic image manipulation commands (wic ls,cp,rm). Tested &quot;wic list images&quot; is working too but not for &quot;wic create&quot;. 

I&apos;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. &quot;You must have sourced the build environment setup script (i.e. oe-init-build-env) found in the Build Directory.&quot; 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. &quot;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.&quot; 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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78877</commentid>
    <comment_count>6</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-01-03 06:13:52 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78984</commentid>
    <comment_count>7</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-01-10 04:17:52 +0000</bug_when>
    <thetext>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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79020</commentid>
    <comment_count>8</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-01-11 06:15:55 +0000</bug_when>
    <thetext>Pushed to mailing list:
http://lists.openembedded.org/pipermail/openembedded-core/2018-January/146283.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79065</commentid>
    <comment_count>9</comment_count>
    <who name="Rebecca Chang">rebecca.swee.fun.chang</who>
    <bug_when>2018-01-15 00:59:51 +0000</bug_when>
    <thetext>http://git.openembedded.org/openembedded-core/commit/?id=90df6758a9f8753c646b129aa912e3849bf4c987</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>4054</attachid>
            <date>2017-10-05 02:29:30 +0000</date>
            <delta_ts>2017-10-05 02:29:30 +0000</delta_ts>
            <desc>Error importing wic module</desc>
            <filename>wic_in_esdk_error.txt</filename>
            <type>text/plain</type>
            <size>418</size>
            <attacher name="Rebecca Chang">rebecca.swee.fun.chang</attacher>
            
              <data encoding="base64">cmViZWNjYXM6Li4uL2RlcGxveS9zZGsvcG9reV9zZGsgICQgd2hpY2ggd2ljDQovbWVkaWEvcmVi
ZWNjYXMveW9jdG8vMTIxNzcvdG1wL2RlcGxveS9zZGsvcG9reV9zZGsvc3lzcm9vdHMveDg2XzY0
LXBva3lzZGstbGludXgvdXNyL2Jpbi93aWMNCg0KcmViZWNjYXM6Li4uL2RlcGxveS9zZGsvcG9r
eV9zZGsgICQgd2ljIC0taGVscA0KVHJhY2ViYWNrIChtb3N0IHJlY2VudCBjYWxsIGxhc3QpOg0K
ICBGaWxlICIvbWVkaWEvcmViZWNjYXMveW9jdG8vMTIxNzcvdG1wL2RlcGxveS9zZGsvcG9reV9z
ZGsvc3lzcm9vdHMveDg2XzY0LXBva3lzZGstbGludXgvdXNyL2Jpbi93aWMiLCBsaW5lIDU4LCBp
biA8bW9kdWxlPg0KICAgIGZyb20gd2ljIGltcG9ydCBXaWNFcnJvcg0KSW1wb3J0RXJyb3I6IE5v
IG1vZHVsZSBuYW1lZCAnd2ljJw==
</data>

          </attachment>
      

    </bug>

</bugzilla>