From e0e6ee0d140dc137bbc196dafab2c7084e52814a Mon Sep 17 00:00:00 2001 From: Timothy Legge Date: Fri, 14 May 2021 21:48:37 -0300 Subject: [PATCH] apkbuild-cpan.in: prevent inserting extra new line before checksum on upgrade --- apkbuild-cpan.in | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in index 230662d..831ed90 100755 --- a/apkbuild-cpan.in +++ b/apkbuild-cpan.in @@ -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;