snapcraft does not recognize -s flag, only --step, while help says otherwise

Bug #1834628 reported by Alfonso Sanchez-Beato
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snapcraft
Fix Released
Medium
Sergio Schvezov

Bug Description

Snacraft help shows '-s step' as valid, but accepts only '--step':

$ snapcraft clean --help
Usage: snapcraft help [OPTIONS] <part>...

  Remove content - cleans downloads, builds or install artifacts.

  Examples:
      snapcraft clean
      snapcraft clean my-part --step build

Options:
  -s, --step [pull|build|stage|prime|strip]
                                  only clean the specified step and those that
                                  depend on it.
  --help Show this message and exit.
$ snapcraft clean kernel -s build
Error: no such option: -s
$ snapcraft clean kernel --step build
Cleaning build step (and all subsequent steps) for kernel
Cleaning up priming area
Cleaning up staging area

Either the help text needs to be updated or '-s' put back. Note also that this snapcraft.yaml was not using the 'base' yaml key: https://github.com/taiten/nitrogen6x-kernel-snap/blob/master/snapcraft.yaml

summary: - snapcraft does recognize -s flag, only --step, while helps says
+ snapcraft does not recognize -s flag, only --step, while help says
otherwise
Revision history for this message
Alfonso Sanchez-Beato (alfonsosanchezbeato) wrote :

It is also really confusing when snapcraft suggests to use a command that is not working anymore:

$ snapcraft --target-arch=armhf
Setting target machine to 'armhf'
This snapcraft project does not specify the base keyword, explicitly setting the base keyword enables the latest snapcraft features.
This project is best built on 'Ubuntu 16.04', but is building on a 'Ubuntu 18.04' host.
Read more about bases at https://docs.snapcraft.io/t/base-snaps/11198
Cross compiling kernel target 'arm'
Failed to reuse files from previous run: The 'pull' step of 'kernel' is out of date:
The 'deb_arch' project option appears to have changed.
To continue, clean that part's 'pull' step by running `snapcraft clean kernel -s pull`.

$ snapcraft clean kernel -s pull
Error: no such option: -s

description: updated
Revision history for this message
Sergio Schvezov (sergiusens) wrote :
Changed in snapcraft:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Sergio Schvezov (sergiusens)
Changed in snapcraft:
status: In Progress → Fix Committed
Changed in snapcraft:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.