Currernt config hook implementation scales very badly

Stuart Bishop stuart.bishop at canonical.com
Thu Feb 2 03:16:43 UTC 2017


On 1 February 2017 at 21:48, Michael Hall <mhall119 at ubuntu.com> wrote:

> On a related note, does anybody have a suggestion on a lightweight way
> of programmatically modifying configs in .ini, XML or JSON?
>
> I have a couple of use-cases (erlang-based nosql databases) where the
> server updates the the local configuration, so I can't just overwrite
> the whole thing every time. Didier's example will work for a very basic
> key=value config file, but not something more structured, and I'd hate
> to introduce Python, Perl or Java just for this.
>

Really? I thought Python was an excellent choice, and built and staged all
my wrappers as a Python part. 'core' already has Python3, so it isn't
bloating the snap size. And it makes it a doddle to manipulate json, yaml
or ini files, when this sort of thing requires an expert to do correctly in
bash or dash.

(but look at 'jq' if you insist on shell scripts - it seemed very helpful
for dealing with json)

-- 
Stuart Bishop <stuart.bishop at canonical.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170202/202c14a2/attachment.html>


More information about the Snapcraft mailing list