aboutsummaryrefslogtreecommitdiffstats
path: root/main/abuild/0001-abuild-fix-issue-in-maintainer-check.patch
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2015-09-16 23:05:56 +0200
committerCarlo Landmeter <clandmeter@gmail.com>2015-09-16 23:06:26 +0200
commitf623b91b840f28ca891125755446ea2d71c78645 (patch)
tree04971680b9c32e51e1bb998b0fb407909c99ee02 /main/abuild/0001-abuild-fix-issue-in-maintainer-check.patch
parent746fe390c0cfb887317be72f590b10a750263553 (diff)
downloadaports-f623b91b840f28ca891125755446ea2d71c78645.tar.bz2
aports-f623b91b840f28ca891125755446ea2d71c78645.tar.xz
main/abuild: fix issue in maintainer check
Diffstat (limited to 'main/abuild/0001-abuild-fix-issue-in-maintainer-check.patch')
-rw-r--r--main/abuild/0001-abuild-fix-issue-in-maintainer-check.patch73
1 files changed, 73 insertions, 0 deletions
diff --git a/main/abuild/0001-abuild-fix-issue-in-maintainer-check.patch b/main/abuild/0001-abuild-fix-issue-in-maintainer-check.patch
new file mode 100644
index 0000000000..f405758324
--- /dev/null
+++ b/main/abuild/0001-abuild-fix-issue-in-maintainer-check.patch
@@ -0,0 +1,73 @@
+From ac8b0e55cb2bd122624177a35de51eee24f8a9b2 Mon Sep 17 00:00:00 2001
+From: Carlo Landmeter <clandmeter@gmail.com>
+Date: Wed, 16 Sep 2015 22:58:27 +0200
+Subject: [PATCH] abuild: fix issue in maintainer check
+
+seems the maintainer variable is not set anymore when building .PKGINFO
+---
+ abuild.in | 30 +++++++++++++++---------------
+ 1 file changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/abuild.in b/abuild.in
+index 557775e..fd6fb53 100644
+--- a/abuild.in
++++ b/abuild.in
+@@ -210,7 +210,7 @@ default_sanitycheck() {
+ [ -n "$pkggroup" ] && spell_error pkggroup pkggroups
+ [ -n "$subpackage" ] && spell_error subpackage subpackages
+
+- get_maintainer || die "Provide a valid RFC822 maintainer address"
++ check_maintainer || die "Provide a valid RFC822 maintainer address"
+
+ makedepends_has 'g++' && warning "g++ should not be in makedepends"
+ return 0
+@@ -721,25 +721,24 @@ git_last_commit() {
+ git log --format=oneline -n 1 "$startdir" | awk '{print $1}'
+ }
+
+-# this will try to check for a valid rfc822 address
+-check_rfc822() {
+- local address="$1"
+- case "$address" in
+- *[A-Za-z0-9]*\ \<*@*.*\>) ;;
+- *) return 1 ;;
+- esac
+-}
+-
+ get_maintainer() {
+ if [ -z "$maintainer" ]; then
+ maintainer=$(awk -F': ' '/\# *Maintainer/ {print $2}' "$APKBUILD")
+ # remove surrounding whitespace
+ maintainer=$(echo "$maintainer" | xargs)
+- if ! [ -z "$maintainer" ]; then
+- check_rfc822 "$maintainer" || return 1
+- else
+- warning "No maintainer"
+- fi
++ fi
++}
++
++check_maintainer() {
++ get_maintainer
++ if [ -z "$maintainer" ]; then
++ warning "No maintainer"
++ else
++ # try to check for a valid rfc822 address
++ case "$maintainer" in
++ *[A-Za-z0-9]*\ \<*@*.*\>) ;;
++ *) return 1 ;;
++ esac
+ fi
+ }
+
+@@ -805,6 +804,7 @@ EOF
+ fi
+ echo "commit = $last_commit" >> "$pkginfo"
+
++ get_maintainer
+ if [ -n "$maintainer" ]; then
+ echo "maintainer = $maintainer" >> "$pkginfo"
+ fi
+--
+2.5.2
+