| Summary: | ADT-Installer failed if the folder /opt/poky/1.2+snapshot exist | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Documentation] ADT Manual | Reporter: | Hongna Xu <hongnax.xu> | ||||
| Component: | SDK | Assignee: | Scott Rifenbark <srifenbark> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | Medium | CC: | jiajun.xu, liang.li2, lianhao.lu, poky.adt.watcher, poky.doc.watcher, poky.watcher, yi.zhao | ||||
| Version: | unspecified | ||||||
| Target Milestone: | 1.3 | ||||||
| Hardware: | x86 | ||||||
| OS: | Multiple | ||||||
| URL: | http://git.yoctoproject.org/cgit.cgi/yocto-docs/commit/?id=718a48a7ea4753eb1e59e17a75c3d94a9ed166bb | ||||||
| Whiteboard: | 26 July 2012 - Fixed | ||||||
| OS type for building Yocto: | --- | Type of Regression: | --- | ||||
| Verified: | Documentation change: | --- | |||||
| Attachments: |
|
||||||
|
Description
Hongna Xu
2012-06-07 05:16:08 UTC
In my tests,no such error,adt-installer executed successfully,configuration below: src yp-x86_64-nativesdk http://local_repo_ip/1.2+snapshot/adt-ipk/x86_64-nativesdk YOCTOADT_REPO="http://local_repo_ip/1.2+snapshot" local_repo_ip is the ip address of the local adt repo machine. "x86_64-nativesdk" dir is from tmp/deploy/ipk dir of builddir which command "bitbake meta-toolchain" is executed."tmp/deploy/ipk" subdir is copied to /var/www/1.2+snapshot/adt-ipk/.rootfs ,kernel of qemu miages are from http://autobuilder.pokylinux.org/pub/nightly/20120606-1/machines/qemu/ and copied to /var/www/1.2+snapshot/rootfs/qemuarm . liang please make sure, your existing folder of /opt/poky/1.2+snapshot is not the arch toolchianSDK which you installed by ADT-installer, I mean they should not the same arch. or you may run: "ls -l /opt/poky/1.2+snapshot" to see the create time of environment file to make sure if it is create by ADT-installer. (In reply to comment #2) > liang > please make sure, your existing folder of /opt/poky/1.2+snapshot is not > the arch toolchianSDK which you installed by ADT-installer, I mean they > should not the same arch. or you may run: "ls -l /opt/poky/1.2+snapshot" to > see the create time of environment file to make sure if it is create by > ADT-installer. yes, as you described,that error happend, first extract mips arch meta-toolchain and then use adt-install to install arm arch toolchain,following error: Creating directory /home/build/test-yocto/1.3M1/x86... Extracting rootfs: core-image-sato-sdk-qemux86.tar.bz2, using pseudo... Updating environment script with target sysroot location. [ADT_INST] Error: Failed to find environment script for arch: arm It seems nothing is written to mips arch meta-toochain extracted dir. I've tested the situation: pre-installed /opt/poky for arm using meta-toolchain then install x86_64 using adt_installer against 1.2 and everything works fine. The issue with your test case is that your adt-repo is not setup as expected and instead you've hacked some internal settings which is not a supported usage model, so please setup your adt-repo after adt-repo.yoctoproject.org layou and see whether the issue still exist for 1.2+snapshot. thx After the discussion with Hongna, we found that this was caused by the special test scenario: 1. using adt-installer to install for all 5 target archs 2. delete the /opt/poky directory 3. extract the meta-toolchain-i586 tarball 4. using adt-installer again, to try installing for all 5 target archs. The problem is that after step 3, the opkg pkg metadata information(/var/lib/opkg) was not consistent with the pkg content(/opt/poky). So in step 4, the opkg was tricked to think that all the packages had already been installed so it would skip the installation process. Currently, the adt-installer checks the existence of the directories "/opt/poky" and "/var/lib/opkg" to determine whether the pkg metadata information is valid, and will delete the pkg metadata if it's invalid. However, in the above scenario this kind of detection fails. We either need to improve the detection mechanism or ask the user not to do so. To improve the detection mechanism, I'm thinking of 2 ways, each with pros and cons. - Always deleting pkg metadata(/var/lib/opkg) in each installation Pros: the pkg metadata is always consistent. Cons: lose the ability to skip already installed packages, losing the upgrade functionality of the package repository system provides. The user have to do a new full installation process every time. - Check the existence of all the installed files in the opkg metadata. The opkg installed file list can be read from /var/lib/opkg/info/*.list files. Pros: keep upgrade functionality of the package repository system. Cons: if the user manually modified the installed files, we still can not detect that. Any comment? Discussed with Lianhao, it seems this is really triggered by the particular sequence of the test is setup which shouldn't be a normal usage. Also, the proposed solutions have their own pro and cons and neither can fully address this kind of user introduced changes. So the best approach should be clearly document what're the expected setup for toolchains under /opt/poky: 1.Use download meta toolchain tarballs for different arches and extracted them under /opt/poky 2. Use adt-installer to install meta toolchain for different arches under /opt/poky 3. Try to avoid combine usage both meta toolchain tarball and adt-installer, if must do so, then deleting /opt/poky may trigger the opkg package metadata that adt-installer is relied on out-of-sync, thus the outcome of adt-installer is not reliable anymore. If this happened, then user have to purge the opkg package metadata by deleting /var/lib/opkg (In reply to comment #3) > (In reply to comment #2) > > liang > > please make sure, your existing folder of /opt/poky/1.2+snapshot is not > > the arch toolchianSDK which you installed by ADT-installer, I mean they > > should not the same arch. or you may run: "ls -l /opt/poky/1.2+snapshot" to > > see the create time of environment file to make sure if it is create by > > ADT-installer. > > yes, as you described,that error happend, > first extract mips arch meta-toolchain and then use adt-install to install > arm arch toolchain,following error: > Creating directory /home/build/test-yocto/1.3M1/x86... > Extracting rootfs: core-image-sato-sdk-qemux86.tar.bz2, using pseudo... > Updating environment script with target sysroot location. > [ADT_INST] Error: Failed to find environment script for arch: arm > > It seems nothing is written to mips arch meta-toochain extracted dir. It seems no such error on 1.3 M1 RC1 (nightly build 20120613-1). git info :7f017cab0b3e4d5a4fc356eccd8eb8429b0531d0 git branch : poky/1.3_M1 Here is a solution for documenting this situation. Place a Note in the ADT Manual in the section that describes the three methods used for ADT installation (see http:///www.yoctoproject.org/docs/latest/adt-manual/adt-manual.html#installing-the-adt for context of the note). Here is the Note's text..... ------------------------------------------------ Note Avoid mixing installation methods when installing the ADT for different architectures. For example, avoid using the ADT Installer to install some toolchains and then hand-installing cross-development toolchains from downloaded tarballs to install toolchains for different architectures. Mixing installation methods can result in situations where the ADT Installer becomes unreliable and might not install the toolchain. If you must mix installation methods, you might avoid problems by deleting /var/lib/opkg, thus purging the opkg package metadata Commit 718a48a7ea4753eb1e59e17a75c3d94a9ed166bb fixes this bug. I forgot to put the "Fixes YOCTO #2553" string in the commit. Sorry. The note was added as described in Comment 9. Scott |