On Thu, 2015-02-26 at 15:46 +0100, Mikolaj Izdebski wrote: > On 02/26/2015 02:46 PM, Jiri Vanek wrote: > > On 02/26/2015 10:13 AM, Mikolaj Izdebski wrote: > >> On 02/26/2015 09:23 AM, Jiri Vanek wrote: > >>> On 02/26/2015 09:20 AM, Mikolaj Izdebski wrote: > >>>> On 02/26/2015 08:42 AM, Jiri Vanek wrote: > >>>>>>> Also, my proposal of introducing "java" metapackage (see my other > >>>>>>> post > >>>>>>> in this thread), which would always require the latest JDK, solves > >>>>>>> this > >>>>>>> problem in a different way, without modifying ordinary Java packages > >>>>>>> at all. > >>>>>>> > >>>>> > >>>>> May you be more exact with the metapackage? Before I come up with > >>>>> legacy, I hoped to solve the issues via some metapackage. At the end I > >>>>> gave up, because the touch of user was always necessary. > >>>> > >>>> I described it in much detail in other posts in this thread > >>>> (for example message-ID 54ECA102.1070506@xxxxxxxxxx) > >>>> > >>> > >>> Yah. Sorry. I walked across it later then replied this. > >>> > >>> However - I'm not convinced that metapackage will work as expected. If > > > > Still the metapackge's correct dependence have to be someones > > responsibility. Will you be able to take this burden? > > Sure, I can create and maintain metapackage. (In this case it would > probably be subpackage of javapackages-tools.) > > >>> nothing else it will need some changes in current infrastructure which I > >>> wonted to avoid. > >> > >> It works exactly how I described it. Old JDK won't be removed during > > > > Is it really wonted? If so, we can skip the "option one" and continue > > with with option two. > > If you really think that old JDK should be removed during update and > insist on that then there is still a way to achieve that with versioned > obsoletes. Metapackage would Obsolete: java-1.N.0-openjdk* < e:v-(r+1), > where e:v-r is the latest evr of java-1.N.0-openjdk* when JDK N was > considered as "main JDK". I've just tested it and it works, see below. > > > Lets start with JDK 7 installed. > > sh-4.3# rpm -qa | grep java > java-1.7.0-1.fc23.x86_64 > java-1.7.0-openjdk-1.7.0-1.fc23.x86_64 > > > Update installs JDK 8 and erases JDK 7. > > sh-4.3# dnf -y update > Using metadata from Thu Feb 26 15:37:47 2015 > Dependencies resolved. > Nothing to do. > sh-4.3# rm -rf /var/cache/dnf/ > sh-4.3# rm -rf rpm > sh-4.3# dnf -y update > rpm 966 kB/s | 1.3 kB 00:00 > Using metadata from Thu Feb 26 15:38:06 2015 > Dependencies resolved. > ================================================================ > Package Arch Version Repository > Size > ================================================================ > Installing: > java-1.8.0-openjdk x86_64 666:1.8.0-1.fc23 rpm 5.6 k > Upgrading: > java x86_64 666:1.8.0-1.fc23 rpm 5.7 k > replacing java-1.7.0-openjdk.x86_64 666:1.7.0-1.fc23 > > Transaction Summary > ================================================================ > Install 1 Package > Upgrade 1 Package > > Total size: 11 k > Downloading Packages: > Running transaction check > Transaction check succeeded. > Running transaction test > Transaction test succeeded. > Running transaction > Installing : java-1.8.0-openjdk-666:1.8.0-1.fc23.x86_6 1/4 > Upgrading : java-666:1.8.0-1.fc23.x86_64 2/4 > Cleanup : java-666:1.7.0-1.fc23.x86_64 3/4 > Obsoleting : java-1.7.0-openjdk-666:1.7.0-1.fc23.x86_6 4/4 > Verifying : java-1.8.0-openjdk-666:1.8.0-1.fc23.x86_6 1/4 > Verifying : java-666:1.8.0-1.fc23.x86_64 2/4 > Verifying : java-666:1.7.0-1.fc23.x86_64 3/4 > Verifying : java-1.7.0-openjdk-666:1.7.0-1.fc23.x86_6 4/4 > > Installed: > java-1.8.0-openjdk.x86_64 666:1.8.0-1.fc23 > > Upgraded: > java.x86_64 666:1.8.0-1.fc23 > > Complete! > > > After update only JDK 8 is installed: > > sh-4.3# rpm -qa | grep java > java-1.8.0-openjdk-1.8.0-1.fc23.x86_64 > java-1.8.0-1.fc23.x86_64 > > > But user can still install JDK 7: > > sh-4.3# dnf install -y java-1.7.0-openjdk > Using metadata from Thu Feb 26 15:38:06 2015 > Dependencies resolved. > ================================================================ > Package Arch Version Repository > Size > ================================================================ > Installing: > java-1.7.0-openjdk x86_64 666:1.7.0-2.fc23 rpm 5.7 k > > Transaction Summary > ================================================================ > Install 1 Package > > Total size: 5.7 k > Installed size: 0 > Downloading Packages: > Running transaction check > Transaction check succeeded. > Running transaction test > Transaction test succeeded. > Running transaction > Installing : java-1.7.0-openjdk-666:1.7.0-2.fc23.x86_6 1/1 > Verifying : java-1.7.0-openjdk-666:1.7.0-2.fc23.x86_6 1/1 > > Installed: > java-1.7.0-openjdk.x86_64 666:1.7.0-2.fc23 > > Complete! > > > JDK 7 and 8 can coexist without any problem: > > sh-4.3# rpm -qa | grep java > java-1.8.0-openjdk-1.8.0-1.fc23.x86_64 > java-1.7.0-openjdk-1.7.0-2.fc23.x86_64 > java-1.8.0-1.fc23.x86_64 I very much like this approach! Cheers, Severin -- devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxxx https://admin.fedoraproject.org/mailman/listinfo/devel Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct