ubuntu-app-platform updated to Qt 5.6.2
olivier.tilloy at canonical.com
Tue Jan 31 16:02:02 UTC 2017
On Tue, Jan 31, 2017 at 4:39 PM, Alberto Mardegan
<alberto.mardegan at canonical.com> wrote:
> On 31/01/2017 18:21, Olivier Tilloy wrote:
>> This is a bit tricky: when packaging a Qt application that uses the
>> platform snap, snapcraft will use ldd to crawl the app’s binaries and
>> will automagically add the libraries that it depends on to the
>> resulting snap (those libs are taken from the host system).
>> There is a way around that, but it’s rather counter-intuitive and
>> error-prone: add the packages containing those libs to the list of
>> stage-packages, then explicitly exclude them from the resulting snap
>> using the prime/snap keyword. You won’t be able to exclude them if you
>> didn’t include them through the stage packages first.
> Actually, I found a simpler solution (not sure if it would work in all
> cases): just explicitly list the files you need to be primed.
> This works for our webapps, which consist only of the webapp-container
> binary (and therefore are only about 600KB in size).
Sure, but this boils down to the same thing: you need to either
explicitly exclude the files you don't want or explicitly include only
the files you want.
In that specific case you don’t need to add extra stage packages
because you're using the webapp-container package already (which
implicitly pulls in all its Qt dependencies as stage packages). That
wouldn't work if you built webapp-container from source, in which case
you would need to specify your dependencies as stage-packages.
More information about the Snapcraft