summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan McRae <allan@archlinux.org>2011-07-22 04:37:25 +0200
committerDan McGee <dan@archlinux.org>2011-07-27 19:44:59 +0200
commit00949db191d0f31add4919ae56ebdfef9813a90e (patch)
treeb7e412da9e9a74264855689305c77abe9971c20b
parent06974ebf2f6674baf01da79be9658277cbf2650e (diff)
downloadpacman-00949db191d0f31add4919ae56ebdfef9813a90e.tar.gz
pacman-00949db191d0f31add4919ae56ebdfef9813a90e.tar.xz
makepkg: pkgver and pkgrel can not have whitespace
There is always someone who tries to break things (cough *Dave* cough...) Signed-off-by: Allan McRae <allan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org>
-rw-r--r--scripts/makepkg.sh.in10
1 files changed, 6 insertions, 4 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index a4e71564..96fe4004 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -1343,12 +1343,14 @@ check_sanity() {
error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgbase"
ret=1
fi
- if [[ $pkgver =~ [:-] ]]; then
- error "$(gettext "%s is not allowed to contain colons or hyphens.")" "pkgver"
+
+ if [[ $pkgver =~ [[:space:]:-] ]]; then
+ error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgver"
ret=1
fi
- if [[ $pkgrel != ${pkgrel//-/} ]]; then
- error "$(gettext "%s is not allowed to contain hyphens.")" "pkgrel"
+
+ if [[ $pkgrel =~ [[:space:]-] ]]; then
+ error "$(gettext "%s is not allowed to contain hyphens or whitespace.")" "pkgrel"
ret=1
fi