Bug 3655

Summary: runqemu-extract-sdk is unable to extract rootfs if meta-toolchain isn't installed in the default directory
Product: [Yocto Project Subprojects] ADT Reporter: Yi Zhao <yi.zhao>
Component: adtAssignee: Laurentiu Palcu <laurentiu.palcu>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: hongxu.jia, liang.li2, poky.adt.watcher, poky.watcher, Qi.Chen
Version: 1.4   
Target Milestone: 1.4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Yi Zhao 2012-12-28 08:55:22 UTC
Meta-toolchain location: http://autobuilder.yoctoproject.org/pub/nightly/20121226-1/toolchain/
Tree/Branch: poky/master
Git commit: 4a36a32567ecfbc7ce7b967803e6e23314953ef5

If I installed the relocatable toolchain in a custom directory, when running runqemu-extract-sdk to extract rootfs, I got the following error:

####################
builder@pek-yocto-build2:~/test$ ls -l /opt/poky/
total 0
builder@pek-yocto-build2:~/test$ sudo sh poky-eglibc-x86_64-powerpc-toolchain-gmae-1.3+snapshot-20121226.sh 
Enter target directory for SDK (default: /opt/poky/1.3+snapshot): /opt/poky/yocto-sdk
You are about to install the SDK to "/opt/poky/yocto-sdk". Proceed[Y/n]?Y
Extracting SDK...done
Setting it up...done
SDK has been successfully set up and is ready to be used.
builder@pek-yocto-build2:~/test$ 
builder@pek-yocto-build2:~/test$ ls -l /opt/poky/
total 4
drwxr-xr-x 3 root root 4096 2012-12-28 16:35 yocto-sdk
builder@pek-yocto-build2:~/test$ 
builder@pek-yocto-build2:~/test$ source /opt/poky/yocto-sdk/environment-setup-ppc603e-poky-linux 
builder@pek-yocto-build2:~/test$ 
builder@pek-yocto-build2:~/test$ which runqemu-extract-sdk 
/opt/poky/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu-extract-sdk
builder@pek-yocto-build2:~/test$ 
builder@pek-yocto-build2:~/test$ runqemu-extract-sdk ./core-image-sato-sdk-qemuppc-20121226195951.rootfs.tar.bz2 rootfs
Creating directory /home/builder/test/rootfs
Extracting rootfs tarball using pseudo...
/opt/poky/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/pseudo -P /opt/poky/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr tar -C "/home/builder/test/rootfs" -xjf "./core-image-sato-sdk-qemuppc-20121226195951.rootfs.tar.bz2"
/opt/poky/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu-extract-sdk: line 92: /opt/poky/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/pseudo: No such file or directory
Warning: I don't see many files in /home/builder/test/rootfs
Please double-check the extraction worked as intended
builder@pek-yocto-build2:~/test$ 
##################

But if the toolchain is installed in the default directory (/opt/poky/1.3+snapshot), there is no this issue.

I noticed there is an old bug 1367 also report the similar error.
Comment 1 liang li 2012-12-28 09:56:26 UTC
no such when set installation dir to "/home/yocto/test_toolchain" ,and run "runqemu-extract-sdk ./core-image-sato-sdk-qemuppc-20121226195951.rootfs.tar.bz2 /home/yocto/rootfs_1" in another terminal.
Comment 2 liang li 2012-12-28 10:00:45 UTC
(In reply to comment #1)
> no such when set installation dir to "/home/yocto/test_toolchain" ,and run
> "runqemu-extract-sdk
> ./core-image-sato-sdk-qemuppc-20121226195951.rootfs.tar.bz2
> /home/yocto/rootfs_1" in another terminal.
when try that,"runqemu-extract-sdk" run successfully.
Comment 3 liang li 2012-12-28 10:13:34 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > no such when set installation dir to "/home/yocto/test_toolchain" ,and run
> > "runqemu-extract-sdk
> > ./core-image-sato-sdk-qemuppc-20121226195951.rootfs.tar.bz2
> > /home/yocto/rootfs_1" in another terminal.
> when try that,"runqemu-extract-sdk" run successfully.

when try,test user is "yocto",home dir is "/home/yocto".
Comment 4 Laurentiu Palcu 2013-01-07 13:11:07 UTC
Patch sent on the mailing list.
Comment 6 liang li 2013-01-10 06:40:10 UTC
no such error when run "bitbake meta-toolchain-sdk",then run command as follows:
yocto@yocto-OptiPlex-990:/buildarea/tester/build_202/tmp/deploy/sdk> sudo sh ./poky-eglibc-x86_64-mips-toolchain-gmae-1.3+snapshot-20130110.sh 
Enter target directory for SDK (default: /opt/poky/1.3+snapshot): /opt/poky/yocto-sdk
You are about to install the SDK to "/opt/poky/yocto-sdk". Proceed[Y/n]?y
Extracting SDK...done
Setting it up...done
SDK has been successfully set up and is ready to be used.
yocto@yocto-OptiPlex-990:/buildarea/tester/build_202/tmp/deploy/sdk> source /opt/poky/yocto-sdk/environment-setup-mips32-poky-linux 
yocto@yocto-OptiPlex-990:/buildarea/tester/build_202/tmp/deploy/sdk> which runqemu-extract-sdk 
/opt/poky/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/runqemu-extract-sdk
yocto@yocto-OptiPlex-990:/buildarea/tester/build_202/tmp/deploy/sdk> runqemu-extract-sdk ./core-image-sato-sdk-qemumips-20130105014556.rootfs.tar.bz2 rootfs
Creating directory /buildarea/tester/build_202/tmp/deploy/sdk/rootfs
Extracting rootfs tarball using pseudo...
/opt/poky/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr/bin/pseudo -P /opt/poky/yocto-sdk/sysroots/x86_64-pokysdk-linux/usr tar -C "/buildarea/tester/build_202/tmp/deploy/sdk/rootfs" -xjf "/buildarea/tester/download_1_5/core-image-sato-sdk-qemumips-20130105014556.rootfs.tar.bz2"
SDK image successfully extracted to /buildarea/tester/build_202/tmp/deploy/sdk/rootfs

git info:66f4c8a674d9f8db958b13866af4d63ab8cbcd44
git branch:poky/master