diff options
author | Samuli Piippo <samuli.piippo@qt.io> | 2018-08-07 10:01:40 +0300 |
---|---|---|
committer | Samuli Piippo <samuli.piippo@qt.io> | 2018-08-14 04:24:33 +0000 |
commit | 14fbbe3113d0ebb0600b915e8bd59b6c433d4dba (patch) | |
tree | 797c1fc2b5bac608222bbed00e7d0d65cc542a9f | |
parent | a93d1060dd576cc6c46bef24027c8b02a7489943 (diff) | |
download | meta-boot2qt-14fbbe3113d0ebb0600b915e8bd59b6c433d4dba.tar.gz |
update-qt5-modules: update all recipes in a layer
Recursively find all recipes matching Qt module when running the
update-qt5-modules.sh script. Optionally the layer dir can be
given as an argument.
Change-Id: I242154ad56bad0759043b8bf092e24a31f58a6b3
Reviewed-by: Mikko Gronoff <mikko.gronoff@qt.io>
-rwxr-xr-x | scripts/update-qt5-modules.sh | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/scripts/update-qt5-modules.sh b/scripts/update-qt5-modules.sh index bd63de8..2172c01 100755 --- a/scripts/update-qt5-modules.sh +++ b/scripts/update-qt5-modules.sh | |||
@@ -1,7 +1,7 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | ############################################################################ | 2 | ############################################################################ |
3 | ## | 3 | ## |
4 | ## Copyright (C) 2016 The Qt Company Ltd. | 4 | ## Copyright (C) 2018 The Qt Company Ltd. |
5 | ## Contact: https://www.qt.io/licensing/ | 5 | ## Contact: https://www.qt.io/licensing/ |
6 | ## | 6 | ## |
7 | ## This file is part of the Boot to Qt meta layer. | 7 | ## This file is part of the Boot to Qt meta layer. |
@@ -28,41 +28,47 @@ | |||
28 | ## | 28 | ## |
29 | ############################################################################ | 29 | ############################################################################ |
30 | 30 | ||
31 | if [ $# -ne 1 ]; then | 31 | if [ $# -lt 1 ]; then |
32 | echo "Usage: $0 <qt5.git>" | 32 | echo "Usage: $0 <qt5.git> [<layerdir>]" |
33 | echo "Update SRCREVs for all Qt modules in the current folder." | 33 | echo "Update SRCREVs for all Qt modules in the current layer." |
34 | echo "The <qt5.git> is path to the qt5 super repo, where modules' SHA1 is taken." | 34 | echo "The <qt5.git> is path to the qt5 super repo, where modules' SHA1 is taken." |
35 | exit 1 | 35 | exit 1 |
36 | fi | 36 | fi |
37 | 37 | ||
38 | SHA1S=$(git -C $1 submodule status --recursive | cut -c2- | awk '{print $1$2}') | 38 | SHA1S=$(git -C $1 submodule status --recursive | cut -c2- | awk '{print $1$2}') |
39 | LAYERDIR=${2:-$PWD} | ||
39 | 40 | ||
40 | for S in $SHA1S; do | 41 | for S in $SHA1S; do |
41 | SHA1=${S:0:40} | 42 | SHA1=${S:0:40} |
42 | PROJECT=${S:40} | 43 | PROJECT=${S:40} |
43 | 44 | ||
44 | if [ "${PROJECT}" = "qtwebengine" ]; then | 45 | if [ "${PROJECT}" = "qtwebengine" ]; then |
45 | sed -i -e "/^SRCREV_qtwebengine/s/\".*\"/\"${SHA1}\"/" qtwebengine_git.bb* | 46 | RECIPE="qtwebengine" |
46 | echo "${PROJECT} -> ${SHA1}" | 47 | TAG="SRCREV_qtwebengine" |
47 | elif [ "${PROJECT}" = "qtwebengine/src/3rdparty" ]; then | 48 | elif [ "${PROJECT}" = "qtwebengine/src/3rdparty" ]; then |
48 | sed -i -e "/^SRCREV_chromium/s/\".*\"/\"${SHA1}\"/" qtwebengine_git.bb* | 49 | RECIPE="qtwebengine" |
49 | echo "qtwebengine (chromium) -> ${SHA1}" | 50 | TAG="SRCREV_chromium" |
50 | elif [ "${PROJECT}" = "qtlocation" ]; then | 51 | elif [ "${PROJECT}" = "qtlocation" ]; then |
51 | sed -i -e "/^SRCREV_qtlocation/s/\".*\"/\"${SHA1}\"/" qtlocation_git.bb* | 52 | RECIPE="qtlocation" |
52 | echo "qtlocation -> ${SHA1}" | 53 | TAG="SRCREV_qtlocation" |
53 | elif [ "${PROJECT}" = "qtlocation/src/3rdparty/mapbox-gl-native" ]; then | 54 | elif [ "${PROJECT}" = "qtlocation/src/3rdparty/mapbox-gl-native" ]; then |
54 | sed -i -e "/^SRCREV_qtlocation-mapboxgl/s/\".*\"/\"${SHA1}\"/" qtlocation_git.bb* | 55 | RECIPE="qtlocation" |
55 | echo "qtlocation (mapboxgl) -> ${SHA1}" | 56 | TAG="SRCREV_qtlocation-mapboxgl" |
56 | elif [ "${PROJECT}" = "qtivi" ]; then | 57 | elif [ "${PROJECT}" = "qtivi" ]; then |
57 | sed -i -e "/^SRCREV_qtivi/s/\".*\"/\"${SHA1}\"/" qtivi_git.bb* | 58 | RECIPE="qtivi" |
58 | echo "qtivi -> ${SHA1}" | 59 | TAG="SRCREV_qtivi" |
59 | elif [ "${PROJECT}" = "qtivi/src/3rdparty/qface" ]; then | 60 | elif [ "${PROJECT}" = "qtivi/src/3rdparty/qface" ]; then |
60 | sed -i -e "/^SRCREV_qface/s/\".*\"/\"${SHA1}\"/" qtivi_git.bb* | 61 | RECIPE="qtivi" |
61 | echo "qtivi (qface) -> ${SHA1}" | 62 | TAG="SRCREV_qface" |
62 | elif [ "${PROJECT}" = "qtenginio" ] || [ "${PROJECT}" = "qtquick1" ] || [ "${PROJECT}" = "qtsystems" ]; then | 63 | else |
63 | echo "${PROJECT} -> ignored" | 64 | RECIPE="${PROJECT}" |
64 | elif [ "$(echo *${PROJECT}*_git.bb*)" != "*${PROJECT}*_git.bb*" ]; then | 65 | TAG="SRCREV" |
65 | sed -i -e "/^SRCREV/s/\".*\"/\"${SHA1}\"/" *${PROJECT}*_git.bb* | 66 | fi |
67 | |||
68 | RECIPES=$(find ${LAYERDIR} -regextype egrep -regex ".*/(nativesdk-)?${RECIPE}(-native)?_git.bb(append)?") | ||
69 | |||
70 | if [ "${RECIPES}" != "" ]; then | ||
71 | sed -i -e "/^${TAG}/s/\".*\"/\"${SHA1}\"/" ${RECIPES} | ||
66 | echo "${PROJECT} -> ${SHA1}" | 72 | echo "${PROJECT} -> ${SHA1}" |
67 | else | 73 | else |
68 | echo "${PROJECT} -> no recipe found" | 74 | echo "${PROJECT} -> no recipe found" |