BUG. snapcraft clean my-part -s build: "no such option: -s"


#1

-s option does not work in of 3.5.1

Here is the help:
Options:
-s, --step [pull|build|stage|prime|strip]
only clean the specified step and those that
depend on it.
Example:
$ snapcraft clean my-part -s build
Error: no such option: -s

But --step works fine.
This issue broke all my scripts.


#2

This option was removed in snapcraft 3.0 for whenever the base keyword is used. Auto-rebuild takes place or you can clean the entire part.


#3

“snapcraft clean -h” still shows -s as a valid options


#4

What version of snapcraft are you using?


#5

Do I have an option to use particular version? It self updates every time through snapd without asking. And breaking current build scripts. Thanks to automatic updates that cannot be disabled.


#6

It’s snapcraft 3.8 / Ubuntu 18.04 (updated from 16.04 a couple of days ago). “-s” is still all over the place, I remember seeing many snapcraft diagnostic messages stating something like “…you need to run snapcraft clean -s prime…”


#7

Ok, this option is only available when not using a base in your snapcraft.yaml. Using the long option --step does work. I will add a fix for the short option now.

Thanks for the report.


#8

Here’s the PR