summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-08-14 00:03:32 -0400
committerMike Frysinger <vapier@gentoo.org>2015-08-14 00:05:36 -0400
commit0bc58e562cd8ef5447d1947eee69d980aa3c202f (patch)
tree88f08ec4876160e6e61881317f68b2506de998c2 /app-portage
parentapp-portage/eclass-manpages: add a check for the @ECLASS name #537392 (diff)
downloadgentoo-0bc58e562cd8ef5447d1947eee69d980aa3c202f.tar.gz
gentoo-0bc58e562cd8ef5447d1947eee69d980aa3c202f.tar.bz2
gentoo-0bc58e562cd8ef5447d1947eee69d980aa3c202f.zip
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.
Diffstat (limited to 'app-portage')
-rw-r--r--app-portage/eclass-manpages/files/eclass-to-manpage.awk6
1 files 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))
}
#