copy -> dump plugin migration

Gustavo Niemeyer gustavo.niemeyer at canonical.com
Fri Sep 2 23:19:13 UTC 2016


Hey Martin,

Just put your files under defaults/etc/quagga, and use:

    defaults:
        plugin: dump
        source: defaults

On Sep 2, 2016 7:36 PM, "Martin Winter" <mwinter at opensourcerouting.org>
wrote:

> So I’ve updated the quagga snap from using the copy plugin to the dump
> plugin.
> I’ve got it working, but it looks like a horrible hack using the dump
> plugin
> to copy files.
> I use it to copy default configs to the correct location.
>
> This is what I had before using the copy plugin:
>
> […]
>     quagga-defaults:
>         plugin: copy
>         source: defaults
>         files:
>             "*.conf.default": /etc/quagga/
> […]
>
> and this is what I use now with the dump plugin:
>
> […]
>     quagga-defaults:
>         plugin: dump
>         source: defaults
>         organize:
>             zebra.conf.default: etc/quagga/zebra.conf.default
>             bgpd.conf.default: etc/quagga/bgpd.conf.default
>             isisd.conf.default: etc/quagga/isisd.conf.default
>             ospf6d.conf.default: etc/quagga/ospf6d.conf.default
>             ospfd.conf.default: etc/quagga/ospfd.conf.default
>             pimd.conf.default: etc/quagga/pimd.conf.default
>             ripd.conf.default: etc/quagga/ripd.conf.default
>             ripngd.conf.default: etc/quagga/ripngd.conf.default
> […]
>
> Observations:
> I want to copy all files from my “defaults” directory (in the snapcraft
> build dir)
> to $SNAP/etc/quagga.
> The dump plugin doesn’t seem to support a destination, except with the
> “organize”
> function. And the “organize” function doesn’t support wildcards.
>
> This looks to me like bad code, but I can’t find a way to make this
> cleaner (better
> doc for the dump plugin would be highly appreciated)
>
> Maybe someone can comment on a better way? (It DOES WORK as shown, just
> trying to
> get feedback on a better/cleaner way, preferably with wildcard matching)
>
> - Martin Winter
>
> --
> Snapcraft mailing list
> Snapcraft at lists.snapcraft.io
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailm
> an/listinfo/snapcraft
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20160902/32ea54ab/attachment.html>


More information about the Snapcraft mailing list