My snapcraft.yaml contains something like this:
parts: partA: plugin: dump source: https://github.com/X/partA.git organize: dist: partA/dist partB: plugin: dump source: https://github.com/X/partB.git organize: dist: partB/dist
The repos for parts A and B both contain
dist folders, which contain files with similar names. This is in theory fine, since I use
organize to put each set of files in a different subdirectory within the final snap. But sure enough, when I try to create the snap, I get
Failed to stage: Parts 'partA' and 'partB' have the following files, but with different contents: <list of files> Snapcraft offers some capabilities to solve this by use of the following keywords: - `filesets` - `stage` - `snap` - `organize`
I’m somewhat at a loss as to what the right solution here is here. Most suggestions for dealing with this involve using the
stage keyword to “filter out” the offending files. That doesn’t work for me, as I do want to keep all files, that then go into each of the two directories.
It doesn’t seem to me that the
stage keyword offers the sort of flexibility I need in order to change the directory name during the stage process itself (which would be the most obvious way around this).
So I suspect that my main option is to use either
override-stage and manually move/copy the two dist directories from the build area, in a way that doesn’t lead to conflicts in the stage area. Is that it? Any better suggestions?