makepkg: Disallow forward slashes in pkgver
scripts/libmakepkg/lint_pkgbuild/pkgver.sh.in now raises an error when pkgver contains forward slashes. pkgver containing a forward slash results in a package filename containing a forward slash, which isn't a valid filename. Signed-off-by: Steef Hegeman <steefhegeman@hotmail.com> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
9a4d616220
commit
5dfa3c8f6a
2 changed files with 3 additions and 3 deletions
|
@ -48,7 +48,7 @@ similar to `$_basekernver`.
|
|||
|
||||
*pkgver*::
|
||||
The version of the software as released from the author (e.g., '2.7.1').
|
||||
The variable is not allowed to contain colons or hyphens.
|
||||
The variable is not allowed to contain colons, forward slashes or hyphens.
|
||||
+
|
||||
The `pkgver` variable can be automatically updated by providing a `pkgver()`
|
||||
function in the PKGBUILD that outputs the new package version.
|
||||
|
|
|
@ -35,8 +35,8 @@ check_pkgver() {
|
|||
return 1
|
||||
fi
|
||||
|
||||
if [[ $1 = *[[:space:]:-]* ]]; then
|
||||
error "$(gettext "%s is not allowed to contain colons, hyphens or whitespace.")" "pkgver"
|
||||
if [[ $1 = *[[:space:]/:-]* ]]; then
|
||||
error "$(gettext "%s is not allowed to contain colons, forward slashes, hyphens or whitespace.")" "pkgver"
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue