[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/, app-portage/eclass-manpages/

2017-11-23 Thread Ulrich Müller
commit: d4ea2dfb711a15d37f829af266d811fda26cd760
Author: Ulrich Müller  gentoo  org>
AuthorDate: Thu Nov 23 23:04:15 2017 +
Commit: Ulrich Müller  gentoo  org>
CommitDate: Thu Nov 23 23:04:59 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d4ea2dfb

app-portage/eclass-manpages: Update bugzilla URL to https.

Package-Manager: Portage-2.3.16, Repoman-2.3.6

 app-portage/eclass-manpages/Manifest| 10 +-
 app-portage/eclass-manpages/files/eclass-to-manpage.awk |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/app-portage/eclass-manpages/Manifest 
b/app-portage/eclass-manpages/Manifest
index 0d04210e30b..9aa64de3df1 100644
--- a/app-portage/eclass-manpages/Manifest
+++ b/app-portage/eclass-manpages/Manifest
@@ -1,5 +1,5 @@
-DIST eclass-manpages-20170321.tar.xz 459596 SHA256 
47aaef9603822bf0a5e7f738b4f354c83bdcbb61b1639f66de02db24de2b4bc6 SHA512 
7ff2a48659382ae84944e4f4cf4bb8a73d51355d8bcd63f16fa155e3da3010430babe6f7d977327e5c7f14f0b5e6a23ee5659665e35b020bcd7772008ce3b3b0
 WHIRLPOOL 
656cb2a0867b6f10a2bba59dd26ffc19c75d8e753d150d4fec90ffe7d586192e98fd44af5aafeb2fee1e0209a10c916ad0dc677a71a14ba4796dd1795d6acb17
-DIST eclass-manpages-20170428.tar.xz 457936 SHA256 
f1138d403ede694409c5cd584d1b7c1cd596e8714f092a84312cf19837240af6 SHA512 
15f21b13aa66eb7fa9a02bcd4e33ec5f9eba9a82412184ba821ccfdccaa1e34d8161464ae9db939bc3e7df661eda45755efa4a465883c4577b406ca712aa2e01
 WHIRLPOOL 
10f688309fc299189b315b25a7f528b38b5bb5d8f35785d4d3dd0af46d2f7fcf7dd14bad693a57a9c0262c95412a5edf44d7ad1ca729df71cc7a12b005edf643
-DIST eclass-manpages-20170521.tar.xz 455584 SHA256 
34063a43d913b5311596bf601c02f2cd0fd98d75dd6584fa95289bd7f8a2cbe6 SHA512 
0f91eaf3066a8208fd02c256927ea5e8b2d488642f37573bedf8284afef49d7c4951144687fda29146cf27af05cc29efbea0a41462e0d59fc94cae3e9e70870e
 WHIRLPOOL 
52846eb282307a56b662166dd4c26db4b09089fb4f8d8654aeccb4a94579b1495b7b196efee3bb4496b4895ca113f2e87d79aaab698c8c9977bf496172e3c156
-DIST eclass-manpages-20170712.tar.xz 456832 SHA256 
aac17f7efec309db108c34fb511dcb0ebdee0d5dbcf94fa36ca3317afe5669bd SHA512 
a64c97683fa796d6122b722dfe065447ebd106c2974a7f3c4ea67743429efa43082979febdfd5a3676635b745cec02420771d1b2ce401c7100867aef9bd9de0b
 WHIRLPOOL 
212bdc3b6bb29b17765e557e4540ed8fed678a42d8a4678661ee13f59b0a7282be2439a4078ff1b0af8db8cba33dfb0446adac6b632bba5f8e2d50cc8c10e9ac
-DIST eclass-manpages-20170905.tar.xz 453248 SHA256 
bcf4204dcb8c6c3f29d81d4be94638781d7712b32246bece036fa0445db295b0 SHA512 
a6e8732f7a06e3a7bfd009a25d91f7f3c6721283c0265361029ee25cdaa20198a7b273e5825d7ac3f66c7ccfa7eea20c2c3ff23dc08bab22a32c2325a413e6b5
 WHIRLPOOL 
c3b7d5b80539c8ac0393d33ba9d96ce12d7894981669b8e67e55a3c8985af5474d0fea53dfb3620cc6788dd43e9c88095758f51cdc5e84fa67c9e84a4c43afc7
+DIST eclass-manpages-20170321.tar.xz 459596 BLAKE2B 
03eb3110774f6b0fa6f6f7a578113d540e1f9c0f0c2f0bdc7a21fbaa1b05b592ed67d693f3669cfcee0b3faa9f320c7cb14ba08e67f9f31e46030a07bf690765
 SHA512 
7ff2a48659382ae84944e4f4cf4bb8a73d51355d8bcd63f16fa155e3da3010430babe6f7d977327e5c7f14f0b5e6a23ee5659665e35b020bcd7772008ce3b3b0
+DIST eclass-manpages-20170428.tar.xz 457936 BLAKE2B 
2d03cb4913962e744a8b4a0a44ca57f06923b658684ce8545d031e0459c0dc9c481ff2cb66600649bce00f1f2c6d37847c0f0005c946430eb5365f99532b18d7
 SHA512 
15f21b13aa66eb7fa9a02bcd4e33ec5f9eba9a82412184ba821ccfdccaa1e34d8161464ae9db939bc3e7df661eda45755efa4a465883c4577b406ca712aa2e01
+DIST eclass-manpages-20170521.tar.xz 455584 BLAKE2B 
71152fdaf2aa1b64993d19a34aaa18750eb9414b08d8539088b9118d8f130f71994f3d2946a6f6c4e80d3b42c8843fe01e00e2c2c9fcef6b8de5fdd7222c7ea8
 SHA512 
0f91eaf3066a8208fd02c256927ea5e8b2d488642f37573bedf8284afef49d7c4951144687fda29146cf27af05cc29efbea0a41462e0d59fc94cae3e9e70870e
+DIST eclass-manpages-20170712.tar.xz 456832 BLAKE2B 
2119c7989bf3b6c2d4baaf9f1bc2dd61a44d2d006472604f5fdb9ac5e887e35009c1ceba176f1a98cece70d6083f1fa467855b723967e8ddb05def11bdb5167a
 SHA512 
a64c97683fa796d6122b722dfe065447ebd106c2974a7f3c4ea67743429efa43082979febdfd5a3676635b745cec02420771d1b2ce401c7100867aef9bd9de0b
+DIST eclass-manpages-20170905.tar.xz 453248 BLAKE2B 
dee13d3db8d685903bcaa4e54eb2b1167cac5f4b16fa639b4ddf37e4e33037cb12035b752f2bf12ccd886df38342a32d4e6e64a9ec2e1eea1c38db95b1e13bc8
 SHA512 
a6e8732f7a06e3a7bfd009a25d91f7f3c6721283c0265361029ee25cdaa20198a7b273e5825d7ac3f66c7ccfa7eea20c2c3ff23dc08bab22a32c2325a413e6b5

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk 
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index b2f9afb0fa9..b40eaf11209 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -411,7 +411,7 @@ function handle_footer() {
 #
 BEGIN {
state = "header"
-   reporting_bugs = "Please report bugs via http://bugs.gentoo.org/;
+   reporting_bugs = "Please report bugs via https://bugs.gentoo.org/;
vcs_url = 

[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/

2017-11-17 Thread Michał Górny
commit: 900365947d030667731279e7978c3457d847fb5a
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Apr 28 13:49:14 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Nov 17 16:49:21 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=90036594

app-portage/eclass-manpages: Add @SUPPORTED_EAPIS tag for eclass

Add a @SUPPORTED_EAPIS tag that can be used to explicitly provide a list
of EAPIs that are supported by the eclass. The main goal is to make it
possible to extract this list with relative ease, for scripting
purposes. It is not included explicitly in the manpages at the moment.

The first use case is to make it possible to explicitly distinguish
eclasses that do not support a specific EAPI from eclasses that are not
used by any ebuilds using a specific EAPI. Therefore, it will make it
possible to easily detect when we can deprecate old EAPIs from eclasses.

 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 4 
 1 file changed, 4 insertions(+)

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk 
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 0b65162c04e..fe7e9c12d8f 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -18,6 +18,7 @@
 # 
 # @VCSURL: 
+# @SUPPORTED_EAPIS: 
 # @BLURB: 
 # @DESCRIPTION:
 # 
@@ -147,6 +148,7 @@ function handle_eclass() {
eclass = $3
eclass_maintainer = ""
eclass_author = ""
+   supported_eapis = ""
blurb = ""
desc = ""
example = ""
@@ -176,6 +178,8 @@ function handle_eclass() {
reporting_bugs = eat_paragraph()
if ($2 == "@VCSURL:")
vcs_url = eat_line()
+   if ($2 == "@SUPPORTED_EAPIS:")
+   supported_eapis = eat_line()
if ($2 == "@BLURB:")
blurb = eat_line()
if ($2 == "@DESCRIPTION:")



[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/

2017-11-17 Thread Michał Górny
commit: 1a2962517426e51bea4b05b848175d788f44766f
Author: Michał Górny  gentoo  org>
AuthorDate: Fri Apr 28 14:51:12 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Fri Nov 17 16:49:22 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1a296251

app-portage/eclass-manpages: Introduce additional variable classes

Add a few additional variable classes to better emphasize the specifics
of different kinds of variables set for eclasses, and by eclasses.

The change applied, each eclass variable can belong to one of
the following five eclasses:

1. (default) - variable set by ebuild, influences eclass behavior.

2. @PRE_INHERIT - likewise but must be set above the inherit line,
and not modified afterwards.

3. @USER_VARIABLE - variable to be set by user (make.conf), and not
by ebuilds. This mostly involves MAKEOPTS-style variables.

4. @OUTPUT_VARIABLE - variable that is generated and defined by eclass,
and ebuilds can *read* it.

5. @INTERNAL - (existing) internal use variable.

 .../eclass-manpages/files/eclass-to-manpage.awk| 32 --
 1 file changed, 29 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 fe7e9c12d8f..b2f9afb0fa9 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -37,8 +37,9 @@
 
 # The format of function-specific variables:
 # @VARIABLE: foo
+# [@USER_VARIABLE] (set in make.conf, not ebuilds)
+# [@INTERNAL] (internal eclass use variable)
 # [@DEFAULT_UNSET]
-# [@INTERNAL]
 # [@REQUIRED]
 # @DESCRIPTION:
 # 
@@ -46,8 +47,11 @@
 
 # The format of eclass variables:
 # @ECLASS-VARIABLE: foo
+# [@PRE_INHERIT] (the variable must be set before inheriting the eclass)
+# [@USER_VARIABLE] (set in make.conf, not ebuilds)
+# [@OUTPUT_VARIABLE] (set by eclass, to be read in ebuilds)
+# [@INTERNAL] (internal eclass use variable)
 # [@DEFAULT_UNSET]
-# [@INTERNAL]
 # [@REQUIRED]
 # @DESCRIPTION:
 # 
@@ -279,6 +283,11 @@ function _handle_variable() {
internal = 0
required = 0
 
+   # additional variable classes
+   pre_inherit = 0
+   user_variable = 0
+   output_variable = 0
+
# make sure people haven't specified this before (copy & paste error)
if (all_vars[var_name])
fail(eclass ": duplicate definition found for variable: " 
var_name)
@@ -294,6 +303,12 @@ function _handle_variable() {
internal = 1
else if ($2 == "@REQUIRED")
required = 1
+   else if ($2 == "@PRE_INHERIT")
+   pre_inherit = 1
+   else if ($2 == "@USER_VARIABLE")
+   user_variable = 1
+   else if ($2 == "@OUTPUT_VARIABLE")
+   output_variable = 1
else
opts = 0
}
@@ -311,7 +326,7 @@ function _handle_variable() {
regex = "^[[:space:]]*:[[:space:]]*[$]{" var_name ":?=(.*)}"
val = gensub(regex, "\\1", 1, $0)
if (val == $0) {
-   if (default_unset + required + internal == 0)
+   if (default_unset + required + internal + 
output_variable == 0)
warn(var_name ": unable to extract default 
variable content: " $0)
val = ""
} else if (val !~ /^["']/ && val ~ / /) {
@@ -324,6 +339,17 @@ function _handle_variable() {
val = " " op " \\fI" val "\\fR"
if (required == 1)
val = val " (REQUIRED)"
+   # TODO: group variables using those classes
+   if (pre_inherit == 1)
+   val = val " (SET BEFORE INHERIT)"
+   if (user_variable == 1)
+   val = val " (USER VARIABLE)"
+   if (output_variable == 1)
+   val = val " (GENERATED BY ECLASS)"
+
+   # check for invalid combos
+   if (internal + pre_inherit + user_variable + output_variable > 1)
+   fail(var_name ": multiple variable classes specified")
 
if (internal == 1)
return ""



[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/

2017-03-21 Thread Michał Górny
commit: 9178bbd9f43529f0b31d24f0e1f581ea833826fe
Author: Michał Górny  gentoo  org>
AuthorDate: Tue Mar 14 15:54:43 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Mar 21 18:22:43 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9178bbd9

app-portage/eclass-manpages: Do not include system paths in manpages

Replace the system paths in generated manpages with just the eclass
filename. This avoids depending on any particular system layout.

 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 5 +
 app-portage/eclass-manpages/files/eclass-to-manpage.sh  | 1 -
 2 files changed, 1 insertion(+), 5 deletions(-)

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk 
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 02eb4c82581..0b65162c04e 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -370,7 +370,7 @@ function handle_footer() {
print ".SH \"REPORTING BUGS\""
print reporting_bugs
print ".SH \"FILES\""
-   print ".BR " eclassdir "/" eclass
+   print ".BR " eclass
print ".SH \"SEE ALSO\""
print ".BR ebuild (5)"
print pre_text(gensub("@ECLASS@", eclass, 1, vcs_url))
@@ -381,9 +381,6 @@ function handle_footer() {
 #
 BEGIN {
state = "header"
-   if (ECLASSDIR == "")
-   ECLASSDIR = "/usr/portage/eclass"
-   eclassdir = ECLASSDIR
reporting_bugs = "Please report bugs via http://bugs.gentoo.org/;
vcs_url = 
"https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/@ECLASS@;
 }

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.sh 
b/app-portage/eclass-manpages/files/eclass-to-manpage.sh
index 186a712e806..5f389390d60 100755
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.sh
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.sh
@@ -25,7 +25,6 @@ ret=0
 for e in "$@" ; do
set -- \
${AWK} \
-   -vECLASSDIR="${ECLASSDIR}" \
-f "${FILESDIR}"/eclass-to-manpage.awk \
${e}
if [[ ${AWK} == "gawk" ]] ; then



[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/

2017-03-21 Thread Michał Górny
commit: feae936d4eed8e5294dca4048fe8d5a5b3650401
Author: Michał Górny  gentoo  org>
AuthorDate: Tue Mar 14 15:52:44 2017 +
Commit: Michał Górny  gentoo  org>
CommitDate: Tue Mar 21 18:22:43 2017 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=feae936d

app-portage/eclass-manpages: Remove unused PORTDIR from the script

 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 2 +-
 app-portage/eclass-manpages/files/eclass-to-manpage.sh  | 2 --
 2 files changed, 1 insertion(+), 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 81241014ca3..02eb4c82581 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -1,4 +1,4 @@
-# Copyright 1999-2016 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 # This awk converts the comment documentation found in eclasses

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.sh 
b/app-portage/eclass-manpages/files/eclass-to-manpage.sh
index 7706afa7ae6..186a712e806 100755
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.sh
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.sh
@@ -1,6 +1,5 @@
 #!/bin/bash
 
-: ${PORTDIR:=/usr/portage}
 : ${ECLASSDIR:=${0%/*}/../../../eclass}
 : ${FILESDIR:=${ECLASSDIR}/../app-portage/eclass-manpages/files}
 
@@ -27,7 +26,6 @@ for e in "$@" ; do
set -- \
${AWK} \
-vECLASSDIR="${ECLASSDIR}" \
-   -vPORTDIR="${PORTDIR}" \
-f "${FILESDIR}"/eclass-to-manpage.awk \
${e}
if [[ ${AWK} == "gawk" ]] ; then



[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/

2016-08-15 Thread Mike Gilbert
commit: 6bf56bbc7505c5302bac82864c43377ef9b2e28a
Author: Mike Gilbert  gentoo  org>
AuthorDate: Mon Aug 15 14:09:10 2016 +
Commit: Mike Gilbert  gentoo  org>
CommitDate: Mon Aug 15 14:09:10 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6bf56bbc

app-portage/eclass-manpages: add a note about @DEAD

Package-Manager: portage-2.3.0_p16

 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk 
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 78dd0a6..a6af1ba 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -1,4 +1,4 @@
-# Copyright 1999-2013 Gentoo Foundation
+# Copyright 1999-2016 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
@@ -53,6 +53,9 @@
 # 
 # foo=""
 
+# Disable manpage generation:
+# @DEAD
+
 # Common features:
 # @CODE
 # In multiline paragraphs, you can create chunks of unformatted



[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/, app-portage/eclass-manpages/

2016-02-22 Thread Justin Lecher
commit: 94ad5a632c48bb339e74c0ceb942765eb475c1c3
Author: Justin Lecher  gentoo  org>
AuthorDate: Mon Feb 22 14:24:43 2016 +
Commit: Justin Lecher  gentoo  org>
CommitDate: Mon Feb 22 14:24:43 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94ad5a63

app-portage/eclass-manpages: Correct path in FILES inside man-pages

Package-Manager: portage-2.2.27
Signed-off-by: Justin Lecher  gentoo.org>

 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 6 +++---
 app-portage/eclass-manpages/files/eclass-to-manpage.sh  | 1 +
 app-portage/eclass-manpages/metadata.xml| 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk 
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index cc21a73..78dd0a6 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -379,9 +379,9 @@ function handle_footer() {
 #
 BEGIN {
state = "header"
-   if (PORTDIR == "")
-   PORTDIR = "/usr/portage"
-   eclassdir = PORTDIR "/eclass"
+   if (ECLASSDIR == "")
+   ECLASSDIR = "/usr/portage/eclass"
+   eclassdir = ECLASSDIR
reporting_bugs = "Please report bugs via http://bugs.gentoo.org/;
vcs_url = 
"https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/@ECLASS@;
 }

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.sh 
b/app-portage/eclass-manpages/files/eclass-to-manpage.sh
index d41de42..7706afa 100755
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.sh
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.sh
@@ -26,6 +26,7 @@ ret=0
 for e in "$@" ; do
set -- \
${AWK} \
+   -vECLASSDIR="${ECLASSDIR}" \
-vPORTDIR="${PORTDIR}" \
-f "${FILESDIR}"/eclass-to-manpage.awk \
${e}

diff --git a/app-portage/eclass-manpages/metadata.xml 
b/app-portage/eclass-manpages/metadata.xml
index 40f2050..5b81642 100644
--- a/app-portage/eclass-manpages/metadata.xml
+++ b/app-portage/eclass-manpages/metadata.xml
@@ -4,7 +4,7 @@

vap...@gentoo.org

-
+   
tools-port...@gentoo.org
Gentoo Portage tools team




[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/

2015-08-13 Thread Mike Frysinger
commit: c2af4e0908ddaf86a16bc10853534f16e02ff52a
Author: Mike Frysinger vapier AT gentoo DOT org
AuthorDate: Fri Aug 14 04:25:15 2015 +
Commit: Mike Frysinger vapier AT gentoo DOT org
CommitDate: Fri Aug 14 04:25:15 2015 +
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}



[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/

2015-08-13 Thread Mike Frysinger
commit: af7a9cb899d8f0451e2249efb505c3f95c5f81c0
Author: Mike Frysinger vapier AT gentoo DOT org
AuthorDate: Fri Aug 14 04:03:18 2015 +
Commit: Mike Frysinger vapier AT gentoo DOT org
CommitDate: Fri Aug 14 04:05:35 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af7a9cb8

app-portage/eclass-manpages: add a check for the @ECLASS name #537392

 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 4 
 1 file changed, 4 insertions(+)

diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk 
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 11ece1f..ee42810 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -145,6 +145,10 @@ function handle_eclass() {
desc = 
example = 
 
+   # Sanity check the eclass name. #537392
+   if (eclass !~ /[.]eclass$/)
+   fail(eclass : @ECLASS name is missing a '.eclass' suffix)
+
# first the man page header
print .\\\ -*- coding: utf-8 -*-
print .\\\ ### DO NOT EDIT THIS FILE



[gentoo-commits] repo/gentoo:master commit in: app-portage/eclass-manpages/files/

2015-08-13 Thread Mike Frysinger
commit: 0bc58e562cd8ef5447d1947eee69d980aa3c202f
Author: Mike Frysinger vapier AT gentoo DOT org
AuthorDate: Fri Aug 14 04:03:32 2015 +
Commit: Mike Frysinger vapier AT gentoo DOT org
CommitDate: Fri Aug 14 04:05:36 2015 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0bc58e56

app-portage/eclass-manpages: fix gensub warnings

Newer gawk warns when you use an empty string with the 3rd arg to gensub
since that only accepts g, G, or a number.

 app-portage/eclass-manpages/files/eclass-to-manpage.awk | 6 +++---
 1 file changed, 3 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 ee42810..979ad10 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -294,12 +294,12 @@ function _handle_variable() {
# first try var=val
op = =
regex = ^.* var_name =(.*)$
-   val = gensub(regex, \\1, , $0)
+   val = gensub(regex, \\1, 1, $0)
if (val == $0) {
# next try : ${var:=val}
op = ?=
regex = ^[[:space:]]*:[[:space:]]*[$]{ var_name :?=(.*)}
-   val = gensub(regex, \\1, , $0)
+   val = gensub(regex, \\1, 1, $0)
if (val == $0) {
if (default_unset + required + internal == 0)
warn(var_name : unable to extract default 
variable content:  $0)
@@ -367,7 +367,7 @@ function handle_footer() {
print .BR  eclassdir / eclass
print .SH \SEE ALSO\
print .BR ebuild (5)
-   print pre_text(gensub(@ECLASS@, eclass, , vcs_url))
+   print pre_text(gensub(@ECLASS@, eclass, 1, vcs_url))
 }
 
 #