summaryrefslogtreecommitdiff
path: root/maintainer
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2017-09-30 00:05:22 (GMT)
committerAlexey Neyman <stilor@att.net>2017-09-30 00:05:22 (GMT)
commitb3038a0a41079130351e6c5d9ec19587a9a08a03 (patch)
treeca487c04c55434886e9ef42b815057251cd947f9 /maintainer
parentea08141d4559a3c20f74f00aea7754f6a2329718 (diff)
Add digests for all packages
Also fix test-packages: it was saving the output from CT_DoLog into the checksum file. Also use one file per version. Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'maintainer')
-rwxr-xr-xmaintainer/test-packages.sh12
1 files changed, 8 insertions, 4 deletions
diff --git a/maintainer/test-packages.sh b/maintainer/test-packages.sh
index 017f204..7cc82d5 100755
--- a/maintainer/test-packages.sh
+++ b/maintainer/test-packages.sh
@@ -139,9 +139,11 @@ check_pkg_urls()
create_digests()
{
- local e m url alg
+ local e m url alg chksum
local save_archive_formats="${archive_formats}"
+ # Remove stale digests - we'll create them anew below
+ CT_DoExecLog ALL rm -f "${CT_LIB_DIR}/packages/${pkg_name}/${version}/chksum"
for e in ${save_archive_formats}; do
CT_DoStep EXTRA "Downloading ${archive_filename}${e}"
archive_formats="${e}"
@@ -149,11 +151,13 @@ create_digests()
CT_Pushd "${CT_LOCAL_TARBALLS_DIR}"
for alg in md5 sha1 sha256 sha512; do
CT_DoLog EXTRA "Creating ${alg^^} digest for ${archive_filename}${e}"
- if ! CT_DoExecLog ALL ${alg}sum "${archive_filename}${e}" > \
- "${CT_LIB_DIR}/packages/${pkg_name}/${version}/${archive_filename}${e}.${alg}"; then
- CT_DoExecLog ALL rm -f "${CT_LIB_DIR}/packages/${pkg_name}/${version}/${archive_filename}${e}.${alg}"
+ chksum=`${alg}sum "${archive_filename}${e}"`
+ if [ "$?" != 0 ]; then
+ CT_DoExecLog ALL rm -f "${CT_LIB_DIR}/packages/${pkg_name}/${version}/chksum"
CT_Abort "${alg}sum failed"
fi
+ echo "${alg} ${archive_filename}${e} ${chksum%%[[:space:]]*}" >> \
+ "${CT_LIB_DIR}/packages/${pkg_name}/${version}/chksum"
done
CT_Popd
CT_EndStep