Skip to content
Snippets Groups Projects
Unverified Commit 884c9575 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

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: default avatarMatthias Schiffer <mschiffer@universe-factory.net>
parent c5b06da5
No related branches found
No related tags found
No related merge requests found
......@@ -283,8 +283,10 @@ sub parse_package_metadata($) {
for my $ugspec (@ugspecs) {
my @ugspec = split /:/, $ugspec, 2;
parse_package_metadata_usergroup($src->{makefile}, "user", \%usernames, \%userids, $ugspec[0]) or return 0;
if (@ugspec > 1) {
if ($ugspec[0]) {
parse_package_metadata_usergroup($src->{makefile}, "user", \%usernames, \%userids, $ugspec[0]) or return 0;
}
if ($ugspec[1]) {
parse_package_metadata_usergroup($src->{makefile}, "group", \%groupnames, \%groupids, $ugspec[1]) or return 0;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment