summaryrefslogtreecommitdiff
path: root/apkbuild-cpan.in
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-06-02 13:35:06 +0300
committerTimo Teräs <timo.teras@iki.fi>2011-06-02 13:35:06 +0300
commit9c8f411ab397febceccc446e52aaa9a79883aaeb (patch)
tree5192d5a955bc1a603ea4e9c1b3d49af14ffec5a3 /apkbuild-cpan.in
parentf670c88e530965eeb0b7c3bae5640cab69344883 (diff)
downloadabuild-9c8f411ab397febceccc446e52aaa9a79883aaeb.tar.gz
abuild-9c8f411ab397febceccc446e52aaa9a79883aaeb.tar.bz2
abuild-9c8f411ab397febceccc446e52aaa9a79883aaeb.tar.xz
abuild-9c8f411ab397febceccc446e52aaa9a79883aaeb.zip
apkbuild-cpan: fix handling of license meta-data
Don't update if it's unknown, and fix the error message.
Diffstat (limited to 'apkbuild-cpan.in')
-rwxr-xr-xapkbuild-cpan.in6
1 files changed, 4 insertions, 2 deletions
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