From 178affc406a41b8edef0178125ecdc866b57d7dc Mon Sep 17 00:00:00 2001
From: Kiyoshi Aman <aphrael@alpinelinux.org>
Date: Tue, 28 Jun 2011 11:05:04 -0400
Subject: [PATCH] apkbuild-cpan: 'check' output format changed; exit code 1 on
 version mismatch

---
 apkbuild-cpan.in | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in
index d96a4b7d7708..9cf935a87b63 100755
--- a/apkbuild-cpan.in
+++ b/apkbuild-cpan.in
@@ -336,7 +336,10 @@ given ( $ARGV[0] ) {
 	when ('check') {
 		my ($apkbuild, $distdata) = get_data;
 		my $pkgver = $distdata->{releases}[0]->{version};
-		say "Latest version: $pkgver Packaged version: $apkbuild->{pkgver}";
+		say "$apkbuild->{pkgname}: Latest version: $pkgver Packaged version: $apkbuild->{pkgver}";
+		if ($pkgver ne $apkbuild->{pkgver}) {
+			exit(1);
+		}
 	}
 	when ("update") {
 		prepare_tree;
-- 
GitLab