commit: 0bc58e562cd8ef5447d1947eee69d980aa3c202f
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 14 04:03:32 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Fri Aug 14 04:05:36 2015 +0000
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))
}
#