From e970c74b0e3117c2172cbda45985c9e592c72fcc Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Tue, 2 Jan 2018 14:22:42 +0100 Subject: abuild: add sanitycheck of provides provides cannot contain the pkgname or apk will be very unhappy. --- abuild.in | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/abuild.in b/abuild.in index 48456a5..8a16bbd 100644 --- a/abuild.in +++ b/abuild.in @@ -238,6 +238,8 @@ default_sanitycheck() { die "Testsuites (abuild check) are required or needs to be explicitly disabled!" fi + check_provides || die "provides must not contain $pkgname" + return 0 } @@ -859,6 +861,16 @@ check_depends_dev() { return 1 } +check_provides() { + local i + for i in $provides; do + if [ "${i%%[<>=]*}" = "$pkgname" ]; then + return 1 + fi + done + return 0 +} + prepare_metafiles() { getpkgver || return 1 local name=${subpkgname:-$pkgname} -- cgit v1.2.3