From: Mike Frysinger Date: Fri, 14 Aug 2015 04:03:32 +0000 (-0400) Subject: app-portage/eclass-manpages: fix gensub warnings X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0bc58e562cd8ef5447d1947eee69d980aa3c202f;p=gentoo.git 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. --- 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)) } #