From 9c8f411ab397febceccc446e52aaa9a79883aaeb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20Ter=C3=A4s?= Date: Thu, 2 Jun 2011 13:35:06 +0300 Subject: apkbuild-cpan: fix handling of license meta-data Don't update if it's unknown, and fix the error message. --- apkbuild-cpan.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apkbuild-cpan.in') diff --git a/apkbuild-cpan.in b/apkbuild-cpan.in index 75e7dd0..f5c88d9 100755 --- a/apkbuild-cpan.in +++ b/apkbuild-cpan.in @@ -249,8 +249,10 @@ sub do_depends { $text =~ s/^pkgdesc=\"([^\"]*)\"$/pkgdesc=\"$abstract\"/mg or die "Can't find cpandepends line in APKBUILD"; } - $text =~ s/^license=\"([^\"]*)\"$/license=\"$license\"/mg or - die "Can't find cpandepends line in APKBUILD"; + if ($license ne 'unknown') { + $text =~ s/^license=\"([^\"]*)\"$/license=\"$license\"/mg or + die "Can't find license line in APKBUILD"; + } $text =~ s/^cpandepends=\"([^\"]*)\"$/cpandepends=\"$deps\"/mg or die "Can't find cpandepends line in APKBUILD"; $text =~ s/^cpanmakedepends=\"([^\"]*)\"$/cpanmakedepends=\"$makedeps\"/mg or -- cgit v1.2.3