'snap list' with nothing installed should be more tasteful

Bug #1587445 reported by Mark Shuttleworth
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Medium
Unassigned
snapd (Ubuntu)
Fix Released
Medium
Unassigned
Xenial
Fix Released
Medium
Unassigned

Bug Description

'snap list' is nice and fast, thank you! On classic systems the first time you try it there may well be no snaps installed, and the output isn't very helpful:

  $ snap list
  Name Version Rev Developer
  $

Could we change it in this corner case to:

  $ snap list
  No snaps are installed yet. Try 'snap browse' or 'snap install hello'

We won't have 'snap browse' for a while but let's go ahead with the recommendation to install 'hello' till we do.

Thanks!
Mark

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

This used to be something like that but I think it was lost when we implemented the new listing output. It should be pretty simple to restore.

Changed in snappy:
status: New → Confirmed
Michael Vogt (mvo)
Changed in snappy:
status: Confirmed → Fix Committed
importance: Undecided → Medium
Revision history for this message
Gustavo Niemeyer (niemeyer) wrote :

What we fixed earlier was that it was an error message, and we transformed it into the usual output because an empty list is in general not an error.

It's okay to display a message instead of the header as well, but in that case it's not okay for that message to be on stdout, though. To be tool-friendly, the message must be on stderr, and the return code should remain be 0 because no snaps is not an erroneous case for a "list all" operation. The output on stdout can remain empty too.

As it is today, "if [ snap list | grep hello-world ]" will find something.

Can we please fix that?

Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Ah, great point! This is now addressed by https://github.com/snapcore/snapd/pull/1258

Let's land it when mvo says the master is open again.

Revision history for this message
Brian Murray (brian-murray) wrote :

This was fixed in yakkety, but the bug was missing an Ubuntu task.

snapd (2.0.6+16.10.1) yakkety; urgency=medium

  * New upstream release: LP: #1588052:
    - many: repository moved to snapcore/snapd
    - debian: add transitional pkg for the github location change
    - snap: ensure `snap try` work with relative paths
    - debian: drop run/build dependency on lsb-release
    - asserts/tool: gpg key pair manager
    - many: add new snap-exec
    - many: implement `snap refresh --list` and `snap refresh`
    - snap: add parsing support for hooks.
    - many: add the cups interface
    - interfaces: misc policy fixes (LP: #1583794)
    - many: add `snap try`
    - interfaces: allow using sysctl and scmp_sys_resolver for parsing
      kernel logs
    - debian: make snapd get its environ from /etc/environment
    - daemon,client,snap: revisions are now strings
    - interfaces: allow access to new ibus abstract socket path
      LP: #1580463
    - integration-tests: add remove tests
    - asserts: stronger crypto choices and follow better latest designs
    - snappy,daemon: hollow out more of snappy (either removing or not
      exporting stuff on its way out), snappy/gadget.go is gone
    - asserts: rename device-serial to serial
    - asserts: rename identity to account (and username access)
    - integration-tests: add changes tests
    - backend: add tests for environment wrapper generation
    - interfaces/builtin: add location-control interface
    - overlord/snapstate: move over check snap logic from snappy
    - release: use os-release instead of lsb-release for cross-distro
      use
    - asserts: allow empty snap-name for snap-declaration
    - interfaces/builtin,docs,snap: add the pulseaudio interface
    - many: add support for an environment map inside snap.yaml
    - overlord/snapstate: increase robustness of doLinkSnap/undoLinkSnap
      with sanity unit tests
    - snap: parse epoch property
    - snappy: do nothing in SetNextBoot when running on classic
    - snap: validate snap type
    - integration-tests: extend find command tests
    - asserts: extend tests to cover mandatory and empty headers
    - tests: stop the update-pot check in run-checks
    - snap: parse confinement property.
    - store: change applyUbuntuStoreHeaders to not take accept, and to
      take a channel
    - many: struct-based revisions, new representation
    - interfaces: remove 'audit deny' rules from network_control.go
    - interfaces: add com.canonical.UrlLauncher.XdgOpen to unity7
      interface
    - interfaces: firewall-control can access xtables lock file
    - interfaces: allow unity7 AppMenu
    - interfaces: allow unity7 launcher API
    - interfaces/builtin: add location-observe interface
    - snap: fixed snap empty list text LP: #1587445

Changed in snapd (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Mark, or anyone else affected,

Accepted snapd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/snapd/2.0.6 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in snapd (Ubuntu):
status: New → Fix Released
Mathew Hodson (mhodson)
Changed in snapd (Ubuntu):
importance: Undecided → Medium
Changed in snapd (Ubuntu Xenial):
importance: Undecided → Medium
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Mark, or anyone else affected,

Accepted snapd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/snapd/2.0.7 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Chris J Arges (arges) wrote :

Hello Mark, or anyone else affected,

Accepted snapd into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/snapd/2.0.8 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Federico Gimenez (fgimenez) wrote :

Verified with latest proposed:

fgimenez@fgimenez-Standard-PC-i440FX-PIIX-1996:~$ apt-cache policy snapd
snapd:
  Installed: 2.0.8
  Candidate: 2.0.8
  Version table:
 *** 2.0.8 500
        500 http://archive.ubuntu.com/ubuntu xenial-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     2.0.5 500
        500 http://es.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
     2.0.2 500
        500 http://es.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
fgimenez@fgimenez-Standard-PC-i440FX-PIIX-1996:~$ snap list
No snaps are installed yet. Try 'snap install hello-world'.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package snapd - 2.0.8

---------------
snapd (2.0.8) xenial; urgency=medium

  * New upstream release: LP: #1589534
    - debian: make `snap refresh` times more random (LP: #1537793)
    - cmd: ExecInCoreSnap looks in "core" snap first, and only in
      "ubuntu-core" snap if rev>125.
    - cmd/snap: have 'snap list' display helper message on stderr
      (LP: #1587445)
    - snap: make app names more restrictive.

 -- Michael Vogt <email address hidden> Wed, 08 Jun 2016 07:56:58 +0200

Changed in snapd (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote : Update Released

The verification of the Stable Release Update for snapd has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Michael Vogt (mvo)
Changed in snappy:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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