Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-portage/eclass-manpages/files: eclass-to-manpage.awk
Date: Thu, 24 Nov 2011 00:05:50
Message-Id: 20111124000541.3079E2004C@flycatcher.gentoo.org
1 vapier 11/11/24 00:05:41
2
3 Modified: eclass-to-manpage.awk
4 Log:
5 Add checks for duplicate func/var documentation (copy & paste).
6
7 (Portage version: 2.2.0_alpha75/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.25 app-portage/eclass-manpages/files/eclass-to-manpage.awk
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.25&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?rev=1.25&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk?r1=1.24&r2=1.25
15
16 Index: eclass-to-manpage.awk
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v
19 retrieving revision 1.24
20 retrieving revision 1.25
21 diff -u -r1.24 -r1.25
22 --- eclass-to-manpage.awk 22 Aug 2011 04:49:21 -0000 1.24
23 +++ eclass-to-manpage.awk 24 Nov 2011 00:05:41 -0000 1.25
24 @@ -1,6 +1,6 @@
25 # Copyright 1999-2011 Gentoo Foundation
26 # Distributed under the terms of the GNU General Public License v2
27 -# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.24 2011/08/22 04:49:21 vapier Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/app-portage/eclass-manpages/files/eclass-to-manpage.awk,v 1.25 2011/11/24 00:05:41 vapier Exp $
29
30 # This awk converts the comment documentation found in eclasses
31 # into man pages for easier/nicer reading.
32 @@ -182,6 +182,11 @@
33 internal = 0
34 desc = ""
35
36 + # make sure people haven't specified this before (copy & paste error)
37 + if (all_funcs[func_name])
38 + fail(eclass ": duplicate definition found for function: " func_name)
39 + all_funcs[func_name] = func_name
40 +
41 # grab the docs
42 getline
43 if ($2 == "@USAGE:")
44 @@ -230,6 +235,11 @@
45 internal = 0
46 required = 0
47
48 + # make sure people haven't specified this before (copy & paste error)
49 + if (all_vars[var_name])
50 + fail(eclass ": duplicate definition found for variable: " var_name)
51 + all_vars[var_name] = var_name
52 +
53 # grab the optional attributes
54 opts = 1
55 while (opts) {