Bug 7032

Summary: Installing SDK to a path which has the default path as a substring leads to broken relocation
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Paul Eggleton <bluelightning>
Component: devtools / tool chainAssignee: Aníbal Limón <anibal.limon>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: meta.mr.watcher, meta.watcher, yocto
Version: 1.7   
Target Milestone: 1.8 M3   
Hardware: All   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Paul Eggleton 2014-12-05 14:31:18 UTC
If you install the SDK (or buildtools, in my tests) to a path which has the default path as a substring, the relocation ends up garbling the path in the environment setup script due to replacing the default path twice. For example, if the current SDK version is 1.7, when prompted for the installation path by the SDK installer script, specify /opt/poky/1.7-test. If you then examine the environment setup script you will see something like this:

$ cat /opt/poky/1.7bing/environment-setup-x86_64-pokysdk-linux 
export PATH=/opt/poky/1.7-test-test/sysroots/x86_64-pokysdk-linux/usr/bin:$PATH
...

This appears to be a recent regression as I have tested both the 1.7 release buildtools installer and the latest version build on the autobuilder, and only the latter suffers from this issue.
Comment 1 Paul Eggleton 2014-12-05 14:32:38 UTC
Obviously that example should have been:

$ cat /opt/poky/1.7-test/environment-setup-x86_64-pokysdk-linux 
export PATH=/opt/poky/1.7-test-test/sysroots/x86_64-pokysdk-linux/usr/bin:$PATH
...

(copy/paste failure)
Comment 2 Paul Eggleton 2015-01-22 11:19:26 UTC
Note that this affects dizzy as well and thus we will need to backport the fix assuming it is practical.
Comment 4 Aníbal Limón 2015-02-25 19:15:50 UTC
*** Bug 7343 has been marked as a duplicate of this bug. ***