snap install with duplicated snap names gives confusing errors
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd |
Confirmed
|
Medium
|
Unassigned |
Bug Description
If same snap name is passed to snap install by mistake, it gives confusing errors, e.g.
$ sudo snap install hello-world hello-world
error: cannot perform the following tasks:
- Download snap "hello-world" (29) from channel "stable" (rename /var/lib/
It actually succeeds with the installation and just errors out on the 2nd snap.
Now, while having hello-world installed, doing it again with two same snap names produces:
$ sudo snap install hello-world hello-world hello-world
error: cannot install "hello-world", "hello-world", "hello-world": no install/refresh information
results from the store
while it behaves ok with just one name:
$ sudo snap install hello-world
snap "hello-world" is already installed, see 'snap help refresh'
Changed in snapd: | |
importance: | Undecided → Medium |
status: | New → Confirmed |
In the same vain, 'snap remove hello-world hello-world' removes the snap but gives funny error because of the duplication:
$ sudo snap remove hello-world hello-world world/29/ meta/snap. yaml)
error: cannot perform the following tasks:
- Stop snap "hello-world" services (snap has no current revision)
- Remove security profile for snap "hello-world" (29) (cannot find installed snap "hello-world" at revision 29: missing file /snap/hello-
- Remove data for snap "hello-world" (29) (snap "hello-world" is not installed)