summaryrefslogtreecommitdiffstats
path: root/bitbake/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/bin')
-rwxr-xr-xbitbake/bin/toaster10
1 files changed, 8 insertions, 2 deletions
diff --git a/bitbake/bin/toaster b/bitbake/bin/toaster
index 61a4a0f85d..c2e33fe376 100755
--- a/bitbake/bin/toaster
+++ b/bitbake/bin/toaster
@@ -116,8 +116,14 @@ verify_prereq() {
116 # Verify Django version 116 # Verify Django version
117 reqfile=$(python3 -c "import os; print(os.path.realpath('$BBBASEDIR/toaster-requirements.txt'))") 117 reqfile=$(python3 -c "import os; print(os.path.realpath('$BBBASEDIR/toaster-requirements.txt'))")
118 exp='s/Django\([><=]\+\)\([^,]\+\),\([><=]\+\)\(.\+\)/' 118 exp='s/Django\([><=]\+\)\([^,]\+\),\([><=]\+\)\(.\+\)/'
119 exp=$exp'import sys,django;version=django.get_version().split(".");' 119 # expand version parts to 2 digits to support 1.10.x > 1.8
120 exp=$exp'sys.exit(not (version \1 "\2".split(".") and version \3 "\4".split(".")))/p' 120 # (note:helper functions hard to insert in-line)
121 exp=$exp'import sys,django;'
122 exp=$exp'version=["%02d" % int(n) for n in django.get_version().split(".")];'
123 exp=$exp'vmin=["%02d" % int(n) for n in "\2".split(".")];'
124 exp=$exp'vmax=["%02d" % int(n) for n in "\4".split(".")];'
125 exp=$exp'sys.exit(not (version \1 vmin and version \3 vmax))'
126 exp=$exp'/p'
121 if ! sed -n "$exp" $reqfile | python3 - ; then 127 if ! sed -n "$exp" $reqfile | python3 - ; then
122 req=`grep ^Django $reqfile` 128 req=`grep ^Django $reqfile`
123 echo "This program needs $req" 129 echo "This program needs $req"