Bug 11474 - devtool add / upgrade will not work if native sysroot dependencies required
Summary: devtool add / upgrade will not work if native sysroot dependencies required
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: Scripts and Tools (show other bugs)
Version: 2.3
Hardware: x86 Multiple
: High major
Target Milestone: 2.4 M1
Assignee: Paul Eggleton
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-05-08 04:30 UTC by Paul Eggleton
Modified: 2017-05-31 01:15 UTC (History)
1 user (show)

See Also:
OS type for building Yocto: ---
Type of Regression: Regression (Used to work)
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Eggleton 2017-05-08 04:30:00 UTC
Since recipe-specific sysroots were implemented, devtool add and devtool upgrade operations that fetch from a URL that requires native sysroot dependencies will fail to work as there is no recipe-specific sysroot set up for them during fetching. For example:

---------- snip ----------
$ devtool add gnutls3 ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-3.5.10.tar.xz
NOTE: Fetching ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-3.5.10.tar.xz...
NOTE: Unpacking /home/paul/poky/downloads/gnutls-3.5.10.tar.xz to /tmp/recipetool-sdzxrlvn/
NOTE: Unpacking /home/paul/poky/downloads/gnutls-3.5.10.tar.xz to /tmp/recipetool-sdzxrlvn/
/bin/sh: xz: command not found
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
ERROR: Unpack failure for URL: 'ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-3.5.10.tar.xz'. Unpack command PATH="/home/paul/poky/poky/build/tmp/sysroots-uninative/x86_64-linux/usr/bin:/home/paul/poky/poky/scripts:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/usr/bin/x86_64-poky-linux:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot/usr/bin/crossscripts:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/usr/sbin:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/usr/bin:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/sbin:/home/paul/poky/poky/build/tmp/work/core2-64-poky-linux/defaultpkgname/1.0-r0/recipe-sysroot-native/bin:/home/paul/poky/poky/bitbake/bin:/home/paul/poky/poky/build/tmp/hosttools" xz -dc /home/paul/poky/downloads/gnutls-3.5.10.tar.xz | tar x --no-same-owner -f - failed with return value 2
ERROR: Command 'script -e -q -c "recipetool --color=always create --devtool -o /tmp/devtoolhixoe6sw 'ftp://ftp.gnutls.org/gcrypt/gnutls/v3.5/gnutls-3.5.10.tar.xz'  -x /home/paul/poky/poky/build/workspace/sources/devtoolsrc51696mo2 -N gnutls3" /dev/null' failed
---------- snip ----------

(This is related to but not the same as bug 11198.)
Comment 1 Paul Eggleton 2017-05-29 02:05:59 UTC
Fix merged to master:

http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=415fbfb0cd1bc5129179596ba27ae2362b7de2a4

I have sent a backport to pyro as well.

Note: if a dependency such as xz-native has not been built previously then you will still get a failure, however that was always an issue even pre-RSS, and is covered separately by bug 11198.