Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/PKGBUILD.5.txt2
-rw-r--r--scripts/makepkg.sh.in8
2 files changed, 9 insertions, 1 deletions
diff --git a/doc/PKGBUILD.5.txt b/doc/PKGBUILD.5.txt
index ef6bace0..c832e236 100644
--- a/doc/PKGBUILD.5.txt
+++ b/doc/PKGBUILD.5.txt
@@ -144,7 +144,7 @@ name. The syntax is: `source=('filename::url')`.
base functionality, but may be necessary to make full use of the contents
of this package. optdepends are currently for informational purposes only
and are not utilized by pacman during dependency resolution. The format
- should be similar to the following:
+ for specifying optdepends is:
optdepends=('fakeroot: for makepkg usage as normal user')
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 558f0938..3e918e69 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1180,6 +1180,14 @@ check_sanity() {
fi
done
+ local optdepend
+ for optdepend in "${optdepends[@]}"; do
+ pkg=${optdepend%%:*}
+ if [[ ! $pkg =~ ^[[:alnum:]\>\<\=\.\+\_\-]*$ ]]; then
+ error "$(gettext "Invalid syntax for optdepend : '%s'")" "$optdepend"
+ fi
+ done
+
if [ "$install" -a ! -f "$install" ]; then
error "$(gettext "Install scriptlet (%s) does not exist.")" "$install"
return 1