diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-09 15:07:23 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-06-09 16:44:39 +0100 |
commit | 7a086abc257ed433fda7a8a21c23a23199dc7cd5 (patch) | |
tree | 1ac81b6358c7755552dcb92f787b8bb5d50c25b6 /scripts | |
parent | 5de3d14f8e21e146a5052798e2f073083761eeb8 (diff) | |
download | ast2050-yocto-poky-7a086abc257ed433fda7a8a21c23a23199dc7cd5.zip ast2050-yocto-poky-7a086abc257ed433fda7a8a21c23a23199dc7cd5.tar.gz |
scripts/bitbake: Only build tar-replacement-native when the build system tar version < 1.24
(From OE-Core rev: d3e105451413617cf6415ae1600dc063f3d8d452)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/bitbake | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/scripts/bitbake b/scripts/bitbake index 39d5957..3923421 100755 --- a/scripts/bitbake +++ b/scripts/bitbake @@ -16,10 +16,23 @@ done [ $needpseudo = "0" ] && break done +needtar="1" +TARVERSION=`tar --version | head -n 1 | cut -d ' ' -f 4` +float_test() { + echo | awk 'END { exit ( !( '"$1"')); }' +} + +# Tar version 1.24 and onwards handle symlinks in sstate packages correctly +# but earlier versions do not +float_test "$TARVERSION > 1.23" && needtar="0" + buildpseudo="1" if [ $needpseudo = "1" ] && [ -e "$BUILDDIR/pseudodone" ]; then PSEUDOBINDIR=`cat $BUILDDIR/pseudodone` - if [ -e "$PSEUDOBINDIR/pseudo" -a -e "$PSEUDOBINDIR/tar" ]; then + if [ -e "$PSEUDOBINDIR/pseudo" -a -e "$PSEUDOBINDIR/tar" -a "$needtar" = "1" ]; then + buildpseudo="0" + fi + if [ -e "$PSEUDOBINDIR/pseudo" -a $needtar = "0" ]; then buildpseudo="0" fi fi @@ -32,7 +45,11 @@ export PATH=`echo $PATH | sed s#[^:]*/scripts:##` if [ $buildpseudo = "1" ]; then echo "Pseudo is not present but is required, building this first before the main build" export PSEUDO_BUILD=1 - bitbake pseudo-native tar-replacement-native -c populate_sysroot + TARTARGET="tar-replacement-native" + if [ $needtar = "0" ]; then + TARTARGET="" + fi + bitbake pseudo-native $TARTARGET -c populate_sysroot ret=$? if [ "$ret" != "0" ]; then exit 1 |