Skip to content

Commit cb77423

Browse files
committed
distribute: if no md5 is provided, don't do any checks. and put kivy into no md5 behavior.
1 parent 5ee3d00 commit cb77423

File tree

2 files changed

+20
-15
lines changed

2 files changed

+20
-15
lines changed

distribute.sh

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -358,16 +358,19 @@ function run_get_packages() {
358358
# check if the file is already present
359359
cd $PACKAGES_PATH
360360
if [ -f $filename ]; then
361-
362-
# check if the md5 is correct
363-
current_md5=$(md5sum $filename | cut -d\ -f1)
364-
if [ "X$current_md5" == "X$md5" ]; then
365-
# correct, no need to download
366-
do_download=0
361+
if [ -n "$md5" ]; then
362+
# check if the md5 is correct
363+
current_md5=$(md5sum $filename | cut -d\ -f1)
364+
if [ "X$current_md5" == "X$md5" ]; then
365+
# correct, no need to download
366+
do_download=0
367+
else
368+
# invalid download, remove the file
369+
error "Module $module have invalid md5, redownload."
370+
rm $filename
371+
fi
367372
else
368-
# invalid download, remove the file
369-
error "Module $module have invalid md5, redownload."
370-
rm $filename
373+
do_download=0
371374
fi
372375
fi
373376

@@ -380,11 +383,13 @@ function run_get_packages() {
380383
fi
381384

382385
# check md5
383-
current_md5=$(md5sum $filename | cut -d\ -f1)
384-
if [ "X$current_md5" != "X$md5" ]; then
385-
error "File $filename md5 check failed (got $current_md5 instead of $md5)."
386-
error "Ensure the file is correctly downloaded, and update MD5S_$module"
387-
exit -1
386+
if [ -n "$md5" ]; then
387+
current_md5=$(md5sum $filename | cut -d\ -f1)
388+
if [ "X$current_md5" != "X$md5" ]; then
389+
error "File $filename md5 check failed (got $current_md5 instead of $md5)."
390+
error "Ensure the file is correctly downloaded, and update MD5S_$module"
391+
exit -1
392+
fi
388393
fi
389394

390395
# if already decompress, forget it

recipes/kivy/recipe.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
VERSION_kivy=
44
URL_kivy=https://github.com/kivy/kivy/zipball/android-support/kivy-android-support.zip
55
DEPS_kivy=(pygame android)
6-
MD5_kivy=b9aa6d0067b88f505d1426cb4f6ab5fb
6+
MD5_kivy=
77
BUILD_kivy=$BUILD_PATH/kivy/$(get_directory $URL_kivy)
88
RECIPE_kivy=$RECIPES_PATH/kivy
99

0 commit comments

Comments
 (0)