index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Andrew Gregory <andrew.gregory.8@gmail.com> | 2019-06-03 00:32:35 -0700 |
---|---|---|
committer | Allan McRae <allan@archlinux.org> | 2019-06-06 10:34:23 +1000 |
commit | 55a65aaf904a32bcf59c652cbc03fc510c265142 (patch) | |
tree | ae1dd37e22b1d9c215aeff07b95b17239e259959 /scripts/libmakepkg | |
parent | ff1ae94c102cab487444bcdb0c76ee489c11dfe8 (diff) |
-rw-r--r-- | scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in | 4 | ||||
-rw-r--r-- | scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in | 5 |
diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in index 84666a29..51a25d2c 100644 --- a/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/pkgname.sh.in @@ -45,6 +45,10 @@ lint_one_pkgname() { error "$(gettext "%s is not allowed to start with a dot.")" "$type" ret=1 fi + if [[ $name = *[![:ascii:]]* ]]; then + error "$(gettext "%s may only contain ascii characters.")" "$type" + return 1 + fi if [[ $name = *[^[:alnum:]+_.@-]* ]]; then error "$(gettext "%s contains invalid characters: '%s'")" \ "$type" "${name//[[:alnum:]+_.@-]}" diff --git a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in index 8d5d04f1..b0f45027 100644 --- a/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in +++ b/scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in @@ -41,6 +41,11 @@ check_pkgver() { error "$(gettext "%s is not allowed to contain colons, forward slashes, hyphens or whitespace.")" "pkgver${type:+ in $type}" return 1 fi + + if [[ $ver = *[![:ascii:]]* ]]; then + error "$(gettext "%s may only contain ascii characters.")" "pkgver${type:+ in $type}" + return 1 + fi } lint_pkgver() { |