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

Eli Schwartz eschwartz at archlinux.org
Thu Apr 12 18:05:04 UTC 2018

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 isset() because it is
explicitly global, and the function is here to set it if needed or else
do nothing.

$config is locally scoped, and its only purpose is exactly where it is
being used. It should be utterly impossible for it to be set beforehand.


On an unrelated note, Bluewind suggested renaming the config.proto to
config.defaults, so if Lukas agrees with this patch I will send in an
amended version.

Eli Schwartz
Bug Wrangler and Trusted User

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.archlinux.org/pipermail/aur-dev/attachments/20180412/e0fee4bd/attachment.asc>

More information about the aur-dev mailing list