From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 047331386F3 for ; Fri, 14 Aug 2015 04:26:37 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CD49314292; Fri, 14 Aug 2015 04:26:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4AE3914292 for ; Fri, 14 Aug 2015 04:26:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E2742340812 for ; Fri, 14 Aug 2015 04:26:32 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5717F147 for ; Fri, 14 Aug 2015 04:26:31 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1439526315.c2af4e0908ddaf86a16bc10853534f16e02ff52a.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-portage/eclass-manpages/files/eclass-to-manpage.awk app-portage/eclass-manpages/files/eclass-to-manpage.sh X-VCS-Directories: app-portage/eclass-manpages/files/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: c2af4e0908ddaf86a16bc10853534f16e02ff52a X-VCS-Branch: master Date: Fri, 14 Aug 2015 04:26:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a640d96d-4ef9-4385-b7ee-1470cff1bbe8 X-Archives-Hash: 83cc0dbbb87c120509d826ecfffa74b5 commit: c2af4e0908ddaf86a16bc10853534f16e02ff52a Author: Mike Frysinger gentoo org> AuthorDate: Fri Aug 14 04:25:15 2015 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Fri Aug 14 04:25:15 2015 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c2af4e09 app-portage/eclass-manpages: pass up exit codes to the caller This will let us make errors in the docs fatal in the ebuild if we want. app-portage/eclass-manpages/files/eclass-to-manpage.awk | 12 ++++++++++-- app-portage/eclass-manpages/files/eclass-to-manpage.sh | 12 +++++++++++- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk index 979ad10..cc21a73 100644 --- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk @@ -79,6 +79,10 @@ function fail(text) { _stderr_msg(text, "error") exit(1) } +function xfail(text) { + _stderr_msg(text, "error (ignoring)") + exit(77) +} function eat_line() { ret = $0 @@ -392,8 +396,12 @@ BEGIN { state = "funcvar" } else if ($0 == "# @DEAD") { eclass = "dead" - exit(10) + exit(77) } else if ($0 == "# @eclass-begin") { + # White list old eclasses that haven't been updated so we can block + # new ones from being added to the tree. + if (eclass == "") + xfail("java documentation not supported") fail("java documentation not supported") } else if ($0 ~ /^# @/) warn("Unexpected tag in \"" state "\" state: " $0) @@ -414,7 +422,7 @@ BEGIN { # END { if (eclass == "") - fail("eclass not documented yet (no @ECLASS found)") + xfail("eclass not documented yet (no @ECLASS found)") else if (eclass != "dead") handle_footer() } diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.sh b/app-portage/eclass-manpages/files/eclass-to-manpage.sh index da97e37..d41de42 100755 --- a/app-portage/eclass-manpages/files/eclass-to-manpage.sh +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.sh @@ -22,6 +22,7 @@ fi [[ $# -eq 0 ]] && set -- "${ECLASSDIR}"/*.eclass +ret=0 for e in "$@" ; do set -- \ ${AWK} \ @@ -29,8 +30,17 @@ for e in "$@" ; do -f "${FILESDIR}"/eclass-to-manpage.awk \ ${e} if [[ ${AWK} == "gawk" ]] ; then - "$@" > ${e##*/}.5 || rm -f ${e##*/}.5 + "$@" > ${e##*/}.5 + tret=$? + if [[ ${tret} -ne 0 ]] ; then + rm -f ${e##*/}.5 + if [[ ${tret} -ne 77 ]] ; then + echo "FAIL: ${e}" + ret=1 + fi + fi else "$@" fi done +exit ${ret}