I am using snapcraft-desktop-helpers-master to integrate my app into desktop.

I have added "after: [desktop/gtk2]" to app part, but how do i exclude files from this imported part to reduce snap file size like for example removed usr/share/doc

share|improve this question

This is pretty simple, you can override specific keywords from a remote defined part by redefining the key for the part. This would look something like this:

parts:
    my-part:
        plugin: autotools
        source: .
        after: [desktop/gtk2]
    desktop/gtk2:
        snap:
            - -usr/include

The trick here is that desktop/gtk2 does not define a plugin entry in the parts definition hinting snapcraft to look for the full part definition from the remote parts cache.

Here I used the snap keyword, there are others like stage and filesets

By running

snapcraft help plugins

to read more about this some minimal examples.

share|improve this answer
    
Cool, many thanks – RampantBadger Jul 15 '16 at 8:53

You can override the imported snap options by including them as an entry in your snapcraft.yaml's "parts" section. Parts Ecosystem Blog

share|improve this answer
    
Great, many thanks – RampantBadger Jul 15 '16 at 8:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.