Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the problem that packages can't be installed when snap has no installed packages. #60743

Open
wants to merge 2 commits into
base: devel
from

Conversation

@FGtatsuro
Copy link

commented Aug 18, 2019

SUMMARY

Fixes #59868

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME
  • snap
ADDITIONAL INFORMATION

On debian 9(maybe older versions), snap list <package>, which command is used to check whether <package> is installed, returns status 0 when snap has no installed packages.

root@stretch:~# cat /etc/debian_version
9.9

root@stretch:~# snap list hello-world > /dev/null
No snaps are installed yet. Try "snap install hello-world".
root@stretch:~# snap list hello-world 2> /dev/null

root@stretch:~# snap list hello-world
No snaps are installed yet. Try "snap install hello-world".
root@stretch:~# echo $?
0

On debian 10, this problem isn't reproduced because snap list <package> returns status 1 even if
snap has no installed packages.

root@buster:~# cat /etc/debian_version
10.0

root@buster:~# snap list hello-world > /dev/null
error: no matching snaps installed
root@buster:~# snap list hello-world 2> /dev/null

root@buster:~# snap list hello-world
error: no matching snaps installed
root@buster:~# echo $?
1
FGtatsuro added 2 commits Aug 18, 2019
Fix the problem that packages can't be installed when snap has no ins…
…talled packages.

On several Debian version, `snap list <package>` returns status 0.
This causes that packages can't be installed after snapd is newly installed.
@ansibot

This comment has been minimized.

Copy link
Contributor

commented Aug 18, 2019

@ansibot ansibot removed the needs_triage label Aug 18, 2019

@ansibot ansibot added the stale_ci label Aug 30, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.