1 |
On Wed, Sep 10, 2014 at 08:43:40PM -0700, Brian Dolbec wrote: |
2 |
> -valid_config_file_values.extend(["PKGCACHE", "KERNCACHE", "CCACHE", "DISTCC", |
3 |
> - "ICECREAM", "ENVSCRIPT", "AUTORESUME", "FETCH", "CLEAR_AUTORESUME", |
4 |
> - "options", "DEBUG", "VERBOSE", "PURGE", "PURGEONLY", "SNAPCACHE", |
5 |
> - "snapshot_cache", "hash_function", "digests", "contents", "SEEDCACHE" |
6 |
> +valid_config_file_values.extend([ "distcc", "envscript", |
7 |
> + "options", "DEBUG", "VERBOSE", |
8 |
> + "snapshot_cache", "hash_function", "digests", "contents" |
9 |
|
10 |
I think you meant to drop 'distcc' from valid_config_file_values, |
11 |
since it's just a boolean, and you do have it in the new |
12 |
option_messages: |
13 |
|
14 |
> +# legend: key: message |
15 |
> +option_messages = { |
16 |
> + "autoresume": "Autoresuming support enabled.", |
17 |
> + "ccache": "Compiler cache support enabled.", |
18 |
> + "clear-autoresume": "Cleaning autoresume flags support enabled.", |
19 |
> + #"compress": "Compression enabled.", |
20 |
> + "distcc": "Distcc support enabled.", |
21 |
> + "icecream": "Icecream compiler cluster support enabled.", |
22 |
> + "kerncache": "Kernel cache support enabled.", |
23 |
> + "pkgcache": "Package cache support enabled.", |
24 |
> + "purge": "Purge support enabled.", |
25 |
> + "seedcache": "Seed cache support enabled.", |
26 |
> + "snapcache": "Snapshot cache support enabled.", |
27 |
> + #"tarball": "Tarball creation enabled.", |
28 |
> + } |
29 |
|
30 |
I'd also remove the tarball entry, since we haven't used TARBALL since |
31 |
9be28ed1 (Fixed up action_sequence when using --fetchonly to not |
32 |
create tarballs or IS O images for bug #143392, 2006-11-22). |
33 |
|
34 |
> - if "bindist" in string.split(conf_values["options"]): |
35 |
> - print "Binary redistribution enabled" |
36 |
> - conf_values["BINDIST"]="1" |
37 |
> - else: |
38 |
> - print "Bindist is not enabled in catalyst.conf" |
39 |
> - print "Binary redistribution of generated stages/isos may be prohibited by law." |
40 |
> - print "Please see the use description for bindist on any package you are including." |
41 |
|
42 |
Hmm, I think you need a 'bindist' entry in option_messages. And I'd |
43 |
probably tack on the legal warning to the enabled message. |
44 |
|
45 |
> + #print "MAIN: cli options =", options |
46 |
|
47 |
You don't need to add this ;). |
48 |
|
49 |
> + conf_values["options"].update(options) |
50 |
> + #print "MAIN: conf_values['options'] =", conf_values["options"] |
51 |
|
52 |
Or this #print. |
53 |
|
54 |
> @@ -501,8 +501,8 @@ class generic_stage_target(generic_target): |
55 |
> "base_dirs","bind","chroot_setup","setup_environment",\ |
56 |
> "run_local","preclean","unbind","clean"] |
57 |
> # if "TARBALL" in self.settings or \ |
58 |
> -# "FETCH" not in self.settings: |
59 |
> - if "FETCH" not in self.settings: |
60 |
> +# "fetch" not in self.settings["options"]: |
61 |
> + if "fetch" not in self.settings["options"]: |
62 |
> self.settings["action_sequence"].append("capture") |
63 |
> self.settings["action_sequence"].append("clear_autoresume") |
64 |
|
65 |
I'd just remove the whole comment, since we don't use TARBALL (see my |
66 |
earlier comment). |
67 |
|
68 |
> @@ -1285,7 +1292,14 @@ class generic_stage_target(generic_target): |
69 |
> fixed. We need this to use the os.system() call since we can't |
70 |
> specify our own environ |
71 |
> """ |
72 |
> - for x in self.settings.keys(): |
73 |
> + #print "setup_environment(); settings =", list(self.settings) |
74 |
> + for x in list(self.settings): |
75 |
> + #print "setup_environment(); processing:", x |
76 |
> + if x == "options": |
77 |
> + #self.env['clst_' + x] = ' '.join(self.settings[x]) |
78 |
> + for opt in self.settings[x]: |
79 |
> + self.env['clst_' + opt.upper()] = "true" |
80 |
> + continue |
81 |
> """ Sanitize var names by doing "s|/-.|_|g" """ |
82 |
> varname="clst_"+string.replace(x,"/","_") |
83 |
> varname=string.replace(varname,"-","_") |
84 |
|
85 |
No need to add the commented lines. I don't understand the switch |
86 |
from self.settings.keys() to list(self.settings) either, is that just |
87 |
churn? |
88 |
|
89 |
> def build_kernel(self): |
90 |
> - "Build all configured kernels" |
91 |
> + '''Build all configured kernels''' |
92 |
|
93 |
This seems like unnecessary churn ;). |
94 |
|
95 |
> # if "TARBALL" in self.settings or \ |
96 |
> -# "FETCH" not in self.settings: |
97 |
> - if "FETCH" not in self.settings: |
98 |
> +# "fetch" not in self.settings['options']: |
99 |
> + if "fetch" not in self.settings['options']: |
100 |
> self.settings["action_sequence"].append("capture") |
101 |
> self.settings["action_sequence"].append("clear_autoresume") |
102 |
|
103 |
Goodbye comment (no more TARBALL). |
104 |
|
105 |
I haven't tested this one yet (and it would be hard to do thoroughly |
106 |
with so many options on the line), but it looks good other than the |
107 |
things I mentioned ;). I'm very positive on the options set for |
108 |
boolean configs. |
109 |
|
110 |
Cheers, |
111 |
Trevor |
112 |
|
113 |
-- |
114 |
This email may be signed or encrypted with GnuPG (http://www.gnupg.org). |
115 |
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy |