apkbuild-cpan.in: use distribution name cached in %distfiles

instead of sending a duplicate query to metacpan

follow up from what was done in
e448c9a452
This commit is contained in:
Celeste 2024-02-02 08:13:48 +00:00 committed by Natanael Copa
parent 5710eefb63
commit 19bebd8497
1 changed files with 2 additions and 4 deletions

View File

@ -257,10 +257,8 @@ sub parse_deps {
}
# map package names to alpine packages
foreach ( sort keys %{$distfiles} ) {
my $distdata = query_metacpan( module => $_ );
my $pkgname = map_cpan_to_apk( $distdata->{distribution} );
foreach my $module ( sort keys %{$distfiles} ) {
my $pkgname = map_cpan_to_apk( $distfiles->{$module} );
$deps .= "$pkgname " unless $deps =~ m/\b$pkgname\b/;
}
$deps =~ s/\h+/ /g;