<?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>9043</bug_id>
          
          <creation_ts>2016-02-04 02:33:03 +0000</creation_ts>
          <short_desc>Extensible SDK: sdk-update does not work from local path</short_desc>
          <delta_ts>2016-03-18 07:02:34 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1 M3</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Yi Zhao">yi.zhao</reporter>
          <assigned_to name="Juro Bystricky">juro.bystricky</assigned_to>
          <cc>alexandru.c.georgescu</cc>
    
    <cc>anibal.limon</cc>
    
    <cc>bluelightning</cc>
    
    <cc>bogdanx.a.voiculescu</cc>
    
    <cc>costin.c.constantin</cc>
    
    <cc>ke.zou</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>yi.zhao</cc>
          
          <qa_contact name="Yi Zhao">yi.zhao</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>Regression (Used to work)</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>58518</commentid>
    <comment_count>0</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2016-02-04 02:33:03 +0000</bug_when>
    <thetext>Git rev: master/3d2c0f5902cacf9d8544bf263b51ef0dd1a7218c

I got an error when running sdk-update from a local path on 2.1_M2

#######################
$ devtool sdk-update /buildarea/poky_sdk
Traceback (most recent call last):
  File &quot;/buildarea/poky_sdk_old/sysroots/x86_64-pokysdk-linux//usr/bin/devtool&quot;, line 305, in &lt;module&gt;
    ret = main()
  File &quot;/buildarea/poky_sdk_old/sysroots/x86_64-pokysdk-linux//usr/bin/devtool&quot;, line 292, in main
    ret = args.func(args, config, basepath, workspace)
  File &quot;/buildarea/poky_sdk_old/layers/build/scripts/lib/devtool/sdk.py&quot;, line 138, in sdk_update
    sstate_dir = os.path.join(newsdk_path, &apos;sstate-cache&apos;)
NameError: global name &apos;newsdk_path&apos; is not defined
#######################


Steps:
1. Build an ext_sdk toolchain against the old git rev
2. Build another ext_sdk toolchain against the new git rev
3. Install the old ext_sdk into poky_sdk_old directory, install the new ext_sdk into poky_sdk_new directory
4. cd poky_sdk_old, setup the environment
5. Run devtool sdk-update  poky_sdk_new</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58628</commentid>
    <comment_count>1</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2016-02-05 10:27:21 +0000</bug_when>
    <thetext>Argument sdk-update seems to be removed:
devtool sdk-update http://localhost:8000
ERROR: argument &lt;subcommand&gt;: invalid choice: &apos;sdk-update&apos; (choose from &apos;create-workspace&apos;, &apos;deploy-target&apos;, &apos;undeploy-target&apos;, &apos;search&apos;, &apos;build&apos;, &apos;add&apos;, &apos;modify&apos;, &apos;extract&apos;, &apos;sync&apos;, &apos;update-recipe&apos;, &apos;status&apos;, &apos;reset&apos;, &apos;upgrade&apos;, &apos;edit-recipe&apos;, &apos;configure-help&apos;, &apos;build-image&apos;)
usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q]
               [--color COLOR] [-h]
               &lt;subcommand&gt; ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59457</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-02-25 00:19:09 +0000</bug_when>
    <thetext>sdk-update hasn&apos;t been removed. You won&apos;t find it in the list of commands supported by devtool outside of the extensible SDK however, it&apos;s only available within the extensible SDK environment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59503</commentid>
    <comment_count>3</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2016-02-26 21:06:21 +0000</bug_when>
    <thetext>Could reproduce with master e0fd96442a20e3fe7953bf38fc02520cd0dd4d6a on Feb 26/2016</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59540</commentid>
    <comment_count>4</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2016-02-29 17:32:47 +0000</bug_when>
    <thetext>This should fix it, (about to test the hypothesis):

diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
index fbf2e79..22c5279 100644
--- a/scripts/lib/devtool/sdk.py
+++ b/scripts/lib/devtool/sdk.py
@@ -133,6 +133,7 @@ def sdk_update(args, config, basepath, workspace):
             logger.debug(&quot;Found conf/locked-sigs.inc in %s&quot; % updateserver)
         update_dict = generate_update_dict(new_locked_sig_file_path, old_locked_sig_file_path)
         logger.debug(&quot;update_dict = %s&quot; % update_dict)
+        newsdk_path = updateserver
         sstate_dir = os.path.join(newsdk_path, &apos;sstate-cache&apos;)
         if not os.path.exists(sstate_dir):
             logger.error(&quot;sstate-cache directory not found under %s&quot; % newsdk_path)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59541</commentid>
    <comment_count>5</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-02-29 18:20:04 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; This should fix it, (about to test the hypothesis):
&gt; 
&gt; diff --git a/scripts/lib/devtool/sdk.py b/scripts/lib/devtool/sdk.py
&gt; index fbf2e79..22c5279 100644
&gt; --- a/scripts/lib/devtool/sdk.py
&gt; +++ b/scripts/lib/devtool/sdk.py
&gt; @@ -133,6 +133,7 @@ def sdk_update(args, config, basepath, workspace):
&gt;              logger.debug(&quot;Found conf/locked-sigs.inc in %s&quot; % updateserver)
&gt;          update_dict = generate_update_dict(new_locked_sig_file_path,
&gt; old_locked_sig_file_path)
&gt;          logger.debug(&quot;update_dict = %s&quot; % update_dict)
&gt; +        newsdk_path = updateserver
&gt;          sstate_dir = os.path.join(newsdk_path, &apos;sstate-cache&apos;)
&gt;          if not os.path.exists(sstate_dir):
&gt;              logger.error(&quot;sstate-cache directory not found under %s&quot; %
&gt; newsdk_path)

Hi Juro,

You could test using the testsdkext task, you need to inherit testsdk class in local.conf and then remove comments [1] of the local test code.

$ bitbake core-image-minimal -c populate_sdk_ext
$ bitbake core-image-minimal -c testsdkext

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/tree/meta/lib/oeqa/sdkext/sdk_update.py#n33</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59548</commentid>
    <comment_count>6</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2016-02-29 20:41:20 +0000</bug_when>
    <thetext>At this point SDK installation does not work.

local.conf:
USER_CLASSES += &quot; testsdk &quot; 

$ bitbake core-image-minimal -c testsdkext


ERROR: core-image-minimal-1.0-r0 do_testsdkext: Couldn&apos;t install the SDK EXT:
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.0+snapshot
===================================================================================
You are about to install the SDK to &quot;/data/master/poky/build-9043-fixed1/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testsdkext/tc&quot;. Proceed[Y/n]? Y
Extracting SDK..........................................done
Setting it up...
Extracting buildtools...
Preparing build system...
ERROR: SDK preparation failed: see /data/master/poky/build-9043-fixed1/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/testsdkext/tc/preparing_build_system.log

ERROR: core-image-minimal-1.0-r0 do_testsdkext: Function failed: do_testsdkext
ERROR: Logfile of failure stored in: /data/master/poky/build-9043-fixed1/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_testsdkext.28359
ERROR: Task 0 (/data/master/poky/meta/recipes-core/images/core-image-minimal.bb, do_testsdkext) failed with exit code &apos;1&apos;
NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn&apos;t need to be rerun and 1 failed.

It is probably related to renaming layers (meta-poky).
Manual installation of SDK generates the same error.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59549</commentid>
    <comment_count>7</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2016-02-29 20:43:44 +0000</bug_when>
    <thetext>(In reply to comment #6)
&gt; At this point SDK installation does not work.
&gt; 
&gt; local.conf:
&gt; USER_CLASSES += &quot; testsdk &quot; 
&gt; 
&gt; $ bitbake core-image-minimal -c testsdkext
&gt; 
&gt; 
&gt; ERROR: core-image-minimal-1.0-r0 do_testsdkext: Couldn&apos;t install the SDK EXT:
&gt; Poky (Yocto Project Reference Distro) Extensible SDK installer version
&gt; 2.0+snapshot
&gt; =============================================================================
&gt; ======
&gt; You are about to install the SDK to
&gt; &quot;/data/master/poky/build-9043-fixed1/tmp/work/qemux86-poky-linux/core-image-
&gt; minimal/1.0-r0/testsdkext/tc&quot;. Proceed[Y/n]? Y
&gt; Extracting SDK..........................................done
&gt; Setting it up...
&gt; Extracting buildtools...
&gt; Preparing build system...
&gt; ERROR: SDK preparation failed: see
&gt; /data/master/poky/build-9043-fixed1/tmp/work/qemux86-poky-linux/core-image-
&gt; minimal/1.0-r0/testsdkext/tc/preparing_build_system.log
&gt; 
&gt; ERROR: core-image-minimal-1.0-r0 do_testsdkext: Function failed:
&gt; do_testsdkext
&gt; ERROR: Logfile of failure stored in:
&gt; /data/master/poky/build-9043-fixed1/tmp/work/qemux86-poky-linux/core-image-
&gt; minimal/1.0-r0/temp/log.do_testsdkext.28359
&gt; ERROR: Task 0
&gt; (/data/master/poky/meta/recipes-core/images/core-image-minimal.bb,
&gt; do_testsdkext) failed with exit code &apos;1&apos;
&gt; NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn&apos;t need to be rerun
&gt; and 1 failed.
&gt; 
&gt; It is probably related to renaming layers (meta-poky).
&gt; Manual installation of SDK generates the same error.

Yes there was a break in the weekend due to unative class change, i expect to be fixed today.

Cheers,
    alimon</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59608</commentid>
    <comment_count>8</comment_count>
      <attachid>3014</attachid>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2016-03-01 22:22:02 +0000</bug_when>
    <thetext>Created attachment 3014
Console output of bitbake -c testsdkext</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59609</commentid>
    <comment_count>9</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2016-03-01 22:23:39 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; (In reply to comment #6)
&gt; &gt; At this point SDK installation does not work.
&gt; &gt; 
&gt; &gt; local.conf:
&gt; &gt; USER_CLASSES += &quot; testsdk &quot; 
&gt; &gt; 
&gt; &gt; $ bitbake core-image-minimal -c testsdkext
&gt; &gt; 
&gt; &gt; 
&gt; &gt; ERROR: core-image-minimal-1.0-r0 do_testsdkext: Couldn&apos;t install the SDK EXT:
&gt; &gt; Poky (Yocto Project Reference Distro) Extensible SDK installer version
&gt; &gt; 2.0+snapshot
&gt; &gt; =============================================================================
&gt; &gt; ======
&gt; &gt; You are about to install the SDK to
&gt; &gt; &quot;/data/master/poky/build-9043-fixed1/tmp/work/qemux86-poky-linux/core-image-
&gt; &gt; minimal/1.0-r0/testsdkext/tc&quot;. Proceed[Y/n]? Y
&gt; &gt; Extracting SDK..........................................done
&gt; &gt; Setting it up...
&gt; &gt; Extracting buildtools...
&gt; &gt; Preparing build system...
&gt; &gt; ERROR: SDK preparation failed: see
&gt; &gt; /data/master/poky/build-9043-fixed1/tmp/work/qemux86-poky-linux/core-image-
&gt; &gt; minimal/1.0-r0/testsdkext/tc/preparing_build_system.log
&gt; &gt; 
&gt; &gt; ERROR: core-image-minimal-1.0-r0 do_testsdkext: Function failed:
&gt; &gt; do_testsdkext
&gt; &gt; ERROR: Logfile of failure stored in:
&gt; &gt; /data/master/poky/build-9043-fixed1/tmp/work/qemux86-poky-linux/core-image-
&gt; &gt; minimal/1.0-r0/temp/log.do_testsdkext.28359
&gt; &gt; ERROR: Task 0
&gt; &gt; (/data/master/poky/meta/recipes-core/images/core-image-minimal.bb,
&gt; &gt; do_testsdkext) failed with exit code &apos;1&apos;
&gt; &gt; NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn&apos;t need to be rerun
&gt; &gt; and 1 failed.
&gt; &gt; 
&gt; &gt; It is probably related to renaming layers (meta-poky).
&gt; &gt; Manual installation of SDK generates the same error.
&gt; 
&gt; Yes there was a break in the weekend due to unative class change, i expect
&gt; to be fixed today.
&gt; 
&gt; Cheers,
&gt;     alimon

OK, it worked today, tests passed. (See the attached log).
I&apos;ll post the patch to the mailing list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59637</commentid>
    <comment_count>10</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2016-03-02 21:01:32 +0000</bug_when>
    <thetext>I posted two patches to the mailing list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59697</commentid>
    <comment_count>11</comment_count>
    <who name="Juro Bystricky">juro.bystricky</who>
    <bug_when>2016-03-03 18:00:44 +0000</bug_when>
    <thetext>Merged:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=14dd07caac25f252986ad1dda264abee313568dd

and

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=b04280ab5ff9cae40c4894767084b9306755c614</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>60131</commentid>
    <comment_count>12</comment_count>
    <who name="Yi Zhao">yi.zhao</who>
    <bug_when>2016-03-18 07:02:34 +0000</bug_when>
    <thetext>Verified it with 2.1 M3 RC1.
Git rev: master/8debfea81e69d038bd2d56314b272cb74f5582ed

I found another issue and filed a new bug 9301 to report it.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>3014</attachid>
            <date>2016-03-01 22:22:02 +0000</date>
            <delta_ts>2016-03-01 22:22:02 +0000</delta_ts>
            <desc>Console output of bitbake -c testsdkext</desc>
            <filename>file_9043.txt</filename>
            <type>text/plain</type>
            <size>2069</size>
            <attacher name="Juro Bystricky">juro.bystricky</attacher>
            
              <data encoding="base64">anVyb0BqdXJvLVByZWNpc2lvbi1UNTYxMDovZGF0YS9tYXN0ZXIvcG9reS9idWlsZC05MDQzLWZp
eGVkMSQgYml0YmFrZSBjb3JlLWltYWdlLW1pbmltYWwgLWMgdGVzdHNka2V4dA0KTG9hZGluZyBj
YWNoZTogMTAwJSB8IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
IyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMj
IyMjIyMjfCBFVEE6ICAwMDowMDowMA0KTG9hZGVkIDEzMDMgZW50cmllcyBmcm9tIGRlcGVuZGVu
Y3kgY2FjaGUuDQpOT1RFOiBSZXNvbHZpbmcgYW55IG1pc3NpbmcgdGFzayBxdWV1ZSBkZXBlbmRl
bmNpZXMNCg0KQnVpbGQgQ29uZmlndXJhdGlvbjoNCkJCX1ZFUlNJT04gICAgICAgID0gIjEuMjku
MCINCkJVSUxEX1NZUyAgICAgICAgID0gIng4Nl82NC1saW51eCINCk5BVElWRUxTQlNUUklORyAg
ID0gIlVidW50dS0xNC4wNCINClRBUkdFVF9TWVMgICAgICAgID0gImk1ODYtcG9reS1saW51eCIN
Ck1BQ0hJTkUgICAgICAgICAgID0gInFlbXV4ODYiDQpES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