[RCD] overriding config in separate files

Amitai Schlair schmonz at schmonz.com
Thu Sep 25 16:55:21 CEST 2008


On 25 Sep, 2008, at 2:28 AM, A.L.E.C wrote:

> Amitai Schlair wrote:
>> +include_once('main-local.inc.php');
>> +
>>
>> I can't say I've noticed any sort of performance hit as a result of
>> this, and I'd be surprised if there were much of one, but my
>> environment isn't terribly high-load and I haven't profiled anything.
>>
>> With this change, working in the way I'm talking about is entirely
>> optional; nobody has to change how they do things unless they want  
>> to.
>> Would this change be acceptable in RoundCube?
>>
> Not bad, but I think that planned upgrade script should handle config
> differences.

Where can I read more about how this script might work? A quick search  
of the trac didn't get me there.

My motivation here, as a packager, is to take advantage of automated  
config-file handling present in some package systems. For instance,  
I'm working with pkgsrc, which already handles config files fairly  
intelligently. At install time, a pristine copy goes into share/ 
examples/roundcube, then copied to /etc/roundcube unless a file by  
that name is already there; at uninstall time, if the file in /etc/ 
roundcube compares equal to the original, it's removed, else left  
behind for the sysadmin to deal with (and a notification printed). So  
if pkgsrc's RoundCube package can provide sysadmins with the option of  
not modifying /etc/roundcube/main.inc.php, then life across upgrades  
can become quite simple for those sysadmins.

The upgrade script would certainly be useful for other cases (package  
systems without this feature, users installing RoundCube manually),  
but for the problem I'm trying to solve, I'd like to see my idea  
implemented also -- especially as it's so trivial. :-)

Thanks,

- Amitai
_______________________________________________
List info: http://lists.roundcube.net/dev/



More information about the Dev mailing list