diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-01-02 14:22:42 +0100 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-01-02 14:22:42 +0100 |
commit | e970c74b0e3117c2172cbda45985c9e592c72fcc (patch) | |
tree | 1d70a0ceca911d997ad2df98be309111ea6e834b /abuild.in | |
parent | d007f7967c7e4d253dcb4eb6204022f2996e4bc3 (diff) | |
download | abuild-e970c74b0e3117c2172cbda45985c9e592c72fcc.tar.gz abuild-e970c74b0e3117c2172cbda45985c9e592c72fcc.tar.bz2 abuild-e970c74b0e3117c2172cbda45985c9e592c72fcc.tar.xz abuild-e970c74b0e3117c2172cbda45985c9e592c72fcc.zip |
abuild: add sanitycheck of provides
provides cannot contain the pkgname or apk will be very unhappy.
Diffstat (limited to 'abuild.in')
-rw-r--r-- | abuild.in | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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} |