apkbuild-cpan.in: don't change arch on an upgrade of package

This commit is contained in:
Timothy Legge 2021-05-14 21:46:47 -03:00 committed by Natanael Copa
parent 474edd8fd9
commit fbd28a76f0
1 changed files with 4 additions and 3 deletions

View File

@ -463,8 +463,10 @@ sub do_depends {
die "Can't find pkgdesc line in APKBUILD"; die "Can't find pkgdesc line in APKBUILD";
} }
if (length(`find $metaprefix -name '*.xs'`)) { if (length(`find $metaprefix -name '*.xs'`)) {
$text =~ s/^arch=\"([^\"]*)\"$/arch="all"/mg or if (!exists $oldapkbuild->{'arch'}) {
die "Can't find arch line in APKBUILD"; $text =~ s/^arch=\"([^\"]*)\"$/arch="all"/mg or
die "Can't find arch line in APKBUILD";
}
} }
if ($license ne 'unknown') { if ($license ne 'unknown') {
$text =~ s/^license=\"([^\"]*)\"$/license=\"$license\"/mg or $text =~ s/^license=\"([^\"]*)\"$/license=\"$license\"/mg or
@ -623,7 +625,6 @@ given ( $ARGV[0] ) {
open my $fh, '>', "APKBUILD" or die; open my $fh, '>', "APKBUILD" or die;
say $fh $text; say $fh $text;
close $fh; close $fh;
prepare_tree; prepare_tree;
do_depends ($moddata->{version}, $apkbuild); do_depends ($moddata->{version}, $apkbuild);
} else { } else {