metadata.pl: fix target profile sorting check
authorFelix Fietkau <nbd@nbd.name>
Wed, 11 May 2016 17:17:42 +0000 (19:17 +0200)
committerFelix Fietkau <nbd@nbd.name>
Wed, 11 May 2016 17:18:16 +0000 (19:18 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
scripts/metadata.pm

index 3b75621..5f28289 100644 (file)
@@ -89,11 +89,11 @@ sub parse_target_metadata($) {
                        };
                        push @{$target->{profiles}}, $profile;
                };
-               /^Target-Profile-Name:\s*(.+)\s*$/ and do {
+               /^Target-Profile-Name:\s*(.+)\s*$/ and $profile->{name} = $1;
+               /^Target-Profile-Priority:\s*(\d+)\s*$/ and do {
+                       $profile->{priority} = $1;
                        $target->{sort} = 1;
-                       $profile->{name} = $1;
                };
-               /^Target-Profile-Priority:\s*(\d+)\s*$/ and $profile->{priority} = $1;
                /^Target-Profile-Packages:\s*(.*)\s*$/ and $profile->{packages} = [ split(/\s+/, $1) ];
                /^Target-Profile-Description:\s*(.*)\s*/ and $profile->{desc} = get_multiline(*FILE);
                /^Target-Profile-Config:/ and $profile->{config} = get_multiline(*FILE, "\t");