aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/metadata.pm
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-02-26 07:10:32 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-02-26 07:19:46 +0100
commit884c9575e1c6ac4f53a313c99f3e65a2efa77bd1 (patch)
treed8f9bf061fc6d528f864b36c13bd428984b0943e /scripts/metadata.pm
parentc5b06da56cebf5a4373ebeeab2b5a942246fb04d (diff)
downloadupstream-884c9575e1c6ac4f53a313c99f3e65a2efa77bd1.tar.gz
upstream-884c9575e1c6ac4f53a313c99f3e65a2efa77bd1.tar.bz2
upstream-884c9575e1c6ac4f53a313c99f3e65a2efa77bd1.zip
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>
Diffstat (limited to 'scripts/metadata.pm')
-rw-r--r--scripts/metadata.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/metadata.pm b/scripts/metadata.pm
index ea38735389..e05e400991 100644
--- a/scripts/metadata.pm
+++ b/scripts/metadata.pm
@@ -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;
}
}