pluginhandler: add support for disabling system library migration #989

Merged
merged 5 commits into from Jan 4, 2017

Conversation

Projects
None yet
3 participants
Member

kyrofa commented Dec 15, 2016

Currently snapcraft, during the prime step for a part, checks to see if that part needs any libraries from the system. This is not always desired, as in some cases the libraries will be provided by another snap via the content interface.

This PR fixes LP: #1639831 by introducing a new property to the base part YAML: build-attributes. It's simply a list of build attributes, only one of which exists right now: no-system-libraries. For example:

parts:
  # ...
  example:
    plugin: cmake
    build-attributes: [no-system-libraries]
  # ...

Using the no-system-libraries attribute has the effect of not pulling any libraries from the system during the prime step for that part.

Collaborator

sergiusens commented Dec 16, 2016

More than build-options I'd call these build-attributes

Add support for disabling system library migration.
Currently snapcraft, during the prime step for a part, checks to see if
that part needs any libraries from the system. This is not always
desired, as in some cases the libraries will be provided by another snap
via the content interface.

This commit introduces a new property to the base part YAML:
build-attributes. It's simply a list of build attributes, only one of
which exists right now: `no-system-libraries`. For example:

    parts:
      # ...
      example:
        plugin: cmake
        build-attributes: [no-system-libraries]
      # ...

Using the `no-system-libraries` attribute has the effect of not pulling
any libraries from the system during the prime step for that part.

LP: #1639831

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Member

kyrofa commented Dec 16, 2016

More than build-options I'd call these build-attributes

Works for me-- done.

codecov-io commented Dec 16, 2016

Current coverage is 96.40% (diff: 100%)

Merging #989 into master will increase coverage by <.01%

@@             master       #989   diff @@
==========================================
  Files           190        192     +2   
  Lines         16926      16962    +36   
  Methods           0          0          
  Messages          0          0          
  Branches       1292       1293     +1   
==========================================
+ Hits          16316      16352    +36   
  Misses          418        418          
  Partials        192        192          

Powered by Codecov. Last update a725e69...d7987e5

Looks good, the in-code and md documentation needs to be updated to add this though.

@sergiusens sergiusens changed the title from Add support for disabling system library migration. to pluginhandler: add support for disabling system library migration Jan 3, 2017

kyrofa added some commits Jan 3, 2017

Document build-attributes.
Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Member

kyrofa commented Jan 3, 2017

Looks good, the in-code and md documentation needs to be updated to add this though.

Ah of course! Done.

@sergiusens sergiusens merged commit 54aa0ec into snapcore:master Jan 4, 2017

2 of 5 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
xenial-armhf autopkgtest running
Details
yakkety-amd64 autopkgtest running
Details
xenial-amd64 autopkgtest finished (success)
Details
zesty-amd64 autopkgtest finished (success)
Details

@kyrofa kyrofa deleted the kyrofa:feature/1639831/support_no_ldd_crawling branch Jan 5, 2017

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017

pluginhandler: add support for disabling system library migration (#989)
Currently snapcraft, during the prime step for a part, checks to see if
that part needs any libraries from the system. This is not always
desired, as in some cases the libraries will be provided by another snap
via the content interface.

This commit introduces a new property to the base part YAML:
build-attributes. It's simply a list of build attributes, only one of
which exists right now: `no-system-libraries`. For example:

    parts:
      # ...
      example:
        plugin: cmake
        build-attributes: [no-system-libraries]
      # ...

Using the `no-system-libraries` attribute has the effect of not pulling
any libraries from the system during the prime step for that part.

LP: #1639831

Signed-off-by: Kyle Fazzari <kyle@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment