mirror of
https://git.centos.org/centos-git-common.git
synced 2025-02-23 08:12:56 +00:00
Added simple verification that source is reachable after upload
Signed-off-by: Fabian Arrotin <arrfab@centos.org>
This commit is contained in:
parent
dc7af13b6c
commit
c43fda67c5
1 changed files with 9 additions and 1 deletions
|
@ -110,5 +110,13 @@ curl ${lookaside_baseurl}/sources/upload.cgi \
|
|||
--progress-bar | tee /dev/null
|
||||
|
||||
f_log "Returned value: $?"
|
||||
f_log "Source should be available at ${lookaside_baseurl}/sources/${pkgname}/${branch}/${checksum}"
|
||||
f_log "Validating that source was correctly uploaded ...."
|
||||
local_size=$(stat -c %s ${file})
|
||||
remote_size=$(curl --silent -i --head ${lookaside_baseurl}/sources/${pkgname}/${branch}/${checksum}|grep "Content-Length"|cut -f 2 -d ':'|tr -d [:blank:]|tr -d '\r')
|
||||
if [ "$local_size" -eq "$remote_size" ] ; then
|
||||
f_log "Source should be available at ${lookaside_baseurl}/sources/${pkgname}/${branch}/${checksum}"
|
||||
else
|
||||
f_log "ERROR : it seems there is a mismatch with source size and remote file size"
|
||||
fi
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue