From 0bc58e562cd8ef5447d1947eee69d980aa3c202f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 14 Aug 2015 00:03:32 -0400 Subject: [PATCH] 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 ee4281075004..979ad10a6a88 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)) } # -- 2.26.2