pull, build and other commands should be idemnpotent
Bug #1595964 reported by
Didier Roche-Tolomelli
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snapcraft |
New
|
Undecided
|
Unassigned |
Bug Description
The fact that for instance "build()" would erase and redeploy a new build directory is an issue when inheriting and inserting hooks in plugin.
Here is an example of the trick needed due to this bug: https:/
Technically one could argue that it is idempotent. Running it twice does not result in different things: build(build(x)) == build(x).
However, I see the complication you're encountering when trying to extend a plugin; I've run into the same issues myself. The reason the build directory is removed at the beginning of the build step is in the case of a previously failed build. We're working toward being able to resume such builds, but it requires some other things to happen first.