From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: vapier@gentoo.org, tools-portage@gentoo.org,
"Michał Górny" <mgorny@gentoo.org>
Subject: [gentoo-dev] [PATCH] app-portage/eclass-manpages: @DEFAULT_UNSET -> @DEFAULT-UNSET
Date: Fri, 28 Apr 2017 16:39:45 +0200 [thread overview]
Message-ID: <20170428143945.16032-1-mgorny@gentoo.org> (raw)
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
next reply other threads:[~2017-04-28 14:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 14:39 Michał Górny [this message]
2017-04-29 3:41 ` [gentoo-dev] [PATCH] app-portage/eclass-manpages: @DEFAULT_UNSET -> @DEFAULT-UNSET 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170428143945.16032-1-mgorny@gentoo.org \
--to=mgorny@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=tools-portage@gentoo.org \
--cc=vapier@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox