<?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>10210</bug_id>
          
          <creation_ts>2016-09-02 09:00:01 +0000</creation_ts>
          <short_desc>Setting TMPDIR breaks ESDK generation</short_desc>
          <delta_ts>2016-09-14 22:10:48 +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>unspecified</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>normal</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Richard Purdie">richard.purdie</reporter>
          <assigned_to name="Paul Eggleton">bluelightning</assigned_to>
          
          
          <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>65761</commentid>
    <comment_count>0</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-09-02 09:00:01 +0000</bug_when>
    <thetext>If I set:

DISTRO = &quot;poky-lsb&quot;
TMPDIR = &quot;${TOPDIR}/tmp-lsb&quot;

then I:

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

I see the error:

ERROR: core-image-minimal-1.0-r0 do_testsdkext: Couldn&apos;t install the extensible SDK:
Poky (Yocto Project Reference Distro) Extensible SDK installer version 2.1+snapshot
===================================================================================
You are about to install the SDK to &quot;/media/build1/poky/build/tmp-lsb/work/qemumips-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: error log written to /media/build1/poky/build/tmp-lsb/work/qemumips-poky-linux/core-image-minimal/1.0-r0/testsdkext/tc/preparing_build_system.log


Contents of preparing_build_system.log:

### Shell environment set up for builds. ###

You can now run &apos;bitbake &lt;target&gt;&apos;

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    meta-ide-support

You can also run generated qemu images with a command like &apos;runqemu qemux86&apos;
Preparing SDK for core-image-minimal, meta-extsdk-toolchain:do_populate_sysroot...
ERROR:  OE-core&apos;s config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Error, TMPDIR has changed location. You need to either move it back to /media/build1/poky/build/tmp-lsb/work/qemumips-poky-linux/core-image-minimal/1.0-r0/sdk-ext/image/tmp-renamed-sdk/tmp or rebuild


ERROR: core-image-minimal-1.0-r0 do_testsdkext: Function failed: do_testsdkext
ERROR: Logfile of failure stored in: /media/build1/poky/build/tmp-lsb/work/qemumips-poky-linux/core-image-minimal/1.0-r0/temp/log.do_testsdkext.41071
ERROR: Task (/media/build1/poky/meta/recipes-core/images/core-image-minimal.bb:do_testsdkext) failed with exit code &apos;1&apos;

which seems to be because there is a tmp/ directory left in the SDK which isn&apos;t otherwise there. I suspect the TMPDIR setting interferes with the SDK generation somehow.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>65762</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-09-02 09:15:07 +0000</bug_when>
    <thetext>I suspect the problem is     cleanpaths.append(os.path.basename(d.getVar(&apos;TMPDIR&apos;, True))) in clean_esdk_builddir() since this needs to be the version with local.conf modifications excluded, not the current build value.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66157</commentid>
    <comment_count>2</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2016-09-14 22:10:48 +0000</bug_when>
    <thetext>Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=ca107522eb5115798f097602d39eb586edaabc4a</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>