I am running snapcraft assemble (qml plugin) on ted's branch lp:~ted/+junk/digitalsign
while iterating over the package, I added 1 new file in ./pic.jpg and edited snapcraft.yaml accordingly:
parts:
qml:
plugin: qml
digitalsign:
plugin: copy
mkdirs:
- bin
files:
digitalsign: bin/digitalsign
digitalsign.qml: digitalsign.qml
pic.jpg: pic.jpg
snappy-metadata: meta
rerunning snapcraft assemble will not pull in the new file, as it's skipping the build stage:
olli@joe-XPS-12-9Q33:~/code/snappy/digitalsign$ ../../qml/bin/snapcraft assemble
Skipping pull digitalsign (already ran)
Skipping build digitalsign (already ran)
Skipping stage digitalsign (already ran)
Snapping digitalsign
...
upon deleting ./snap/ ./parts/ ./stage/ the file is being pulled in:
...
Building digitalsign
cp --preserve=all -R digitalsign /home/olli/code/snappy/digitalsign/parts/digitalsign/install/bin/digitalsign
cp --preserve=all -R digitalsign.qml /home/olli/code/snappy/digitalsign/parts/digitalsign/install/digitalsign.qml
cp --preserve=all -R pic.jpg /home/olli/code/snappy/digitalsign/parts/digitalsign/install/pic.jpg
...
while not critical (workaround: delete files, start over) it's imho a bad experience as it can be expected that developers will iterate over the package quite frequently, rebuilding is taking longer time and thus not desirable
It appears that snapcraft was not realizing that it needs to rebuild everything when the snapcraft.yaml file changes. I.e. if the file changes we need to "dirty" all previous stages and run the equivalent of "--force" internally.