openSUSE One-Click-Install Gateway

This site (i.opensu.se) provides a simple but potentially useful service by redirecting short URLs to the openSUSE package repositories on download.opensuse.org and Packman, e.g. for using in identi.ca/twitter posts or on IRC instead of (albeit even shorter) generic URL shortening services.

Additionally, it generates One-Click-Install files (also known as YMP files), which when opened in a browser (e.g. Firefox), cause the Graphical User Interface of YaST2 to be opened, prompting the user to add a repository and potentially also installing a package.

The idea here is to make it easier to support users by giving them a simple and short link that they just need to open in order to be guided to add a package repository and install a package.

As an example, it is much simpler to give this to someone: http://i.opensu.se/utilities/atool rather than to give her instructions on how to start YaST2, find the appropriate icon to add repositories, add the http://download.opensuse.org/repositories/utilities repository, leave that screen and then click another icon to install the package atool.

How to use

The usage is quite simple, as the URL is composed of two parts:
http://i.opensu.se/repository/package

repository
this is the name of the repository, as found under http://download.pensuse.org/repositories/ or in the openSUSE Build Service
package
the name of the package (in that repository) to install -- note that specifying a package is optional: if you leave that part out of the URL (e.g. http://i.opensu.se/utilities), YaST will only propose to add the repository, without installing any package

There is one tiny special trick on the repository name: if you use packman as the repository name, it will add the Packman repository.

Some repositories on the openSUSE Build Service are deeply nested, using : to separate them in their hierarchy. One example would be devel:tools:scm:svn.
Albeit the URLs on download.opensuse.org/repositories separate the individual levels of such hierarchies with :/ instead of just :, do not do so when invoking this site.

For the example above, simply use the following URL: http://i.opensu.se/devel:tools:scm:svn -- or, if you also want to install a package, e.g. subversion, like this: http://i.opensu.se/devel:tools:scm:svn/subversion.

How it works

What this service actually does is to parse the requested repository (and optionally a requested package too) and set off an HTTP request on the corresponding URL on download.opensuse.org/repositories in order to discover which repositories are available, for which openSUSE and SLE versions.

From that information, it will generate a One-Click-Install XML file and serve it back.

Obviously, if the repository does not exist, it will serve back a 404 error.

Source code

The source code is currently in my git repository at gitorious.