apkbuild-cpan.in: prevent inserting extra new line before checksum on upgrade

This commit is contained in:
Timothy Legge 2021-05-14 21:48:37 -03:00 committed by Natanael Copa
parent fbd28a76f0
commit e0e6ee0d14
1 changed files with 4 additions and 0 deletions

View File

@ -622,6 +622,10 @@ given ( $ARGV[0] ) {
$text =~ s/^pkgver=(.*)$/pkgver=$pkgver/mg or
die "Can't find pkgver line in APKBUILD";
$text =~ s/^pkgrel=(.*)$/pkgrel=0/mg;
#FIXME: review whether this works over time
# It deletes the blank line before the checksum
# So prepare_tree does not insert extra blank line
$text =~ s/\n^(.*sums=.*\n)/$1/mg;
open my $fh, '>', "APKBUILD" or die;
say $fh $text;
close $fh;