Return-Path: X-Original-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 37162EB9A for ; Fri, 11 Jan 2013 20:28:26 +0000 (UTC) Received: (qmail 92830 invoked by uid 500); 11 Jan 2013 20:28:26 -0000 Delivered-To: apmail-incubator-bloodhound-dev-archive@incubator.apache.org Received: (qmail 92783 invoked by uid 500); 11 Jan 2013 20:28:26 -0000 Mailing-List: contact bloodhound-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-dev@incubator.apache.org Received: (qmail 92774 invoked by uid 99); 11 Jan 2013 20:28:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 20:28:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of olemis@gmail.com designates 209.85.223.172 as permitted sender) Received: from [209.85.223.172] (HELO mail-ie0-f172.google.com) (209.85.223.172) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 20:28:20 +0000 Received: by mail-ie0-f172.google.com with SMTP id c13so2805328ieb.17 for ; Fri, 11 Jan 2013 12:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=1cCO4Jirhi3rriynp7j2Bhff7wtclEC8I0/jRtm6O0E=; b=AH8lv/JF6dnwLq+5WSHo7iXemGaX3tBc3228ooRkYwqajsSYNBfw2POleFKvYi9tPH vBDR0foer7oAjsCJTeyGWSESs2+BvG5yDhcrsVPWaBP5nViz57hnfKDOVuWmE8TiZ3ei ZFKW/tOL86YktZEhKJRuLPGN/FTK85bFTKm+u+Dkuav5AX550Pu/XoIsfExX9liyrexE DxUNLRZgWySRtTKmz6XOh5YjKkhqHHu+NYrfdKSBpH+WDV2bcvJGH1WcCDQcqWDmdrD6 Dn/Wn4ehYZI9fpreMS0FCyrNBdBYG20zjK/0rCr1H9Tmb8AefQBgjfp3XL0uI4LZbbvA SE7Q== MIME-Version: 1.0 Received: by 10.50.106.135 with SMTP id gu7mr283764igb.111.1357936079304; Fri, 11 Jan 2013 12:27:59 -0800 (PST) Received: by 10.50.1.44 with HTTP; Fri, 11 Jan 2013 12:27:59 -0800 (PST) In-Reply-To: <50F038FE.6000006@digiverse.si> References: <053.0e57377525de9e84b59ecf4d36bdc79a@incubator.apache.org> <50F038FE.6000006@digiverse.si> Date: Fri, 11 Jan 2013 15:27:59 -0500 Message-ID: Subject: Re: [Apache Bloodhound] #323: Add support for custom hooks configurable through trac.ini From: Olemis Lang To: bloodhound-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org On 1/11/13, Jure Zitnik wrote: > [...] > > So I was playing with an idea to introduce global.ini (or boot.ini or > something like that) that would be located on a well-known location in > the installation tree (trac.env_parent_dir for example) and would hold > global (=common for all environments) settings (custom hooks for > starters). The question is where this configuration is supposed to be > loaded/processed. trac/__init__.py would be one place but I'm not sure > that's the right one :) > IMO there's no reason to spend some time developing something new for this to happen . The reason is *not* that your reasoning is not correct . The fact is that this (configuration inheritance) has been already there since a long time . If you have one such file e.g. global.ini and add the following lines in trac.ini {{{ #!ini [inherit] file = /path/to/global.ini }}} then trac.ini will inherit all the settings specified in there . So IMO , instead of modifying the source code to introduce such global configuration files , I'd rather suggest to setup this at deployment time e.g. in installer script . PS: configuration inheritance even works for product environments ... mainly in two (complementary) ways : 1. if there's a value for [inherit] file option stored product config table (i.e. in the database) then it will work just like explained above for ini files . Relative paths are resolved relative to /path/to/env/conf sub-folder 2. `parents` arg in multiproduct.config.Configuration.__init__ -- Regards, Olemis. Blog ES: http://simelo-es.blogspot.com/ Blog EN: http://simelo-en.blogspot.com/ Featured article: