Bug 6443

Summary: [1.6.1] [adt] sed error: no input files when install adt
Product: [Yocto Project Subprojects] ADT Reporter: Yi Zhao <yi.zhao>
Component: adtAssignee: Chong Lu <chong.lu>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: alexandru.c.georgescu, chong.lu, ke.zou, poky.adt.watcher, poky.watcher, sgw, yi.zhao
Version: 1.6.1   
Target Milestone: 1.6.2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: Regression (Used to work)
Verified: Documentation change: No (bug/feature does not impact docs)

Description Yi Zhao 2014-06-13 10:05:23 UTC
adt-installer location: http://autobuilder.yoctoproject.org/pub/releases/yocto-1.6.1/adt-installer-QA/

Steps:
1. Extract the adt_installer.tar.bz2
2. Keep the default settings. run: ./adt_installer

There is a sed error when install it:

Start installing selected native ADT for archs: x86...
#######################################################################
Please note from this point on installation requires sudo password ...
#######################################################################
Successfully create directory /opt/poky/1.6.1//var/lib/opkg.
Updating opkg...
opkg update process ended...
Installing pseudo nativesdk ...

Installing opkg nativesdk ...

Installing pkgconfig nativesdk ...

Installing libtool nativesdk ...

Installing autoconf nativesdk ...

Installing automake nativesdk ...

Installing cross canadian packages for qemux86 ...
sed: no input files

Installing qemu native ...

Installing unfs ...
Link the ld.so.cache file into the host filesystem

Relocating binaries ...

Successfully installed selected native ADT!
Installing target sysroot for arch: x86, rootfs type: sato-sdk, location: /home/yocto/test-yocto/qemux86
Creating directory /home/yocto/test-yocto/qemux86...
Extracting rootfs: core-image-sato-sdk-qemux86.tar.bz2, using pseudo...

############################################################
# Yocto ADT has been successfully installed.
############################################################
Comment 1 Alexandru Georgescu 2014-06-13 10:57:51 UTC
Hi YI,
I didn't get the sed error. Can you try again installing? 

I must mention that I installed on a relative path and only with x86 target.

Thanks,
Alex
Comment 2 Yi Zhao 2014-06-18 09:07:58 UTC
(In reply to comment #1)
> Hi YI,
> I didn't get the sed error. Can you try again installing? 
> 
> I must mention that I installed on a relative path and only with x86 target.
> 
> Thanks,
> Alex

This issue only happens when using default setting. i.e. the toolchain sdk is installed in directory /opt/poky/1.6.1

The error message is from line 169 in scripts/adt_installer_internal:
$SUDO sed -i -e "s%##SDKTARGETSYSROOT##%$target_sysroot%g" $env_script

The $env_script doesn't exist.
Comment 3 Alexandru Georgescu 2014-06-19 14:35:08 UTC
Did manage to reproduce using the default install path. So I am confirming Yi's comment.
Comment 4 Ke Zou 2014-06-30 08:55:51 UTC
issue still exists in 1.7M1 rc1 build
Comment 5 Richard Purdie 2014-06-30 15:20:39 UTC
Patch out for review
Comment 7 Ke Zou 2014-07-11 05:51:26 UTC
Sed error still exists with build 1.7M1 rc2

adt-installer path:
http://autobuilder.yoctoproject.org/pub/nightly/20140706-1/adt-installer-QA/
Comment 8 Richard Purdie 2014-07-11 09:34:22 UTC
Did you install this over the top of an existing SDK installation? If so, please try removing that first, then installing this.

You should then be able to install a second time over the top of the original without seeing the warning either. 

I believe the warning is from "stale" data on the system and therefore the bug has been fixed but you will only see that on a second installation.
Comment 9 Ke Zou 2014-07-15 05:30:28 UTC
Test it again with 20140706-1 build.
/opt/poky/1.6+snapshot has been deleted before the test ,but sed error still exists.



Start installing selected native ADT for archs: x86...
#######################################################################
Please note from this point on installation requires sudo password ...
#######################################################################
Successfully create directory /opt/poky/1.6+snapshot//var/lib/opkg.
Updating opkg...
opkg update process ended...
Installing pseudo nativesdk ...

Installing opkg nativesdk ...

Installing pkgconfig nativesdk ...

Installing libtool nativesdk ...

Installing autoconf nativesdk ...

Installing automake nativesdk ...

Installing cross canadian packages for qemux86 ...
sed: no input files

Installing qemu native ...
Comment 10 Chong Lu 2014-07-28 08:11:34 UTC
fixed by commit fd1aacc7983c79757be31cb3c21834a5dd047ecf
Comment 11 Yi Zhao 2014-08-05 02:10:25 UTC
There is no this issue in 1.7 M2 RC1 .
Comment 12 Alexandru Georgescu 2014-08-05 05:54:01 UTC
(In reply to comment #10)
> fixed by commit fd1aacc7983c79757be31cb3c21834a5dd047ecf

Hi,
Is this issue fixed for 1.6.2 too?

Also, can you help me find the change in git log? I can't find fd1aacc7983c79757be31cb3c21834a5dd047ecf in master or daisy.

Thanks,
Alex.
Comment 13 Yi Zhao 2014-08-05 06:21:13 UTC
(In reply to comment #12)
> (In reply to comment #10)
> > fixed by commit fd1aacc7983c79757be31cb3c21834a5dd047ecf
> 
> Hi,
> Is this issue fixed for 1.6.2 too?
> 
> Also, can you help me find the change in git log? I can't find
> fd1aacc7983c79757be31cb3c21834a5dd047ecf in master or daisy.
> 
> Thanks,
> Alex.

Hi Alex,

The commit is in the master branch, I can find it:

commit fd1aacc7983c79757be31cb3c21834a5dd047ecf
Author: Chong Lu <Chong.Lu@windriver.com>
Date:   Tue Jul 22 11:16:52 2014 +0800

    adt-installer: fix sed input file error
    
    When use default install directory, we can't get the environment setup
    script path. The reason is that opkg-cl list incorrect files paths.
    This patch sets env_script variable to make us get correct environment
    setup script path.
    
    [YOCTO #6443]
    
    (From OE-Core rev: e0080f279d5ebb320c2ba285765048fcca523fe7)
    
    Signed-off-by: Chong Lu <Chong.Lu@windriver.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Maybe you need to git pull your source ?