From: Felix Fietkau Date: Wed, 11 May 2016 17:17:42 +0000 (+0200) Subject: metadata.pl: fix target profile sorting check X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=91799d5198da67d03d3df4da4f384ace9f6e5bcc;p=openwrt%2Fstaging%2F981213.git metadata.pl: fix target profile sorting check Signed-off-by: Felix Fietkau --- diff --git a/scripts/metadata.pm b/scripts/metadata.pm index 3b756216a5..5f28289037 100644 --- a/scripts/metadata.pm +++ b/scripts/metadata.pm @@ -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");