mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 09:21:53 -05:00
makepkg: put further restrictions on pkgbase
pkgbase should be subject to the same restrictions as pkgname Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
9302593cfb
commit
dbbe76b83d
@ -407,8 +407,10 @@ An optional global directive is available when building a split package:
|
||||
*pkgbase*::
|
||||
The name used to refer to the group of packages in the output of makepkg
|
||||
and in the naming of source-only tarballs. If not specified, the first
|
||||
element in the `pkgname` array is used. The variable is not allowed to
|
||||
begin with a hyphen.
|
||||
element in the `pkgname` array is used. Valid characters for this
|
||||
variable are alphanumerics, and any of the following characters:
|
||||
```@ . _ + -`''. Additionally, the variable is not allowed to start with
|
||||
hyphens or dots.
|
||||
|
||||
|
||||
Install/Upgrade/Remove Scripting
|
||||
|
@ -34,4 +34,13 @@ lint_pkgbase() {
|
||||
error "$(gettext "%s is not allowed to start with a hyphen.")" "pkgname"
|
||||
return 1
|
||||
fi
|
||||
if [[ ${pkgbase:0:1} = "." ]]; then
|
||||
error "$(gettext "%s is not allowed to start with a dot.")" "pkgbase"
|
||||
ret=1
|
||||
fi
|
||||
if [[ $pkgbase = *[^[:alnum:]+_.@-]* ]]; then
|
||||
error "$(gettext "%s contains invalid characters: '%s'")" \
|
||||
'pkgbase' "${i//[[:alnum:]+_.@-]}"
|
||||
ret=1
|
||||
fi
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user