Skip to content

Commit

Permalink
[backend] allow new style of patchinfo in BSVerify
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianschroeter committed Nov 11, 2011
1 parent 97fd349 commit 11f1487
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/backend/BSVerify.pm
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,8 @@ sub verify_packid_repository {
sub verify_patchinfo {
# This verifies the absolute minimum required content of a patchinfo file
my $p = $_[0];
die("Neither patch incident or name defined in _patchinfo\n") unless (defined($p->{'name'}) && $p->{'name'} ne "") || (defined($p->{'incident'}) && $p->{'incident'} ne "");
verify_filename($p->{'name'}) if defined($p->{'name'});
my %allowed_categories = map {$_ => 1} qw{security normal optional feature};
my %allowed_categories = map {$_ => 1} qw{security recommended optional feature};
die("Invalid category defined in _patchinfo\n") if defined($p->{'category'}) && $p->{'category'} ne "" && !$allowed_categories{$p->{'category'}};
}

Expand All @@ -89,7 +88,7 @@ sub verify_patchinfo_complete {
# }
die("No summary defined in _patchinfo") unless $p->{'summary'};
die("No description defined in _patchinfo") unless $p->{'description'};
my %allowed_categories = map {$_ => 1} qw{security normal optional feature};
my %allowed_categories = map {$_ => 1} qw{security recommended optional feature};
die("No category defined in _patchinfo") unless $p->{'category'};
die("Invalid category defined in _patchinfo") unless !$allowed_categories{$p->{'category'}};
for my $binary (@{$p->{'binary'}||[]}) {
Expand Down

0 comments on commit 11f1487

Please sign in to comment.