From 8dc5acd3e065cb76a70d76101b1ccc649b1f5145 Mon Sep 17 00:00:00 2001 From: Andrew Gaffney Date: Sat, 10 Jan 2009 21:36:18 -0600 Subject: [PATCH] Pre-split options from config file and remove unnecessary imported modules --- ChangeLog | 3 +++ catalyst | 30 +++++++++++++++--------------- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 966184bb..1f0fbd1c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,9 @@ # Copyright 2002-2009 Gentoo Foundation; 2008-2009 Various authors (see AUTHORS) # Distributed under the GPL v2 + 11 Jan 2009; Andrew Gaffney catalyst: + Pre-split options from config file and remove unnecessary imported modules + 11 Jan 2009; Andrew Gaffney catalyst: Move code to verify digest and hash functions to a separate function diff --git a/catalyst b/catalyst index 270c09d3..9cc99feb 100755 --- a/catalyst +++ b/catalyst @@ -4,9 +4,7 @@ # Andrew Gaffney # Chris Gianelloni -import os, sys, imp, string, getopt -import pdb -import os.path +import os, sys, getopt __selfpath__ = os.path.abspath(os.path.dirname(__file__)) @@ -105,48 +103,50 @@ def parse_config(myconfig): print "Setting",x,"to default value \""+confdefaults[x]+"\"" conf_values[x]=confdefaults[x] + split_options = conf_values["options"].split() + # parse out the rest of the options from the config file - if "autoresume" in string.split(conf_values["options"]): + if "autoresume" in split_options: print "Autoresuming support enabled." conf_values["AUTORESUME"]="1" - if "ccache" in string.split(conf_values["options"]): + if "ccache" in split_options: print "Compiler cache support enabled." conf_values["CCACHE"]="1" - if "clear-autoresume" in string.split(conf_values["options"]): + if "clear-autoresume" in split_options: print "Cleaning autoresume flags support enabled." conf_values["CLEAR_AUTORESUME"]="1" -# if "compress" in string.split(conf_values["options"]): +# if "compress" in split_options: # print "Compression enabled." # conf_values["COMPRESS"]="1" - if "distcc" in string.split(conf_values["options"]): + if "distcc" in split_options: print "Distcc support enabled." conf_values["DISTCC"]="1" - if "icecream" in string.split(conf_values["options"]): + if "icecream" in split_options: print "Icecream compiler cluster support enabled." conf_values["ICECREAM"]="1" - if "kerncache" in string.split(conf_values["options"]): + if "kerncache" in split_options: print "Kernel cache support enabled." conf_values["KERNCACHE"]="1" - if "pkgcache" in string.split(conf_values["options"]): + if "pkgcache" in split_options: print "Package cache support enabled." conf_values["PKGCACHE"]="1" - if "purge" in string.split(conf_values["options"]): + if "purge" in split_options: print "Purge support enabled." conf_values["PURGE"]="1" - if "seedcache" in string.split(conf_values["options"]): + if "seedcache" in split_options: print "Seed cache support enabled." conf_values["SEEDCACHE"]="1" - if "snapcache" in string.split(conf_values["options"]): + if "snapcache" in split_options: print "Snapshot cache support enabled." conf_values["SNAPCACHE"]="1" @@ -154,7 +154,7 @@ def parse_config(myconfig): print "Use of metadata_overlay module for portage enabled." conf_values["METADATA_OVERLAY"]="1" -# if "tarball" in string.split(conf_values["options"]): +# if "tarball" in split_options: # print "Tarball creation enabled." # conf_values["TARBALL"]="1" -- 2.26.2