Re: [aur-dev][PATCH] config: allow reading both the proto file and the modified config

2018-04-12 Thread Nodiv Byzero
What do you think about adding one more line to check if $config is already set? Something like: if (!isset($config)) { ... do the parse_ini_file } Just to reduce disk operations. On Thu, Apr 12, 2018 at 10:44 AM, Eli Schwartz wrote: > This change allows aurweb

[aur-dev][PATCH] config: allow reading both the proto file and the modified config

2018-04-12 Thread Eli Schwartz
This change allows aurweb configuration to be done via either: - copying config.proto to config and modifying values - creating a new config only containing modified values, next to a config.proto containing unmodified values The motivation for this change is to enable ansible configuration by

Re: [aur-dev][PATCH] config: allow reading both the proto file and the modified config

2018-04-12 Thread Eli Schwartz
On 04/12/2018 01:51 PM, Nodiv Byzero wrote: > What do you think about adding one more line to check if $config is already > set? > Something like: > if (!isset($config)) { > ... do the parse_ini_file > } > > Just to reduce disk operations. What is the point? We only check if $AUR_CONFIG

Re: [aur-dev][PATCH] config: allow reading both the proto file and the modified config

2018-04-12 Thread Nodiv Byzero
The point is that there are few places where config_load() gets called in the sequential order (the same request) and every time it loads and parses data. On Thu, Apr 12, 2018 at 11:05 AM, Eli Schwartz wrote: > On 04/12/2018 01:51 PM, Nodiv Byzero wrote: >> What do you