Ubuntu 21.04 snap 2.50.1:
sudo snap set system experimental.parallel-instances=true sudo snap install hello-world hello-world_foo
works fine (I wish the parallel setting wasn’t required though, otherwise fails, but not the main point of this thread).
But then if I re-run:
sudo snap install hello-world hello-world_foo
it fails with:
error: cannot install "hello-world", "hello-world_foo": no install/refresh information results from the store
and exit status 1.
Idempotency would be really useful while I develop my setup scripts, of which snap is just one step, so I can just re-run install multiple times without checking to skip.
This problem only happens if I run the command with two or more pre-installed packages, re-running:
sudo snap install hello-world
fails gracefully with status 0 as desired:
snap "hello-world" is already installed, see 'snap help refresh'