scripts/metadata.pm: allow group-only Require-User specs

/lib/functions.sh can deal with Require-User specifications that only
contain a group, but no user. Adjust metadata.pm to allow such
specifications as well.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
This commit is contained in:
Matthias Schiffer 2018-02-26 07:10:32 +01:00
parent c5b06da56c
commit 884c9575e1
No known key found for this signature in database
GPG Key ID: 16EF3F64CB201D9C
1 changed files with 4 additions and 2 deletions

View File

@ -283,8 +283,10 @@ sub parse_package_metadata($) {
for my $ugspec (@ugspecs) {
my @ugspec = split /:/, $ugspec, 2;
if ($ugspec[0]) {
parse_package_metadata_usergroup($src->{makefile}, "user", \%usernames, \%userids, $ugspec[0]) or return 0;
if (@ugspec > 1) {
}
if ($ugspec[1]) {
parse_package_metadata_usergroup($src->{makefile}, "group", \%groupnames, \%groupids, $ugspec[1]) or return 0;
}
}