Merge lp:~dpigott/lava-master-image-scripts/license-wrap-change into lp:lava-master-image-scripts

Proposed by Dave Pigott
Status: Merged
Merged at revision: 42
Proposed branch: lp:~dpigott/lava-master-image-scripts/license-wrap-change
Merge into: lp:lava-master-image-scripts
Diff against target: 51 lines (+19/-11)
1 file modified
lava-create-master (+19/-11)
To merge this branch: bzr merge lp:~dpigott/lava-master-image-scripts/license-wrap-change
Reviewer Review Type Date Requested Status
Zygmunt Krynicki Pending
Review via email: mp+99552@code.launchpad.net

Description of the change

Add support so that if the license check isn't needed it gets bypassed (i.e. if we're in the Linaro office behind the firewall)

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'lava-create-master'
--- lava-create-master 2012-03-23 14:38:16 +0000
+++ lava-create-master 2012-03-27 15:53:31 +0000
@@ -180,11 +180,17 @@
180 --user-agent="lava-create-master ($LAVA_VERSION)" \180 --user-agent="lava-create-master ($LAVA_VERSION)" \
181 --quiet \181 --quiet \
182 "$2"; then182 "$2"; then
183 echo "Error: unable to download: $1" >&2183 if test -z "$LICENSE_WRAP"; then
184 # don't report error if we might have to do license wrap
185 echo "Error: unable to download: $1" >&2
186 fi
184 return 1187 return 1
185 fi188 fi
186 if ! check_md5_or_remove "$1" "$3"; then189 if ! check_md5_or_remove "$1" "$3"; then
187 echo "Error: checksum mismatch for $1" >&2190 if test -z "$LICENSE_WRAP"; then
191 # don't report error if we might have to do license wrap
192 echo "Error: checksum mismatch for $1" >&2
193 fi
188 return 1194 return 1
189 else195 else
190 return 0196 return 0
@@ -265,16 +271,18 @@
265 if [ -e cache/$dev-vanilla.img ]; then271 if [ -e cache/$dev-vanilla.img ]; then
266 verbose " * Re-using existing vanilla image: cache/$dev-vanilla.img"272 verbose " * Re-using existing vanilla image: cache/$dev-vanilla.img"
267 else273 else
268 # Select the right download function and download hwpack274 # Try non-license download first in case we're in the lab
269 if test -n "$LICENSE_WRAP"; then
270 download_fn=${dev}_download_and_md5
271 else
272 download_fn=download_and_md5
273 fi
274 verbose " * Downloading/checking hardware pack..."275 verbose " * Downloading/checking hardware pack..."
275 if ! $download_fn "cache/$HWPACK" "$HWPACK_URL" "$HWPACK_MD5"; then276 if ! download_and_md5 "cache/$HWPACK" "$HWPACK_URL" "$HWPACK_MD5"; then
276 echo "Error: unable to download hwpack" >&2277 if test -n "$LICENSE_WRAP"; then
277 exit 1278 if ! ${dev}_download_and_md5 "cache/$HWPACK" "$HWPACK_URL" "$HWPACK_MD5"; then
279 echo "Error: unable to download hwpack/verify license" >&2
280 exit 1
281 fi
282 else
283 echo "Error: unable to download hwpack" >&2
284 exit 1
285 fi
278 fi286 fi
279287
280 # chown hwpack for convenience288 # chown hwpack for convenience

Subscribers

People subscribed via source and target branches