No warning/error when removing dependency

Bug #1664445 reported by Michi Henning
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Our thumbnailer snap uses ubuntu-app-platform. With the thumbnailer snap installed and connected, I can remove ubuntu-app-platform without any problems whatsoever:

$ sudo snap remove ubuntu-app-platform
ubuntu-app-platform removed
$

That doesn't look like a good idea to me because I may not know that there are other snaps that I have just broken by mistake.

I do find out that I've done something wrong once I try to run our service:

$ thumbnailer.thumbnailer-service &
[2] 10587
michi@djembefola:~/src/thumbnailer/gstreamer-plugins$ You need to connect the ubuntu-app-platform package with your application
to reuse shared assets, please run:
snap install ubuntu-app-platform
snap connect thumbnailer:platform ubuntu-app-platform:platform

[2]- Exit 1 thumbnailer.thumbnailer-service

That's a nice error message, and it is very clear. But, unfortunately, it's too late. I might remove a snap and then not find out for weeks that I've broken something else...

I think I should get an error when I try to remove a snap that other snaps depend on. Maybe, if I want to insist on breaking things, a --force option could be used to let me live dangerously.

But, overall, I think it would be best to have something similar to apt, which tells me that, if I want to remove X, it'll also remove Y, Z if they depend on X.

Revision history for this message
Michi Henning (michihenning) wrote :

I just noticed that I can also install thumbnailer without ubuntu-app-platform being installed first. There is no error, even though there is no way that thumbnailer will work that way.

It seems that installing a snap should automatically install all the snaps it depends on. Without this, I only find out at run time when my service fails to start that a dependency is missing.

Changed in snapd (Ubuntu):
status: New → Confirmed
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.