Bug 4760

Summary: adt-installer: installation failed when permission deny on the installation directory
Product: [Yocto Project Subprojects] ADT Reporter: Hongxu Jia <hongxu.jia>
Component: adtAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: hongxu.jia, jessica.zhang, kai.kang, liezhi.yang, mark.hatle, ning.zhang, poky.adt.watcher, poky.watcher, Qi.Chen, sen.zhang, sgw, yi.zhao
Version: 1.5   
Target Milestone: 1.5 M2   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: ---

Description Hongxu Jia 2013-06-21 10:29:48 UTC
* Env
Image location: http://autobuilder.yoctoproject.org/pub/nightly/20130521-1/
Branch: poky/master
Git rev: 176a46b088135f2891983bb8540bc45389341d90

* Problem
Steps:
1) Create an installation directory which the user has no right to access;
$ ls -al /buildarea/hongxujia/adt_20130621/adt-installer/rootdir
drwxr-xr-x. 2 root  root  4096 Jun 21 17:09 .
$ id
uid=500(build) gid=500(build) groups=500(build) context=unconfined_u:unconfined_r:unconfined_t
:s0-s0:c0.c1023

3) Run "./adt_installer" to install the adt to the previous dir;
The installation failed and got errors:
...
Updating opkg...
Collected errors:
 * opkg_conf_load: Could not create lock file /buildarea/hongxujia/adt_20130621/adt-installer/rootdir/
/var/lib/opkg/lock: No such file or directory.
opkg update process ended...
Installing pseudo nativesdk ...

Collected errors:
 * opkg_conf_load: Could not create lock file /buildarea/hongxujia/adt_20130621/adt-installer/rootdir/
/var/lib/opkg/lock: No such file or directory.
...

* Solution
Add sudo to fix this.