Change the unset value tag to '@DEFAULT-UNSET' to ensure consistent use
of hyphen/underscore throughout eclassdoc. Before, one tag
(@ECLASS-VARIABLE) has used hyphen while also one (@DEFAULT_UNSET) used
underscore. Unify them to use the former since @ECLASS-VARIABLE tag is
more common (and hyphens do not require holding shift).
Fixing all existing uses is perfectly within our power; however, I think
it would be reasonable to delay it and combine with other eclass changes
to avoid unnecessary cache regen. The script still allows the old tag
name for compatibility.
---
app-portage/eclass-manpages/files/eclass-to-manpage.awk | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
index 0b65162c04ec..8ff9f71a2022 100644
--- a/app-portage/eclass-manpages/files/eclass-to-manpage.awk
+++ b/app-portage/eclass-manpages/files/eclass-to-manpage.awk
@@ -36,7 +36,7 @@
# The format of function-specific variables:
# @VARIABLE: foo
-# [@DEFAULT_UNSET]
+# [@DEFAULT-UNSET]
# [@INTERNAL]
# [@REQUIRED]
# @DESCRIPTION:
@@ -45,7 +45,7 @@
# The format of eclass variables:
# @ECLASS-VARIABLE: foo
-# [@DEFAULT_UNSET]
+# [@DEFAULT-UNSET]
# [@INTERNAL]
# [@REQUIRED]
# @DESCRIPTION:
@@ -284,9 +284,12 @@ function _handle_variable() {
opts = 1
while (opts) {
getline
- if ($2 == "@DEFAULT_UNSET")
+ if ($2 == "@DEFAULT-UNSET")
default_unset = 1
- else if ($2 == "@INTERNAL")
+ else if ($2 == "@DEFAULT_UNSET") {
+ warn(var_name ": use @DEFAULT-UNSET instead of
@DEFAULT_UNSET")
+ default_unset = 1
+ } else if ($2 == "@INTERNAL")
internal = 1
else if ($2 == "@REQUIRED")
required = 1
--
2.13.0.rc1