diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2015-08-23 12:13:51 +0200 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2015-08-23 12:13:51 +0200 |
commit | 0e4afb4aaf593f65806162ab2f8d476ab8b35bda (patch) | |
tree | af8e1ea45463463fdec64856679995f45e2ae7b9 /scripts | |
parent | 40a1b0acc026c77ffe367520972f2d3abcbdbcd0 (diff) |
Clarify and fix handling of md5sums in $git_reference_dir
After recent improvements to checkout code fetch_md5sums started
to treat $git_reference_dir/md5sums as the intended source of md5sums
data. While copying of [mostly infrastructure/] files from
$git_referece_dir is OK and beneficial, md5sums is not versioned in
the filename, and appearance of new version on $fileserver does not
invalidate the copy in $git_reference_dir.
The patch has a double fix for the problem. Firstly, it removes code
from fetch_md5sums that handles $git_reference_dir, leaving two options
for md5sums: either be present in the first place, or be fetched via http.
Secondly, it updates scripts/update-snapshots-ref.sh to remove md5sums
after generation of reference snapshots.
Change-Id: Iaef5f9f729aef75f2b5ad0c60cf666fafd5d6f57
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/update-snapshots-ref.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/scripts/update-snapshots-ref.sh b/scripts/update-snapshots-ref.sh index 31ff4464..0abcc60e 100755 --- a/scripts/update-snapshots-ref.sh +++ b/scripts/update-snapshots-ref.sh @@ -64,10 +64,14 @@ generate_snapshots () if $generate; then generate_snapshots + + # Remove checked-out branch directories + rm -rf ${snapshots_dir}-new/*~* + + # Remove md5sums to force ABE to fetch canonical version via http://. + rm ${snapshots_dir}-new/md5sums fi -# Remove checked-out branch directories -rm -rf $snapshots_dir-new/*~* # Cleanup stale branches for repo in $snapshots_dir-new/*.git; do @@ -92,7 +96,7 @@ if true; then for M in $todo_machines; do ( rsync -az --delete $snapshots_dir-new/ $M:$snapshots_dir-new/ - ssh -fn $M "flock -x $snapshots_dir.lock -c \"rsync -a $snapshots_dir-new/ $snapshots_dir/\"" + ssh -fn $M "flock -x $snapshots_dir.lock -c \"rsync -a --delete ${snapshots_dir}-new/ $snapshots_dir/\"" ) > /tmp/update-snapshots-ref.$$.$M 2>&1 & pids[$M]=$! done |