On 05/09/16 00:25, Joseph Rushton Wakeling wrote:
One problem fixed (the inclusion of `build-essential` as a build dependency
ensures the snap will build in a `cleanbuild` environment), but one remains: it
looks like the `ldc-config` part (which manually replaces the incorrectly
auto-generated ldc2.conf with a correct alternative, using the `dump` plugin)
can sometimes fail.

There doesn't seem to be any reason for it, just with some builds I end up with
a wrong (auto-generated) ldc2.conf in the snap package, and some I end up with
the correct one copied from the ldc-config directory.

Any ideas what's up?  I'm guessing bug either with the dump plugin or with the
handling of the `snap` section of the `ldc` part ... ?

Looks like it because of only filtering out the ldc part's etc/ldc2.conf file at the `snap` step. This allowed a race condition where if ldc was staged after ldc-config, its etc/ldc2.conf would overwrite the desired one, and the `snap` filter was powerless to distinguish this.

Replacing the `snap` exclusion filter with a `stage` exclusion filter solved 
things:

parts:
  ldc:
    source: git://github.com/ldc-developers/ldc.git
    source-tag: v1.0.0
    plugin: cmake
    stage:
    - -etc/ldc2.conf
    build-packages:
    - build-essential
    - ldc
    - llvm-dev
    - libconfig++-dev
    - libcurl4-gnutls-dev
    - libedit-dev
    - zlib1g-dev
  ldc-config:
    plugin: dump
    source: ldc-config
    organize:
      ldc2.conf: etc/ldc2.conf



--
Snapcraft mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft

Reply via email to