public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] app-portage/eclass-manpages: @DEFAULT_UNSET -> @DEFAULT-UNSET
@ 2017-04-28 14:39 Michał Górny
  2017-04-29  3:41 ` Ulrich Mueller
  2017-04-29 18:03 ` Kent Fredric
  0 siblings, 2 replies; 12+ messages in thread
From: Michał Górny @ 2017-04-28 14:39 UTC (permalink / raw
  To: gentoo-dev; +Cc: vapier, tools-portage, Michał Górny

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



^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2017-05-01 13:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-28 14:39 [gentoo-dev] [PATCH] app-portage/eclass-manpages: @DEFAULT_UNSET -> @DEFAULT-UNSET Michał Górny
2017-04-29  3:41 ` Ulrich Mueller
2017-04-29  5:57   ` Michał Górny
2017-04-29 17:23     ` Davide Pesavento
2017-04-29 17:40       ` Michał Górny
2017-04-29 18:05         ` Davide Pesavento
2017-04-30 21:01           ` Michał Górny
2017-04-29 18:03 ` Kent Fredric
2017-04-30 20:56   ` Michał Górny
2017-05-01  7:32     ` Ulrich Mueller
2017-05-01 11:20       ` Michał Górny
2017-05-01 13:12         ` Ulrich Mueller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox