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 C38D9138200 for ; Thu, 20 Jun 2013 23:40:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 8FBF9E0949; Thu, 20 Jun 2013 23:40:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DA172E086E for ; Thu, 20 Jun 2013 23:40:43 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AC73533E4CF for ; Thu, 20 Jun 2013 23:40:42 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 542A4E468F for ; Thu, 20 Jun 2013 23:40:41 +0000 (UTC) From: "André Erdmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "André Erdmann" Message-ID: <1371766589.63c1d92092acfb064e6306d51fb6d5cd99c3afac.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: roverlay/config/, roverlay/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/argutil.py roverlay/config/const.py roverlay/config/entrymap.py X-VCS-Directories: roverlay/config/ roverlay/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 63c1d92092acfb064e6306d51fb6d5cd99c3afac X-VCS-Branch: gsoc13/next Date: Thu, 20 Jun 2013 23:40:41 +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: e9bb7759-3754-4905-abe2-237dd01b958c X-Archives-Hash: 9493d50a0b64f21c0284d49a33a97eca Message-ID: <20130620234041.QdiuVs8vCdAQ4o8jSJoTBcpsBptCXr3yAyyCzfpfE4s@z> commit: 63c1d92092acfb064e6306d51fb6d5cd99c3afac Author: André Erdmann mailerd de> AuthorDate: Thu Jun 20 22:16:29 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Thu Jun 20 22:16:29 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=63c1d920 roverlay, config: nosync/hooks, fixup --- roverlay/argutil.py | 13 ++++++++++--- roverlay/config/const.py | 6 +++++- roverlay/config/entrymap.py | 16 +++++++++++++++- 3 files changed, 30 insertions(+), 5 deletions(-) diff --git a/roverlay/argutil.py b/roverlay/argutil.py index 99842fd..fe541ac 100644 --- a/roverlay/argutil.py +++ b/roverlay/argutil.py @@ -277,9 +277,9 @@ def get_parser ( command_map, default_config_file, default_command='create' ): ) arg ( - '--nosync', '--no-sync', + '--nosync', '--no-sync', default=argparse.SUPPRESS, help="disable syncing with remotes (offline mode).", - **opt_in + action='store_true', ) arg ( @@ -398,7 +398,8 @@ def parse_argv ( command_map, **kw ): commands = ( p.commands, ) if isinstance ( p.commands, str ) else p.commands conf = dict() extra = dict ( - nosync = p.nosync, +# TODO: remove nosync entirely from extra +# nosync = p.nosync, # debug = p.debug, show_overlay = p.show_overlay, write_overlay = p.write_overlay, @@ -445,6 +446,11 @@ def parse_argv ( command_map, **kw ): extra ['nosync'] = True if 'create' in command_map: commands.append ( "create" ) + elif given ( 'nosync' ): + extra ['nosync'] = True + + if extra.get ( 'nosync', False ): + doconf ( True, 'nosync' ) if given ( 'deprule_file' ): doconf ( p.deprule_file, 'DEPRES.SIMPLE_RULES.files' ) @@ -452,5 +458,6 @@ def parse_argv ( command_map, **kw ): if given ( 'manifest_implementation' ): doconf ( p.manifest_implementation, 'OVERLAY.manifest_implementation' ) + return ( commands, p.config, conf, extra ) # --- end of parse_argv (...) --- diff --git a/roverlay/config/const.py b/roverlay/config/const.py index 3d330ba..4ee9d45 100644 --- a/roverlay/config/const.py +++ b/roverlay/config/const.py @@ -12,7 +12,11 @@ import time __all__ = [ 'clone', 'lookup' ] _CONSTANTS = dict ( - DEBUG = False, + # FIXME: capslock? ;) + DEBUG = False, + debug = False, + + nosync = False, # logging defaults are in recipe/easylogger diff --git a/roverlay/config/entrymap.py b/roverlay/config/entrymap.py index 65f2df5..5ae7b78 100644 --- a/roverlay/config/entrymap.py +++ b/roverlay/config/entrymap.py @@ -230,6 +230,7 @@ CONFIG_ENTRY_MAP = dict ( ), overlay_additions_dir = dict ( + path = [ 'OVERLAY', 'additions_dir', ], value_type = 'fs_abs:fs_dir', description = 'directory containing ebuilds and ebuild patches', ), @@ -260,7 +261,7 @@ CONFIG_ENTRY_MAP = dict ( ), # ebuild is used to create Manifest files ebuild_prog = dict ( - path = [ 'TOOLS', 'ebuild_exe' ], + path = [ 'TOOLS', 'EBUILD', 'exe' ], value_type = 'fs_path', description = "name of/path to the ebuild executable", ), @@ -434,6 +435,14 @@ CONFIG_ENTRY_MAP = dict ( # --- package rules + # == hooks / scripts == + + hook_overlay_success = dict ( + path = [ 'HOOK', 'OVERLAY', 'success', ], + value_type = 'fs_file', + description = "script that is run just before exiting normally", + ), + # == other == cachedir = dict ( @@ -448,6 +457,11 @@ CONFIG_ENTRY_MAP = dict ( description = 'directory for temporary data', ), + nosync = dict ( + value_type = yesno, + description = 'forbid/allow syncing with remotes', + ) + # --- other )