diff options
author | Paul Spooren <mail@aparcar.org> | 2020-04-14 14:49:54 -1000 |
---|---|---|
committer | Paul Spooren <mail@aparcar.org> | 2021-01-14 22:42:21 -1000 |
commit | 4dad3244297d8315b25ef029286681be4e7123a0 (patch) | |
tree | 776dc5429e2fd01dfbcc68890a332457ce3b303f /scripts | |
parent | 412dc26c99beeeeace3e56321fc392e590f4144d (diff) | |
download | upstream-4dad3244297d8315b25ef029286681be4e7123a0.tar.gz upstream-4dad3244297d8315b25ef029286681be4e7123a0.tar.bz2 upstream-4dad3244297d8315b25ef029286681be4e7123a0.zip |
scripts: target-metadata don't add PROFILES twice
Since 4ee3cf2b5a profiles with alternative vendor names may appear
multiple times in `tmp/.targetinfo` or `.targetinfo` (for
ImageBuilders).
The `target-metadata.pl` script adds these profiles then twice to
`PROFILE_NAMES` and the ImageBuilder show the profile twice when running
`make info`.
This patch removes duplicate profile IDs and only adds them once to
`.profiles.mk`.
Signed-off-by: Paul Spooren <mail@aparcar.org>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/target-metadata.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/target-metadata.pl b/scripts/target-metadata.pl index bf6413d315..78f77b16d5 100755 --- a/scripts/target-metadata.pl +++ b/scripts/target-metadata.pl @@ -429,7 +429,8 @@ sub gen_profile_mk() { my @targets = parse_target_metadata($file); foreach my $cur (@targets) { next unless $cur->{id} eq $target; - print "PROFILE_NAMES = ".join(" ", map { $_->{id} } @{$cur->{profiles}})."\n"; + my @profile_ids_unique = do { my %seen; grep { !$seen{$_}++} map { $_->{id} } @{$cur->{profiles}}}; + print "PROFILE_NAMES = ".join(" ", @profile_ids_unique)."\n"; foreach my $profile (@{$cur->{profiles}}) { print $profile->{id}.'_NAME:='.$profile->{name}."\n"; print $profile->{id}.'_HAS_IMAGE_METADATA:='.$profile->{has_image_metadata}."\n"; |