Reserved project names and cooperative transfer of ownership

Michael Hall mhall119 at ubuntu.com
Mon Mar 27 02:46:53 UTC 2017


On 03/25/2017 06:53 AM, Joseph Rushton Wakeling wrote:
> ... yes, more questions :-)
> 
> First, how problematic is it to organize a cooperative transfer of
> ownership of a reserved name between one snap publisher and another? 
> I'm thinking of a case where a package might start as a 3rd-party
> project (read: yours truly) and then be made official later.
> 
> I know the recommended practice is to define a different name, like
> `appname-whatever`, but I'm wondering what the options and difficulties
> might be if that wasn't wanted.
> 

IIRC, it's a manual process still, so it's not really problematic but it
won't scale well if it becomes a very common occurrence. For now though,
as long as you have the original developer's blessing to use the package
name, you should be good to go ahead. We will hopefully have a more
scalable solution in place before it becomes a burden on us.

> Second, we discussed a while back about the possibility of reserving
> names for multiple apps provided by a single snap, so that instead of
> `snapname.appname` being the exposed command, it could just be
> `appname`.  Even if that's not technically possible right now, is it
> possible to reserve those names ahead of time in anticipation of that
> change ... ?
> 

Good news, that's already there! In each appname section in your "apps:"
definitions you can add a property names "aliases" that takes a yaml
list of names you want to use. For example:

name: snapname
apps:
   appname:
        command: foo
        aliases: [bar]

By default this will give you /snap/bin/snapname.appname

But then if you run the command: "snap alias mysnap bar" you will get
/snap/bin/bar which you can invoke with just "bar" from the commandline.
Instead of "bar" you can use "appname" or anything else you want to make
an alias for that app.

This still requires a manual step after installing your snap to enable
the alias, but we're working out a process to allow it to be
auto-enabled, which I'm sure will be announced on this list once it's
available.

Michael Hall
mhall119 at ubuntu.com




More information about the Snapcraft mailing list