summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/bitbake5
1 files changed, 4 insertions, 1 deletions
diff --git a/scripts/bitbake b/scripts/bitbake
index 580f377a61..09f8a86240 100755
--- a/scripts/bitbake
+++ b/scripts/bitbake
@@ -64,13 +64,16 @@ GITVERSION=`git --version | cut -d ' ' -f 3`
64float_test() { 64float_test() {
65 echo | awk 'END { exit ( !( '"$1"')); }' 65 echo | awk 'END { exit ( !( '"$1"')); }'
66} 66}
67version_compare() {
68 python -c "from distutils.version import LooseVersion; import sys; sys.exit(not (LooseVersion('$1') $2 LooseVersion('$3')))"
69}
67 70
68# Tar version 1.24 and onwards handle overwriting symlinks correctly 71# Tar version 1.24 and onwards handle overwriting symlinks correctly
69# but earlier versions do not; this needs to work properly for sstate 72# but earlier versions do not; this needs to work properly for sstate
70float_test "$TARVERSION > 1.23" && needtar="0" 73float_test "$TARVERSION > 1.23" && needtar="0"
71 74
72# Need git >= 1.7.5 for git-remote --mirror=xxx syntax 75# Need git >= 1.7.5 for git-remote --mirror=xxx syntax
73float_test "$GITVERSION >= 1.7.5" && needgit="0" 76version_compare $GITVERSION ">=" 1.7.5 && needgit="0"
74 77
75 78
76buildpseudo="1" 79buildpseudo="1"