Same set of aliases in two snaps

We wonder whether two snaps can contain the same set of aliases? Background is that we want to rename a snap but found according to recent topics it is not supported yet. Therefore we are thinking of publishing another snap using the new name, with same content and aliases as the old snap.

If allowed, when users call the alias which snap will be referenced? If not allowed, appreciate any other possible solutions.

Any suggestion here? Appreciate it.

The store can generate the aliases for both snaps but snapd won’t allow you to install both snaps without fixing the aliasing manually first; either by using snap install mysnap --unaliased on whatever snap is installed second or by running snap unalias for every alias that conflicts prior to the install.

You can test the behaviour by making use of the parallel install feature and simply trying to install your snap twice. For parallel installs specifically there’s an open issue to make --unaliased implicit, but I can’t imagine this being made default generally.

If both snaps are installed side by side, you can swap their aliases in entireity by just running snap alias prefer mysnap

Thanks for the information. If we publish another snap with the same set of aliases, do we need to make a separate request for these aliases like what we did for the existing snap?

Yes, applying aliases is always done by the store administrators so you’d have to request it again. You can link to the previous request though to help your case, although it’s unfortunate to be in this situation and it might help to explain what migration strategy you have for getting users off of the old snap and onto the new one, assuming you have one at all.