aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2021-05-29 23:45:45 +0000
committermerakor <cem@ckyln.com>2021-05-29 23:45:45 +0000
commitca1e9e0da2aa0a7ef82da7076a6ba323eafe8287 (patch)
tree1305d17b7dab5b977a35480f61d024e5025ab52f
parent5eb0477b268eed1c5ae3b1d1921fe1755da6ba2b (diff)
downloadcpt-ca1e9e0da2aa0a7ef82da7076a6ba323eafe8287.tar.gz
pkg_lint(): Don't require a 'checksums' file if there is no 'sources' fileHEADmaster
FossilOrigin-Name: d8f23773823c4702411f0af671d067db80936ec5095fe31e54dd47705250df8b
-rw-r--r--src/cpt-lib.in8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/cpt-lib.in b/src/cpt-lib.in
index 328149e..664daf4 100644
--- a/src/cpt-lib.in
+++ b/src/cpt-lib.in
@@ -590,7 +590,13 @@ pkg_lint() {
read -r _ release 2>/dev/null < version || die "Version file not found"
[ "$release" ] || die "Release field not found in version file"
- [ "$2" ] || [ -f checksums ] || die "$pkg" "Checksums are missing"
+ # If we have a second argument, we are generating the checksums file,
+ # so we don't need to check whether there is one.
+ [ -z "$2" ] || return 0
+
+ # Check for a checksums file only if there is a sources file.
+ [ -f sources ] || return 0
+ [ -f checksums ] || die "$pkg" "Checksums are missing"
}
pkg_find() {