[oe-commits] Richard Purdie : adt_installer: Fix real envrionment script issues
git at git.openembedded.org
git at git.openembedded.org
Thu Jul 3 16:47:09 UTC 2014
Module: openembedded-core.git
Branch: master
Commit: 8a206f88e5396d7d136480e0efdb5071d5aafeb6
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=8a206f88e5396d7d136480e0efdb5071d5aafeb6
Author: Richard Purdie <richard.purdie at linuxfoundation.org>
Date: Tue Jul 1 18:01:07 2014 +0100
adt_installer: Fix real envrionment script issues
The previous change to adt_installer was incorrect, this reverts it and
fixes the real issue. The real issue is that if a previous installation was
present, it may have been moved and therefore the paths returned by opkg
could be a little odd.
To address this, when we move files to a different location, ensure we
update the *.list files with the revised paths. This means later installs
over the top return consistent values from opkg and the script works
as intended.
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
.../installer/adt-installer/scripts/adt_installer_internal | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index 8d2ff57..f9c6d18 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -157,7 +157,7 @@ for target_type in $YOCTOADT_TARGETS; do
# get the environment setup script paths: original (the one before relocation)
# and relocated
- env_script_original=$NATIVE_INSTALL_DIR`$OPKG_CMD -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR files meta-environment-$machine|\
+ env_script_original=`$OPKG_CMD -f $OPKG_CONFIG_FILE -o $NATIVE_INSTALL_DIR files meta-environment-$machine|\
grep environment-setup`
env_script_relocated=$INSTALL_FOLDER/${env_script_original##*/}
@@ -213,6 +213,8 @@ if [ -d $NATIVE_INSTALL_DIR/$DEFAULT_INSTALL_FOLDER ]; then
# go to the next directory
dir=$(dirname $dir)
done
+ # Step 3: Rewrite the *.list files to contain the correct paths
+ $SUDO find $NATIVE_INSTALL_DIR/var/lib/opkg -type f -exec sed -i -e '#^$DEFAULT_INSTALL_FOLDER#$NATIVE_INSTALL_DIR#' {} \;
fi
# Link the ld.so.cache file into the hosts filesystem
More information about the Openembedded-commits
mailing list