aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordylan.araps@gmail.com <dylan.araps@gmail.com>2019-07-03 14:29:57 +0000
committerdylan.araps@gmail.com <dylan.araps@gmail.com>2019-07-03 14:29:57 +0000
commit93e871561216071d630fa80fee83f05be83145bc (patch)
treea4790895bf9fcb1c2e7dc3aebd3615a59a671605
parentf010c51537c7bed8a787b79a00519a8284e8c685 (diff)
downloadcpt-93e871561216071d630fa80fee83f05be83145bc.tar.gz
kiss: oops
FossilOrigin-Name: e4efc40b19827bf34ad0d8852777236795a419dfd2d62d636abd99a82dcbfa12
-rwxr-xr-xkiss24
1 files changed, 22 insertions, 2 deletions
diff --git a/kiss b/kiss
index db8c205..08383d9 100755
--- a/kiss
+++ b/kiss
@@ -44,7 +44,6 @@ pkg_lint() {
[ -f sources ] || die "[$1]: Sources file not found."
[ -x build ] || die "[$1]: Build file not found or not executable."
[ -s version ] || die "[$1]: Version file not found or empty."
- [ -f checksums ] || die "[$1]: Checksums file not found ('$0 checksums $1')."
# Ensure that the release field in the version file is set
# to something.
@@ -370,7 +369,7 @@ pkg_build() {
set -- $missing_deps
set +f
}
- log "Installing: $*."
+ log "Building: $*."
log "Checking to see if any dependencies have already been built..."
log "Installing any pre-built dependencies..."
@@ -411,6 +410,27 @@ pkg_build() {
done
for pkg; do pkg_lint "$pkg"; done
+ 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."
+
for pkg; do pkg_sources "$pkg"; done
for pkg; do pkg_verify "$pkg"; done