Call for testing: snapcraft 2.43

@oSoMoN this is due to your use of source: snap in your launcher part. The snap directory is intended for use by snapcraft (i.e. use it for local plugins, hooks, icons etc. but don’t use it for part sources). This has been logged as, and the fix has been committed: . However, we still recommend not putting part sources into the snap directory, it’s simply not treated the same way as the rest of the project. Newer releases will begin warning about this.

1 Like

Thanks @kyrofa, moving the part out into another directory should be easy enough.
However I’m also seeing the same issue when building a snap that has only remote parts, but for which the definition is under snap/snapcraft.yaml, is that not recommended either?

you’re not specifying a source: on communitheme’s part so I’m guessing you’re hitting a problem similar to mine where vscode changed the project folder:

    plugin: nil
    build-snaps: [communitheme/latest/edge]
    override-build: |
      set -eu
      snapcraftctl build
      cp -a /snap/communitheme/current/share $SNAPCRAFT_PART_INSTALL/
      rm -rf $SNAPCRAFT_PART_INSTALL/share/gnome-shell/

Bad news for Snapcrafters Template Plus, which currently using the entire snap folder as assets part’s source

Yeah, not recommended.

@oSoMoN and I have been chatting about this on IRC, but I wanted to come back here to loop interested parties in. The snap directory is intended for the snapcraft.yaml, plugins, hooks, icons, and desktop files-- having snap/snapcraft.yaml is perfectly fine and is indeed recommended. However, one of the parts in the project (sassc in particular) actually modified the project’s .git directory during its build process as it was trying to figure out its own version. Snapcraft detected these changes as source changes. I’m looking into making that error a bit more helpful, but @oSoMoN was able to work around this by pulling the trouble part with git instead of using a tarball (so any git operations it performed was on its own repository rather than the project’s).

6 posts were split to a new topic: Containing snap related assets to the snap directory

Split at @sergiusens’s request — people commenting on this topic trigger a “omg panic release is broken” button in his hind-brain.