aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-29 07:02:42 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-06-29 07:02:42 +0000
commit64a977d2eaa461b3ec583dc6dab9cf38f55ce377 (patch)
tree83176ac0baa5bdee2ba522e28547b89571951464
parent7d4090b1b64e295cb409ba49c3a0f2fb797710bd (diff)
downloadcpt-64a977d2eaa461b3ec583dc6dab9cf38f55ce377.tar.gz
kiss-new: Ensure that each package has checksums.
FossilOrigin-Name: 72655c01aa409ceb9161a6316816f9ae3acd3baa7a7aac0dcd29ae9d3d8bbdda
-rwxr-xr-xkiss-new26
1 files changed, 24 insertions, 2 deletions
diff --git a/kiss-new b/kiss-new
index 69ba4c2..1fe6de0 100755
--- a/kiss-new
+++ b/kiss-new
@@ -151,8 +151,30 @@ pkg_sources() {
}
pkg_build() {
- # Build packages.
- :
+ # Build packages and turn them into packaged tarballs. This function
+ # also checks checksums, downloads sources and ensure all dependencies
+ # are installed.
+
+ for pkg; do
+ # Find the package's repository files. This needs to keep
+ # happening as we can't store this data in any kind of data
+ # structure.
+ repo_dir=$(pkg_search "$pkg")
+
+ # Ensure that checksums exist prior to building the package.
+ [ -f "$repo_dir/checksums" ] || {
+ log "[$pkg]: Checksums are missing."
+
+ # Instead of dying above, log it to the terminal. Also define a
+ # variable so we *can* die after all checksum files have been
+ # checked.
+ no_checkums="$no_checkums$pkg "
+ }
+ done
+
+ # Die here as packages without checksums were found above.
+ [ "$no_checkums" ] &&
+ die "Run '$kiss checksum ${no_checkums% }' to generate checksums."
}
pkg_checksums() {