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 4259B1381F3 for ; Mon, 15 Jul 2013 22:31:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D2032E09C5; Mon, 15 Jul 2013 22:31:50 +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 3DE59E09C5 for ; Mon, 15 Jul 2013 22:31:50 +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 4280E33E829 for ; Mon, 15 Jul 2013 22:31:49 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 8FED7E545F for ; Mon, 15 Jul 2013 22:31:47 +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: <1373927310.39d0fc71190b45813be08386c638bb49e1827454.dywi@gentoo> Subject: [gentoo-commits] proj/R_overlay:gsoc13/next commit in: roverlay/config/ X-VCS-Repository: proj/R_overlay X-VCS-Files: roverlay/config/defconfig.py X-VCS-Directories: roverlay/config/ X-VCS-Committer: dywi X-VCS-Committer-Name: André Erdmann X-VCS-Revision: 39d0fc71190b45813be08386c638bb49e1827454 X-VCS-Branch: gsoc13/next Date: Mon, 15 Jul 2013 22:31:47 +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: 2c97666c-bc3d-4563-a3a6-847d63b2396e X-Archives-Hash: 75c1932541a72f86955ef592ee5b523e Message-ID: <20130715223147.CmRNPntMqhkXNeprhBV4lbC_djcRf7NGzMgwzJ86K7I@z> commit: 39d0fc71190b45813be08386c638bb49e1827454 Author: André Erdmann mailerd de> AuthorDate: Mon Jul 15 22:28:30 2013 +0000 Commit: André Erdmann mailerd de> CommitDate: Mon Jul 15 22:28:30 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/R_overlay.git;a=commit;h=39d0fc71 roverlay/config/defconfig: set EVENT_HOOK_RESTRICT --- roverlay/config/defconfig.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/roverlay/config/defconfig.py b/roverlay/config/defconfig.py index 7ae0d5b..9e0f336 100644 --- a/roverlay/config/defconfig.py +++ b/roverlay/config/defconfig.py @@ -69,16 +69,22 @@ class ConfigOption ( object ): self.append_newline = append_newline self.value = None self.defaults_to = defaults_to + + #self.is_set = False # --- end of __init__ (...) --- + def set_value ( self, value ): + self.value = value + #self.is_set = True + def gen_str ( self ): entry = self.map_entry[1] if self.value is None: using_default = True self.value = self.default - elif self.value == self.default: - using_default = True +# elif self.value == self.default: +# using_default = True else: using_default = False @@ -198,8 +204,8 @@ class RoverlayConfigCreation ( object ): except ( TypeError, ValueError ): raise ConfigValueError ( key, value ) - if converted_value: - option.value = svalue + if converted_value is not None: + option.set_value ( svalue ) else: raise ConfigValueError ( key, value ) pass @@ -279,8 +285,12 @@ class RoverlayConfigCreation ( object ): 'EVENT_HOOK', datadir ( 'hooks/mux.sh' ), ), ConfigOption ( - 'EVENT_HOOK_RESTRICT', '-* overlay_success', - comment_default=True, required=False, + 'EVENT_HOOK_RESTRICT', '-* overlay_success user', + description=( + 'Note:', + ' setting -user is highly recommended when running roverlay as root', + ), + comment_default=False, required=False, defaults_to=( "*", "allow all" ), ), ConfigOption (