confusing behaviour using the root of the repo as source
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
The new default for snapcraft will be to have the snapcraft.yaml in the snap directory.
That seems like a nice feature, and some people don't want to add the yaml to their root, so they will be happy for sure.
However, we have the common practice of using . as the source. Now, the meaning of . is confusing.
Lets say I have my snapcraft project in /home/elopio/
If I put the snapcraft.yaml in /home/elopio/
If I put the snapcraft.yaml in /home/elopio/
And there's also a not-so-uncommon practice of putting the snapcraft.yaml in a subdirectory, and run snapcraft from that subdir.
If I put the snapcraft.yaml in /home/elopio/
If I put the snapcraft.yaml in /home/elopio/
I'm not really sure what to do about this, or even if we have to do anything about this. I'm open this bug for discussion.
Maybe, we could use a variable for cwd, the directory where snapcraft is called from.
That way we could have /home/elopio/ project/ snap/snapcraft. yaml with source: $SNAPCRAFT_ROOT project/ packaging/ snap/snapcraft. yaml with source: $SNAPCRAFT_ROOT/..
and /home/elopio/
However, I don't think $SNAPCRAFT_ROOT is the perfect name.