From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id E8CB81391DB for ; Sat, 22 Mar 2014 22:25:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2C0FDE0D0C; Sat, 22 Mar 2014 22:25:24 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4E04DE0D06 for ; Sat, 22 Mar 2014 22:25:23 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 77FB933FCFE for ; Sat, 22 Mar 2014 22:25:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id E85ED188F8 for ; Sat, 22 Mar 2014 22:25:18 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1395511291.0ca9ec75522dbf9c55ad422070b6a92140faa5d1.dol-sen@gentoo> Subject: [gentoo-commits] proj/catalyst:pending commit in: catalyst/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/defaults.py catalyst/main.py X-VCS-Directories: catalyst/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 0ca9ec75522dbf9c55ad422070b6a92140faa5d1 X-VCS-Branch: pending Date: Sat, 22 Mar 2014 22:25:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d5dc9d2a-79a3-4e58-bbce-a146320fcb5d X-Archives-Hash: 5aa8f2dfa1aed41c3293810276962747 commit: 0ca9ec75522dbf9c55ad422070b6a92140faa5d1 Author: Brian Dolbec gentoo org> AuthorDate: Sat Jan 19 05:51:35 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Sat Mar 22 18:01:31 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=0ca9ec75 Move confdefaults out of main.py --- catalyst/defaults.py | 17 +++++++++++++++++ catalyst/main.py | 20 +++----------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/catalyst/defaults.py b/catalyst/defaults.py index 748d1dd..b83e4f5 100644 --- a/catalyst/defaults.py +++ b/catalyst/defaults.py @@ -21,6 +21,22 @@ valid_config_file_values.extend(["PKGCACHE", "KERNCACHE", "CCACHE", "DISTCC", verbosity = 1 +confdefaults={ + "distdir": "/usr/portage/distfiles", + "hash_function": "crc32", + "icecream": "/var/cache/icecream", + "local_overlay": "/usr/local/portage", + "options": "", + "packagedir": "/usr/portage/packages", + "portdir": "/usr/portage", + "port_tmpdir": "/var/tmp/portage", + "repo_name": "portage", + "sharedir": "/usr/lib/catalyst", + "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", + "snapshot_name": "portage-", + "storedir": "/var/tmp/catalyst", + } + PORT_LOGDIR_CLEAN = \ 'find "${PORT_LOGDIR}" -type f ! -name "summary.log*" -mtime +30 -delete' @@ -48,3 +64,4 @@ SOURCE_MOUNT_DEFAULTS = { "proc": "/proc", "shm": "shmfs", } + diff --git a/catalyst/main.py b/catalyst/main.py index e2ef976..5748d31 100644 --- a/catalyst/main.py +++ b/catalyst/main.py @@ -22,7 +22,8 @@ from . import __version__ import catalyst.config import catalyst.util from catalyst.support import CatalystError, find_binary, LockInUse -from catalyst.defaults import required_build_targets, valid_build_targets +from catalyst.defaults import (required_build_targets, valid_build_targets, + confdefaults) from hash_utils import HashMap, HASH_DEFINITIONS from contents import ContentsMap, CONTENTS_DEFINITIONS @@ -70,21 +71,6 @@ def parse_config(myconfig): myconf={} config_file="" - confdefaults = { - "distdir": "/usr/portage/distfiles", - "hash_function": "crc32", - "icecream": "/var/cache/icecream", - "local_overlay": "/usr/local/portage", - "options": "", - "packagedir": "/usr/portage/packages", - "portdir": "/usr/portage", - "repo_name": "portage", - "sharedir": "/usr/share/catalyst", - "snapshot_name": "portage-", - "snapshot_cache": "/var/tmp/catalyst/snapshot_cache", - "storedir": "/var/tmp/catalyst", - } - # first, try the one passed (presumably from the cmdline) if myconfig: if os.path.exists(myconfig): @@ -117,7 +103,7 @@ def parse_config(myconfig): sys.exit(1) # now, load up the values into conf_values so that we can use them - for x in confdefaults.keys(): + for x in list(confdefaults): if x in myconf: print "Setting",x,"to config file value \""+myconf[x]+"\"" conf_values[x]=myconf[x]