Gentoo Archives: gentoo-commits

From: "André Erdmann" <dywi@×××××××.de>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/R_overlay:master commit in: roverlay/config/
Date: Tue, 26 Jun 2012 15:43:22
Message-Id: 1340725323.9ee8e2b549ccbcd321ce4344bcc5a20a14f01025.dywi@gentoo
1 commit: 9ee8e2b549ccbcd321ce4344bcc5a20a14f01025
2 Author: André Erdmann <dywi <AT> mailerd <DOT> de>
3 AuthorDate: Tue Jun 26 15:42:03 2012 +0000
4 Commit: André Erdmann <dywi <AT> mailerd <DOT> de>
5 CommitDate: Tue Jun 26 15:42:03 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=9ee8e2b5
7
8 config entry map update
9
10 ---
11 roverlay/config/entrymap.py | 117 +++++++++++++++++++++++++++++--------------
12 1 files changed, 79 insertions(+), 38 deletions(-)
13
14 diff --git a/roverlay/config/entrymap.py b/roverlay/config/entrymap.py
15 index 966ac2d..2cb7077 100644
16 --- a/roverlay/config/entrymap.py
17 +++ b/roverlay/config/entrymap.py
18 @@ -32,59 +32,100 @@
19 # with a colon 'list:yesno', which is parsed in a left-to-right order.
20 # Nested subtypes such as list:slist:int:fs_file:list may lead to errors.
21 #
22 +
23 +fs_file = 'fs_file'
24 +fs_abslist = 'slist:fs_abs'
25 +
26 +# often (>1) used entry dicts (it's ok to share a ref to those dicts
27 +# 'cause CONFIG_ENTRY_MAP won't be modified)
28 +is_fs_file = { 'value_type' : fs_file }
29 +is_str = { 'value_type' : 'str' }
30 +
31 +only_vtype = lambda x : { 'value_type': x }
32 +
33 CONFIG_ENTRY_MAP = dict (
34 - log_level = '',
35 - log_console = dict (
36 - value_type = 'yesno',
37 - ),
38 +
39 + # == logging ==
40 +
41 + log_level = '',
42 + log_console = only_vtype ( 'yesno' ),
43 log_file = dict (
44 # setting path to LOG.FILE.main to avoid collision with LOG.FILE.*
45 - path = [ 'LOG', 'FILE', 'Main' ],
46 - value_type = 'fs_file',
47 - ),
48 - log_file_resolved = dict (
49 - value_type = 'fs_file',
50 - ),
51 - log_file_unresolvable = dict (
52 - value_type = 'fs_file',
53 - ),
54 - ebuild_header = dict (
55 - value_type = 'fs_file',
56 - ),
57 - overlay_category = dict (
58 - value_type = 'str',
59 + path = [ 'LOG', 'FILE', 'main' ],
60 + value_type = fs_file,
61 ),
62 + log_file_resolved = is_fs_file,
63 + log_file_unresolvable = is_fs_file,
64 +
65 + # --- logging
66 +
67 +
68 + # == overlay ==
69 +
70 + # FIXME key is not in use
71 + ebuild_header = is_fs_file,
72 +
73 + overlay_category = is_str, # e.g. 'sci-R'
74 + overlay_dir = only_vtype ( 'fs_abs:fs_dir' ),
75 +
76 overlay_eclass = dict (
77 path = [ 'OVERLAY', 'eclass_files' ],
78 - value_type = 'list:fs_abs:fs_file',
79 + value_type = fs_abslist,
80 ),
81 - eclass = 'overlay_eclass',
82 - overlay_dir = dict (
83 - value_type = 'fs_abs:fs_dir',
84 - ),
85 - overlay_name = dict (
86 - value_type = 'str',
87 +
88 + overlay_name = is_str,
89 +
90 + # ebuild is used to create Manifest files
91 + ebuild_prog = dict (
92 + path = [ 'TOOLS', 'ebuild_prog' ],
93 + value_type = 'fs_path',
94 ),
95 - distfiles_dir = dict (
96 - value_type = 'fs_dir',
97 +
98 + # * alias
99 + eclass = 'overlay_eclass',
100 +
101 + # --- overlay
102 +
103 +
104 + # == remote ==
105 +
106 + # the distfiles root directory
107 + # this is where repos create their own DISTDIR as sub directory unless
108 + # they specify another location
109 + distfiles_root = only_vtype ( 'fs_dir' ),
110 +
111 + # the repo config file(s)
112 + repo_config_files = dict (
113 + path = [ 'REPO', 'config_files' ],
114 + value_type = fs_abslist,
115 ),
116 +
117 + # this option is used to limit bandwidth usage while running rsync
118 rsync_bwlimit = dict (
119 path = [ 'rsync_bwlimit' ],
120 value_type = 'int',
121 ),
122 - ebuild_prog = dict (
123 - path = [ 'TOOLS', 'ebuild_prog' ],
124 - value_type = 'fs_path',
125 - ),
126 +
127 + # * alias
128 + distfiles = 'distfiles_root',
129 + distdir = 'distfiles_root',
130 + repo_config = 'repo_config_files',
131 + repo_config_file = 'repo_config_files',
132 +
133 + # --- remote
134 +
135 +
136 + # == dependency resolution ==
137 +
138 + # the list of simple dep rule files
139 simple_rules_files = dict (
140 path = [ 'DEPRES', 'SIMPLE_RULES', 'files' ],
141 - value_type = 'list:fs_abs',
142 + value_type = fs_abslist,
143 ),
144 +
145 + # * alias
146 simple_rules_file = 'simple_rules_files',
147 - repo_config = 'repo_config_files',
148 - repo_config_file = 'repo_config_files',
149 - repo_config_files = dict (
150 - path = [ 'REPO', 'config_files' ],
151 - value_type = 'slist:fs_abs',
152 - ),
153 +
154 + # --- dependency resolution
155 +
156 )