Is any of that patch necessary though? It can’t be reducing the binary size significantly, and is just one more thing you’re now on the hook for maintaining. The
homeishome-launch script also looks like it would be one or two lines if its functionality was inlined:
I get that you don’t want to be continually repeating yourself, but it’s worth considering whether the abstractions you’re introducing are actually making your life easier. If the boilerplate you need to add is of the same order as the boilerplate code you removed, then it’s not obvious the trade off is worth it.
Looking at your other use of
stage-snaps, I can see why you’d want to avoid copying that long
selective-checkout script into multiple projects. But it isn’t clear what benefit
stage-snaps gives you over simply having a part that references the git repo where you maintain the script as a source. That also makes it easier for someone reading your
snapcraft.yaml to understand what is going on.
That is probably true. But that also means you’ve introduced an ordering dependency for how you update your snaps. This might be workable if you are the only one who makes use of the snap, but what if other people do the same? How will you know when it is finally safe to upgrade this snap?