Should this code go in a new recipe for java cookbook or into default.rb?

I have written a new recipe for installing java from the rpm provided by
oracle. It assumes that you have a private repository where you have placed
the rpm

Should I try to put this in the java::sun recipe or a new recipe?

java::oracle-yum recipe

package ‘jdk’ do
action :install
end

ruby_block “update_alternatives” do
block do
jdk_home = %x[ rpm -qi jdk | grep ‘Relocations:’ ].split(/\s/)[-1] +
"/default"
%x[ update-alternatives --install /usr/bin/java java
#{jdk_home}/bin/java 1 ]
%x[ update-alternatives --set java #{jdk_home}/bin/java ]
end
end

On Nov 23, 2011 11:48 PM, "Bryan Berry" bryan.berry@gmail.com wrote:

I have written a new recipe for installing java from the rpm provided by
oracle. It assumes that you have a private repository where you have placed
the rpm

Should I try to put this in the java::sun recipe or a new recipe?

I would think keeping it in one cookbook with a source attribute and a case
statement would be best, since Java typically comes from so many places.

Bryan