Bug 3164 - adt-installer traceback failure
Summary: adt-installer traceback failure
Status: VERIFIED FIXED
Alias: None
Product: ADT
Classification: Yocto Project Subprojects
Component: adt (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: High major
Target Milestone: 1.3 M5
Assignee: Laurentiu Palcu
QA Contact:
URL:
Whiteboard: Patch merged
Depends on:
Blocks:
 
Reported: 2012-09-24 22:06 UTC by Jessica
Modified: 2012-10-16 13:52 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments
adt tools installer log (11.94 KB, text/x-log)
2012-09-25 04:14 UTC, liang li
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jessica 2012-09-24 22:06:16 UTC
I tried to install multiple toolchains (different cross arch) to the same location, e.g. /home/jzhang/toolchain_installer, the 1st time of ppc was successfully installed.  Then 2nd which is for x86, I got the following error:

Installing unfs ...

Relocating binaries ...
Traceback (most recent call last):
  File "scripts/relocate_sdk_tmp.py", line 187, in <module>
    f = open(e, "r+b")
IOError: [Errno 26] Text file busy: '/home/jzhang/toolchain_installer/sysroots/i686-pokysdk-linux/usr/bin/python2.7'


Please note this is a supported usage model.
Comment 1 liang li 2012-09-25 04:14:10 UTC
Created attachment 838 [details]
adt tools installer log
Comment 2 liang li 2012-09-25 04:16:10 UTC
the error not met using nightly build 20120919-2 below,install qemuppc and qemux86 toolchain to the same dir "/home/yocto/t1", all install successfully.
http://autobuilder.pokylinux.org/nightly/20120919-2/adt_installer-QA/adt_installer.tar.bz2

git info:8ebed883d45ee952bd89d2143e0b0ab8736049b0
git branch: poky/1.3_M5

test env:
host: Fedora 17 32 bit host.

log as above attachment.
Comment 3 Jessica 2012-09-25 04:59:39 UTC
What if you do ppc install first, then change adt_installer.conf for x86 for the 2nd install, that's my failure scenario
Comment 4 liang li 2012-09-25 05:26:19 UTC
(In reply to comment #3)
> What if you do ppc install first, then change adt_installer.conf for x86 for
> the 2nd install, that's my failure scenario

yes, just install ppc first and change adt_installer.conf for x86, install x86 2nd.
Comment 5 liang li 2012-09-25 05:44:02 UTC
(In reply to comment #4)
> (In reply to comment #3)
> > What if you do ppc install first, then change adt_installer.conf for x86 for
> > the 2nd install, that's my failure scenario
> 
> yes, just install ppc first and change adt_installer.conf for x86, install
> x86 2nd.

contents of /home/yocto/t1 after install (ppc first,x86 2nd):
[yocto@yocto t1]$ ls /home/yocto/t1
environment-setup-i586-poky-linux     sysroots
environment-setup-ppc603e-poky-linux  var
site-config-i586-poky-linux           version-i586-poky-linux
site-config-ppc603e-poky-linux        version-ppc603e-poky-linux

and ppc toolchain may not work normally(for example: can not compile iptables project).
x86 toolchain work normally.
Comment 6 Laurentiu Palcu 2012-09-25 14:11:59 UTC
Jessica,

Installing the SDK with adt installer for all architectures works just fine. Your issue suggests that the python2.7 binary was being used by the system when you tried to run adt_installer again. Is this your case? Were you using the SDK in between adt_installer runs?
Comment 7 Laurentiu Palcu 2012-09-25 14:19:29 UTC
I succeeded to reproduce your exact issue by following these steps:
- install the SDK for one architecture
- open a terminal and run the python2.7 binary in sysroots/x86_64-pokysdk-linux/usr/bin/
- run adt_installer for another architecture

Unfortunately I cannot fix this... What I can do, is catch this error and signal the user that the file is used by another process.
Comment 8 Laurentiu Palcu 2012-09-25 16:36:34 UTC
Patch sent to the mailing list for review.
Comment 10 Alexandru Georgescu 2012-10-16 13:52:11 UTC
Verified.