copy -> dump plugin migration

Martin Winter mwinter at opensourcerouting.org
Sat Sep 3 00:17:03 UTC 2016


Gustavo,

On 2 Sep 2016, at 16:19, Gustavo Niemeyer wrote:

> Hey Martin,
>
> Just put your files under defaults/etc/quagga, and use:
>
>     defaults:
>         plugin: dump
>         source: defaults

That’s one way to do it - but just creating the extra subdirectories 
seems
to be non-optimal as well.
It looks like the other email from Leo points to the exact issue I had
when I tried to use the wildcards. So I may just wait for this to be
resolved and keep the complete list of the files in the meantime.

- Martin

>
> 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
>>




More information about the Snapcraft mailing list