abuild: support for conflicts in makedepends

prefix a makedepends with ! and its treated as a conflict. for example:

makedepends="zlib-dev !gettext"
This commit is contained in:
Natanael Copa 2009-03-26 09:31:51 +00:00
parent 3d2c54f6d8
commit 6d402b272f
1 changed files with 4 additions and 1 deletions

5
abuild
View File

@ -541,7 +541,10 @@ builddeps() {
# find which deps are missing
for i in $deps; do
if ! apk info -e $i; then
if [ "${i#\!}" != "$i" ]; then
apk info -e ${i#\!} \
&& die "Conflicting package ${i#\!} is installed."
elif ! apk info -e $i; then
if [ -z "$install_deps" ] && [ -z "$recursive" ]; then
die "Missing dependency $i. Use -r to autoinstall or -R to build"
fi