Saturday, June 26, 2010

» Even shorter openSUSE repository URLs

Shorter URLs to repositories

As I wrote not too long ago, I hacked a very small and simple but still useful trick to simplify and shorten URLs to openSUSE Build Service repositories. e.g.:
instead of

Even shorter

There is now an even shorter variant, using
instead of
(instead of the full fledged URL as above). Trivial? yes. Useful? I think so :) (e.g. to give links on IRC, or on For some examples, see

Beyond the short URLs

Note that you may also expand beyond that URL to reach files/directories below those, e.g.:

11.2 is openSUSE_11.2

As you surely have noted, 11.2 isn't the correct subdirectory there (it's actually openSUSE_11.2). Well, I also added the expansion of 11.0, 11.1, 11.2, 11.3, etc... at that position in the URL to openSUSE_11.0, etc... respectively (well, actually it's a regex ;)).

f is openSUSE_Factory

To redirect to openSUSE_Factory instead, just use f, e.g.:

Short URLs to .repo files

And here I'm so lazy it's getting creepy. What we usually want to link to (typically to give people a repository to add) is the .repo file.
redirects to Same for Factory, of course, e.g.

Add zypper to the mix

Now, given all that, if you want to tell someone to add e.g. the server:monitoring repository, just tell her to do this:
zypper ar -r

The impossible

What would be even nicer is to avoid having to put the openSUSE version in the URL, but unfortunately zypper doesn't the version of the openSUSE it's running on in the HTTP request headers, which means I simply cannot automagically redirect to the right subdirectory based on that, as I don't have any way to know which openSUSE version the client has.



Blogger Unknown said...

how about a one-click add repo button?


Post a Comment

<< Home