diff options
author | Timothy Legge <timlegge@gmail.com> | 2020-03-24 23:38:09 +0000 |
---|---|---|
committer | Timothy Legge <timlegge@gmail.com> | 2020-03-27 02:02:24 +0000 |
commit | aaf56ec1021d05b6f2dc63666087eb55f8547b18 (patch) | |
tree | 40cf5d9b943eee949e9ce18ea337ef54f1e84336 /apkbuild-cpan.in | |
parent | 6670e9479da26898a2ed6996064ae647f82fe1c3 (diff) | |
download | abuild-aaf56ec1021d05b6f2dc63666087eb55f8547b18.tar.bz2 abuild-aaf56ec1021d05b6f2dc63666087eb55f8547b18.tar.xz |
apkbuild-cpan.in: reset the pkgrel if the pkgver changes on recreate
Diffstat (limited to 'apkbuild-cpan.in')
-rwxr-xr-x | apkbuild-cpan.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in index a251c9d..fab4e51 100755 --- a/apkbuild-cpan.in +++ b/apkbuild-cpan.in @@ -439,6 +439,12 @@ given ( $ARGV[0] ) { when ("recreate") { #TODO: likely should keep pkgrel the same on recreate my ($apkbuild, $distdata, $moddata) = get_data; + my $pkgver = $moddata->{version} =~ s/^[^0-9]+//r; + if ($pkgver ne $apkbuild->{pkgver}) { + #Reset pkgrel on upgrade on recreate + say "Upgrading CPAN module from $apkbuild->{pkgver} to $pkgver"; + $apkbuild->{pkgrel}=0; + } write_apkbuild($distdata, $apkbuild->{authors}, $moddata); prepare_tree; update_functions; |