From: "W. Trevor King" <wking@tremily.us>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] [PATCH 1/5] Some options cleanup, unifying their use, reducing redundancy.
Date: Thu, 18 Sep 2014 06:00:30 -0700 [thread overview]
Message-ID: <20140918130030.GN5139@odin.tremily.us> (raw)
In-Reply-To: <1410407024-2445-2-git-send-email-dolsen@gentoo.org>
[-- Attachment #1: Type: text/plain, Size: 4682 bytes --]
On Wed, Sep 10, 2014 at 08:43:40PM -0700, Brian Dolbec wrote:
> -valid_config_file_values.extend(["PKGCACHE", "KERNCACHE", "CCACHE", "DISTCC",
> - "ICECREAM", "ENVSCRIPT", "AUTORESUME", "FETCH", "CLEAR_AUTORESUME",
> - "options", "DEBUG", "VERBOSE", "PURGE", "PURGEONLY", "SNAPCACHE",
> - "snapshot_cache", "hash_function", "digests", "contents", "SEEDCACHE"
> +valid_config_file_values.extend([ "distcc", "envscript",
> + "options", "DEBUG", "VERBOSE",
> + "snapshot_cache", "hash_function", "digests", "contents"
I think you meant to drop 'distcc' from valid_config_file_values,
since it's just a boolean, and you do have it in the new
option_messages:
> +# legend: key: message
> +option_messages = {
> + "autoresume": "Autoresuming support enabled.",
> + "ccache": "Compiler cache support enabled.",
> + "clear-autoresume": "Cleaning autoresume flags support enabled.",
> + #"compress": "Compression enabled.",
> + "distcc": "Distcc support enabled.",
> + "icecream": "Icecream compiler cluster support enabled.",
> + "kerncache": "Kernel cache support enabled.",
> + "pkgcache": "Package cache support enabled.",
> + "purge": "Purge support enabled.",
> + "seedcache": "Seed cache support enabled.",
> + "snapcache": "Snapshot cache support enabled.",
> + #"tarball": "Tarball creation enabled.",
> + }
I'd also remove the tarball entry, since we haven't used TARBALL since
9be28ed1 (Fixed up action_sequence when using --fetchonly to not
create tarballs or IS O images for bug #143392, 2006-11-22).
> - if "bindist" in string.split(conf_values["options"]):
> - print "Binary redistribution enabled"
> - conf_values["BINDIST"]="1"
> - else:
> - print "Bindist is not enabled in catalyst.conf"
> - print "Binary redistribution of generated stages/isos may be prohibited by law."
> - print "Please see the use description for bindist on any package you are including."
Hmm, I think you need a 'bindist' entry in option_messages. And I'd
probably tack on the legal warning to the enabled message.
> + #print "MAIN: cli options =", options
You don't need to add this ;).
> + conf_values["options"].update(options)
> + #print "MAIN: conf_values['options'] =", conf_values["options"]
Or this #print.
> @@ -501,8 +501,8 @@ class generic_stage_target(generic_target):
> "base_dirs","bind","chroot_setup","setup_environment",\
> "run_local","preclean","unbind","clean"]
> # if "TARBALL" in self.settings or \
> -# "FETCH" not in self.settings:
> - if "FETCH" not in self.settings:
> +# "fetch" not in self.settings["options"]:
> + if "fetch" not in self.settings["options"]:
> self.settings["action_sequence"].append("capture")
> self.settings["action_sequence"].append("clear_autoresume")
I'd just remove the whole comment, since we don't use TARBALL (see my
earlier comment).
> @@ -1285,7 +1292,14 @@ class generic_stage_target(generic_target):
> fixed. We need this to use the os.system() call since we can't
> specify our own environ
> """
> - for x in self.settings.keys():
> + #print "setup_environment(); settings =", list(self.settings)
> + for x in list(self.settings):
> + #print "setup_environment(); processing:", x
> + if x == "options":
> + #self.env['clst_' + x] = ' '.join(self.settings[x])
> + for opt in self.settings[x]:
> + self.env['clst_' + opt.upper()] = "true"
> + continue
> """ Sanitize var names by doing "s|/-.|_|g" """
> varname="clst_"+string.replace(x,"/","_")
> varname=string.replace(varname,"-","_")
No need to add the commented lines. I don't understand the switch
from self.settings.keys() to list(self.settings) either, is that just
churn?
> def build_kernel(self):
> - "Build all configured kernels"
> + '''Build all configured kernels'''
This seems like unnecessary churn ;).
> # if "TARBALL" in self.settings or \
> -# "FETCH" not in self.settings:
> - if "FETCH" not in self.settings:
> +# "fetch" not in self.settings['options']:
> + if "fetch" not in self.settings['options']:
> self.settings["action_sequence"].append("capture")
> self.settings["action_sequence"].append("clear_autoresume")
Goodbye comment (no more TARBALL).
I haven't tested this one yet (and it would be hard to do thoroughly
with so many options on the line), but it looks good other than the
things I mentioned ;). I'm very positive on the options set for
boolean configs.
Cheers,
Trevor
--
This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2014-09-18 13:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-11 3:43 [gentoo-catalyst] [PATCH 0/5] Next group of 5 patches Brian Dolbec
2014-09-11 3:43 ` [gentoo-catalyst] [PATCH 1/5] Some options cleanup, unifying their use, reducing redundancy Brian Dolbec
2014-09-18 13:00 ` W. Trevor King [this message]
2014-09-11 3:43 ` [gentoo-catalyst] [PATCH 2/5] Move LockInUse from support.py to lock.py, fix bad execption raising, pyflakes cleanup Brian Dolbec
2014-09-11 3:43 ` [gentoo-catalyst] [PATCH 3/5] Begin splitting up generic_stage_target into smaller code blocks Brian Dolbec
2014-09-11 3:43 ` [gentoo-catalyst] [PATCH 4/5] Some spacing, comment and indent cleanup Brian Dolbec
2014-09-11 3:43 ` [gentoo-catalyst] [PATCH 5/5] Remove redundant /bin/bash additions in cmd() calls Brian Dolbec
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=20140918130030.GN5139@odin.tremily.us \
--to=wking@tremily.us \
--cc=gentoo-catalyst@lists.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