From c8935302937dd7bc561266a79e4682574dea8922 Mon Sep 17 00:00:00 2001 From: Timothy Legge Date: Sun, 25 Nov 2018 02:09:41 +0000 Subject: Fix for issue with apkbuild-cpan upgrade --- apkbuild-cpan.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in index 62ba4d5..7393082 100644 --- a/apkbuild-cpan.in +++ b/apkbuild-cpan.in @@ -117,7 +117,7 @@ sub write_apkbuild { authors => ($authors or "# Contributor: $packager\n# Maintainer: $packager"), pkgname => map_cpan_to_apk($distdata->{metadata}{name}), pkgreal => $distdata->{metadata}{name}, - pkgver => $distdata->{version}, + pkgver => $distdata->{metadata}{version}, source => $distdata->{download_url}, ); $template =~ s/\[% (.*?) %\]/$repl{$1}/g; @@ -365,7 +365,7 @@ given ( $ARGV[0] ) { when ("upgrade") { my ($apkbuild, $distdata) = get_data; - my $pkgver = $distdata->{releases}[0]->{version}; + my $pkgver = $distdata->{metadata}{version}; if ($pkgver != $apkbuild->{pkgver}) { say "Upgrading CPAN module from $apkbuild->{pkgver} to $pkgver"; -- cgit v1.2.3-70-g09d2