Merge lp:~doanac/linaro-android-build-tools/clickthrough-bugs into lp:linaro-android-build-tools

Proposed by Andy Doan
Status: Merged
Approved by: Paul Sokolovsky
Approved revision: 438
Merged at revision: 444
Proposed branch: lp:~doanac/linaro-android-build-tools/clickthrough-bugs
Merge into: lp:linaro-android-build-tools
Diff against target: 155 lines (+50/-17)
2 files modified
build-scripts/create-user-build-script (+20/-11)
build-scripts/create-user-kernel-script (+30/-6)
To merge this branch: bzr merge lp:~doanac/linaro-android-build-tools/clickthrough-bugs
Reviewer Review Type Date Requested Status
Paul Sokolovsky Approve
Review via email: mp+101327@code.launchpad.net

Description of the change

fixes click through issues for snowball/origen with pinned manifests and kernel configs

To post a comment you must log in.
Revision history for this message
Paul Sokolovsky (pfalcon) wrote :

Well, I heard we're closing in towards solving manifest and other meta-data access for click-thru builds. In this regard these changes are somewhat large, but as you did them already, let's stop waiting and have some kind of solution now ;-)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'build-scripts/create-user-build-script'
2--- build-scripts/create-user-build-script 2012-03-13 17:49:12 +0000
3+++ build-scripts/create-user-build-script 2012-04-10 03:31:18 +0000
4@@ -5,15 +5,6 @@
5 source "${BUILD_SCRIPT_ROOT}"/helpers
6 setup-repo-vars
7
8-if [ -n "$SOURCE_OVERLAY" ]; then
9- USAGE_SUM="'Usage: \$0 -o <overlay.tar> [ -t -d directory ]'"
10- USAGE_OVERLAY="'\\n -o The path to the vendor required overlay.\\n Can be downloaded from http://snapshots.linaro.org/android/binaries/$SOURCE_OVERLAY\\n'"
11- USAGE_OPTOVERLAY="o:"
12- USAGE_OPTHANDLER="o ) SOURCE_OVERLAY=\$OPTARG;;"
13-else
14- USAGE_SUM="'Usage: \$0 [ -t -d directory ]'"
15-fi
16-
17 #Translate
18 # https://android-build.linaro.org/jenkins/job/doanac_build-script-generation/6/
19 # into
20@@ -22,6 +13,15 @@
21 # change the dash in doanac_build... to doanac/build...
22 PINNED_MANIFEST_URL=${PINNED_MANIFEST_URL/_/\/}
23
24+if [ -n "$SOURCE_OVERLAY" ]; then
25+ USAGE_SUM="'Usage: \$0 -m <manifest.xml> -o <overlay.tar> [ -t -d directory ]'"
26+ USAGE_OVERLAY="'\\n -m <manifest> If -t is not used, then using a browser with cookies you\\n must download the pinned manifest from:\\n $PINNED_MANIFEST_URL\\n -o The path to the vendor required overlay.\\n Can be downloaded from http://snapshots.linaro.org/android/binaries/$SOURCE_OVERLAY\\n'"
27+ USAGE_OPTOVERLAY="m:o:"
28+ USAGE_OPTHANDLER="o ) SOURCE_OVERLAY=\$OPTARG;; m ) MANIFEST=\$OPTARG;;"
29+else
30+ USAGE_SUM="'Usage: \$0 [ -t -d directory ]'"
31+fi
32+
33 header()
34 {
35 cat <<EOF
36@@ -66,8 +66,12 @@
37 EOF
38 if [ -n "$SOURCE_OVERLAY" ]; then
39 cat <<EOF
40+if [ "a\$MANIFEST" == "a" -a \$EXACT -eq 1 ]; then
41+ echo "ERROR: no pinned manifest provided. Please download from $PINNED_MANIFEST_URL. This must be done from a browser that accepts cookies."
42+ exit 1
43+fi
44 if [ "a\$SOURCE_OVERLAY" == "a" ]; then
45- echo "ERROR: no source overlay provided. Please download from http://snapshots.linaro.org/android/binaries/$SOURCE_OVERLAY". This must be done from a browser that accepts cookies.
46+ echo "ERROR: no source overlay provided. Please download from http://snapshots.linaro.org/android/binaries/$SOURCE_OVERLAY. This must be done from a browser that accepts cookies."
47 exit 1
48 fi
49 EOF
50@@ -127,6 +131,11 @@
51
52 sync_commands()
53 {
54+ if [ -n "$SOURCE_OVERLAY" ]; then
55+ CP_CMD="cp \$MANIFEST .repo/manifest.xml"
56+ else
57+ CP_CMD="curl -k ${PINNED_MANIFEST_URL}/pinned-manifest.xml > .repo/manifest.xml"
58+ fi
59 cat <<EOF
60 # download the repo tool for android
61 curl "http://android.git.linaro.org/gitweb?p=tools/repo.git;a=blob_plain;f=repo;hb=refs/heads/stable" > repo
62@@ -136,7 +145,7 @@
63 ./repo init -u \${MANIFEST_REPO} -b \${MANIFEST_BRANCH} -m \${MANIFEST_FILENAME} ${REPO_MIRROR}
64 if [ \${EXACT} -eq 1 ] ; then
65 rm .repo/manifest.xml
66- curl -k ${PINNED_MANIFEST_URL}/pinned-manifest.xml > .repo/manifest.xml
67+ $CP_CMD
68 fi
69 ./repo sync
70
71
72=== modified file 'build-scripts/create-user-kernel-script'
73--- build-scripts/create-user-kernel-script 2012-03-23 20:45:55 +0000
74+++ build-scripts/create-user-kernel-script 2012-04-10 03:31:18 +0000
75@@ -13,6 +13,17 @@
76 # change the dash in doanac_build... to doanac/build...
77 SNAPSHOT_URL=${SNAPSHOT_URL/_/\/}
78
79+CLICKTHROUGH=0
80+[ ${TARGET_PRODUCT} == 'snowball' ] && CLICKTHROUGH=1
81+[ ${TARGET_PRODUCT} == 'origen' ] && CLICKTHROUGH=1
82+
83+OPTS="d:ht"
84+
85+[ $CLICKTHROUGH ] && OPTS="c:d:ht"
86+[ $CLICKTHROUGH ] && CLICKTHROUGH_OPT="-c .config"
87+[ $CLICKTHROUGH ] && CLICKTHROUGH_OPT_CASE="c ) CFG=\$OPTARG;;"
88+[ $CLICKTHROUGH ] && CLICKTHROUGH_MSG="\" -c .config file The kernel config file from the build. Download from:\n ${SNAPSHOT_URL}/kernel_config\n from a browser with cookies enabled.\""
89+
90 header()
91 {
92 cat <<EOF
93@@ -27,7 +38,8 @@
94
95 usage()
96 {
97- echo 'Usage: \$0 [ -t -d directory ]'
98+ echo 'Usage: \$0 ${CLICKTHROUGH_OPT}[ -t -d directory ]'
99+ echo -e ${CLICKTHROUGH_MSG}
100 echo " -t Reproduce the from the tip of the branch rather than doing"
101 echo " an exact replica build"
102 echo " -d <directory> The directory to download code and build from"
103@@ -35,15 +47,20 @@
104 exit 1
105 }
106
107-while getopts "d:ht" optn; do
108+while getopts "${OPTS}" optn; do
109 case \$optn in
110 d ) DIR=\$OPTARG;;
111 t ) EXACT=0;;
112+ ${CLICKTHROUGH_OPT_CASE}
113 h ) usage; exit 1;;
114 esac
115 done
116
117 EOF
118+if [ $CLICKTHROUGH -eq 1 ] ; then
119+ echo "[ \$CFG ] || usage"
120+ echo
121+fi
122 }
123
124 sync_commands()
125@@ -64,19 +81,26 @@
126 cd \$DIR
127 git checkout $GITREV
128
129-# download the kernel config
130-curl -q $SNAPSHOT_URL/kernel_config > linaro_kernel_config
131-
132 EOF
133+if [ $CLICKTHROUGH -eq 0 ] ; then
134+ echo "# download the kernel config"
135+ echo "curl -q $SNAPSHOT_URL/kernel_config> linaro_kernel_config"
136+ echo
137+fi
138 }
139
140 build_commands()
141 {
142+if [ $CLICKTHROUGH -eq 1 ] ; then
143+ CP_CMD="cp \$CFG out/.config"
144+else
145+ CP_CMD="cp linaro_kernel_config out/.config"
146+fi
147 cat <<EOF
148 # build the code
149 CROSS_COMPILE=\`which arm-linux-gnueabi-gcc |sed -e 's,gcc,,'\`
150 [ -d out ] || mkdir out
151-[ -f out/.config ] || cp linaro_kernel_config out/.config
152+[ -f out/.config ] || $CP_CMD
153 make -j\${CPUS} O=out ARCH=arm CROSS_COMPILE=\$CROSS_COMPILE uImage modules
154 mkdir out/modules_for_android
155 make O=out ARCH=arm modules_install INSTALL_MOD_PATH=modules_for_android

Subscribers

People subscribed via source and target branches