diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-09-01 15:17:17 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-09-01 15:17:17 +0000 |
commit | ce65ba6577a06cf3c723b81679e37697b6cc6239 (patch) | |
tree | c5b809c85621ca9530be5f9e447844b32c9ad6c4 /app-portage | |
parent | Removed the obsolete versions 2.1.3 and 2.2.1. (diff) | |
download | gentoo-2-ce65ba6577a06cf3c723b81679e37697b6cc6239.tar.gz gentoo-2-ce65ba6577a06cf3c723b81679e37697b6cc6239.tar.bz2 gentoo-2-ce65ba6577a06cf3c723b81679e37697b6cc6239.zip |
if default value isnt set sanely, just skip it
(Portage version: 2.1.3.7)
Diffstat (limited to 'app-portage')
-rw-r--r-- | app-portage/eclass-manpages/files/eclass-to-manpage.awk | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk b/app-portage/eclass-manpages/files/eclass-to-manpage.awk index ee45286ad90a..742c097a05a5 100644 --- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk +++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.8 2007/09/01 03:49:05 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.9 2007/09/01 15:17:17 vapier Exp $ # This awk converts the comment documentation found in eclasses # into man pages for easier/nicer reading. @@ -178,16 +178,15 @@ function _handle_variable() { getline if ($2 == "@DESCRIPTION:") desc = eat_paragraph() - while (1) { - val = $0 - sub(/^[^=]*=/, "", val) - if ($0 == val) - warn(var_name ": unknown content between @DESCRIPTION and variable: " $0) - else - break - getline - } - val = " = \\fI" val "\\fR" + + # extract the default variable value + val = $0 + sub(/^[^=]*=/, "", val) + if ($0 == val) { + warn(var_name ": unable to extract default variable content: " $0) + val = "" + } else + val = " = \\fI" val "\\fR" # now accumulate the stuff ret = \ |