Better alternatives [Was: OpenJDK packaging bug in Fedora 19]

Fernando Lozano fernando at lozano.eti.br
Thu Jul 11 18:04:14 UTC 2013


Hi,
>>> I think I will abandon whole update alternatives process and come
>>> with direct remove/add as this is not firs time when alternatives
>>> behaved .. as they do. But  until now it was always catch in time.
>> Please don't drop alternatives from OpenJDK. ;-)
> It's a really messy way to get the wanted result (swapable java stacks). I
> think we can do better. (...)
>
> I always find
>
>   $ rpm -qf `which java`
>   file /usr/bin/java is not owned by any package
>
> to be very frustrating.

We need a better which, that follow symlinks ? ;-)

I guess here the problem is with RPM.  It won't allow the same file 
being owned by multipla packages.

Pardon if I'm talking about something you've already tried.

If you package a set of alternative configs as their own package, and 
make other Java packages depends on it? If I understand alternatives, it 
relies on symlinks that point to other symlinks. So the "top level" 
symlinks, like /usr/bin/java and /etc/alternatives/java, would be part 
of that java-alternatives package. Them the symlinks that point to real 
binaries would be owned by the specific jre or jdk package.

As anyone could install alternatives-java per se, it would have a dummy 
script that echoes "no default java selected" and exit an error code.

Am I being to simplicist?


[]s, Fernando Lozano



More information about the users mailing list