Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 98332 Details for
Bug 148632
java-nsplugin eselect module should include support for users being able to select java plugin(s)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch to add user level nsplugin support to eselect
user_level_plugin_support.patch (text/plain), 5.60 KB, created by
Alistair Bush (RETIRED)
on 2006-09-28 13:29:32 UTC
(
hide
)
Description:
patch to add user level nsplugin support to eselect
Filename:
MIME Type:
Creator:
Alistair Bush (RETIRED)
Created:
2006-09-28 13:29:32 UTC
Size:
5.60 KB
patch
obsolete
>--- /usr/share/eselect/modules/java-nsplugin-old.eselect 2006-09-23 03:59:31.000000000 +1200 >+++ java-nsplugin.eselect 2006-09-28 09:40:06.000000000 +1200 >@@ -18,6 +18,13 @@ > SYSTEM_PLUGIN_32="${SYSTEM_PLUGIN_DIR_32}/javaplugin.so" > SYSTEM_PLUGIN_64="${SYSTEM_PLUGIN_DIR_64}/javaplugin.so" > >+#alistairs magic >+USER_MOZILLA_DIR="${HOME}/.mozilla" >+USER_PLUGIN_DIR="${USER_MOZILLA_DIR}/plugins" >+USER_PLUGIN="${USER_PLUGIN_DIR}/javaplugin.so" >+USER_PLUGIN_32="${USER_PLUGIN_DIR}/javaplugin-32.so" >+USER_PLUGIN_64="${USER_PLUGIN_DIR}/javaplugin-64.so" >+ > libdirs=$(list_libdirs) > if has lib32 ${libdirs} && has lib64 ${libdirs}; then > IS_MULTILIB="true" >@@ -40,6 +47,14 @@ > else > write_kv_list_entry "${system_name}" "" > fi >+ >+ local user_name=$(get_user_plugin_vm) >+ write_list_start "Current Java browser plugin" >+ if [[ -z "${user_name}" ]] ; then >+ write_kv_list_entry "(unset)" "" >+ else >+ write_kv_list_entry "${user_name}" "" >+ fi > } > > ## }}} >@@ -63,6 +78,16 @@ > echo "${vm} ${mark}" > } > >+ tweak_user_list_item() { >+ local vm=${1} >+ local user_name=${2} >+ local mark="" >+ if [[ ${vm} == ${user_name} ]]; then >+ mark="${mark} $(highlight 'current')" >+ fi >+ echo "${vm} ${mark}" >+ } >+ > tweak_list() { > local targets=( ${@} ) > system_name=$(get_system_plugin_vm) >@@ -81,7 +106,17 @@ > targets[${i}]=$(tweak_list_item ${targets[${i}]} ${system_name}) > done > >- write_list_start "Available Java browser plugins" >+ write_list_start "Available System Java browser plugins" >+ write_numbered_list "${targets[@]}" >+ >+ #"User mode" >+ local user_name=$(get_user_plugin_vm) >+ targets=( $(get_targets) ) >+ for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do >+ targets[${i}]=$(tweak_list_item ${targets[${i}]} ${user_name}) >+ done >+ >+ write_list_start "Avaliable User Java browser plugins" > write_numbered_list "${targets[@]}" > else > MULTILIB_MODE="32" >@@ -90,8 +125,17 @@ > for (( i = 0 ; i < ${#targets_32[@]} ; i = i + 1 )) ; do > targets_32[${i}]=$(tweak_list_item ${targets_32[${i}]} ${system_name_32}) > done >- write_list_start "Available 32-bit Java browser plugins" >+ write_list_start "Available 32-bit System Java browser plugins" > write_numbered_list "${targets_32[@]}" >+ >+ #USER MODE >+ local user_name_32=$(get_user_plugin_vm) >+ targets_32=( $(get_targets) ) >+ for (( i = 0 ; i < ${#targets_32[@]} ; i = i + 1 )) ; do >+ targets_32[${i}]=$(tweak_user_list_item ${targets_32[${i}]} ${user_name_32}) >+ done >+ write_list_start "Available 32-bit User Java Browser plugins" >+ write_numbered_list "${targets_32[@]}" > > MULTILIB_MODE="64" > local system_name_64=$(get_system_plugin_vm) >@@ -101,6 +145,16 @@ > done > write_list_start "Available 64-bit Java browser plugins" > write_numbered_list "${targets_64[@]}" >+ >+ #"User MODE" >+ local user_name_64=$(get_user_plugin_vm) >+ targets_64=( $(get_targets) ) >+ for (( i = 0 ; i < ${#targets_64[@]} ; i = i +1 )) ; do >+ targets_64[${i}]=$(tweak_user_list_item ${targets_64[${i}]} ${user_name_64}) >+ done >+ write_list_start "Available 64-bit User Java Browser plugins" >+ write_numbered_list "${targets_64[@]}" >+ > fi > } > ## }}} >@@ -158,13 +212,73 @@ > 64) system_plugin=${SYSTEM_PLUGIN_64} ;; > none) system_plugin=${SYSTEM_PLUGIN} ;; > esac >- mkdir -p $(dirname ${system_plugin}) || die -q "Error creating \"$(dirname ${SYSTEM_PLUGIN})\"" >+ mkdir -p $(dirname ${system_plugin}) || die -q "Error creating >+ \"$(dirname ${US_PLUGIN})\"" > if [[ -w $(dirname ${system_plugin}) ]] ; then > ln -sf ${plugin} ${system_plugin} || die -q "Error creating nsplugin symlink" > else >- die -q "Sorry, you don't have enough permission to set nsplugin" >+ die -q "Sorry, you don't have enough permission to set the system nsplugin" > fi > } >+ >+ describe_setuser() { >+ echo "Set the user nsbrower plugin" >+ } >+ >+ do_setuser() { >+ if [[ ${IS_MULTILIB} != "true" ]]; then >+ if [[ ${#} != 1 ]] ; then >+ die -q "Usage: set [nsplugin-vm]" >+ fi >+ MULTILIB_MODE="none" >+ else >+ if [[ ${#} != 2 ]] ; then >+ die -q "Usage: set [32bit or 64bit] [nsplugin-vm]" >+ fi >+ case ${1} in >+ 32bit) ;; >+ 64bit) ;; >+ *) >+ die -q "Usage: set [32bit or 64bit] [nsplugin-vm]" >+ ;; >+ esac >+ MULTILIB_MODE=${1%bit} >+ shift >+ fi >+ >+ local vm=${1} >+ >+ if is_number "${vm}" ; then >+ local targets=( $(get_targets) ) >+ vm=${targets[$(( ${vm} - 1 ))]} >+ fi >+ >+ if [[ -z ${vm} ]] ; then >+ die -q "You didn't specify valid plugin number to set" >+ fi >+ >+ local plugin="${PLUGINS_HOME}/${vm}-javaplugin.so" >+ >+ if [[ ! -f ${plugin} ]]; then >+ write_error_msg "Expected \"${plugin}\" to exist, but it doesn't" >+ write_error_msg "Perhaps \"${vm}\" isn't a valid name of VM build with nsplugin?" >+ return >+ fi >+ >+ local user_plugin >+ case ${MULTILIB_MODE} in >+ 32) user_plugin=${USER_PLUGIN_32} ;; >+ 64) user_plugin=${USER_PLUGIN_64} ;; >+ none) user_plugin="${USER_PLUGIN}" ;; >+ esac >+ mkdir -p $(dirname ${user_plugin}) || die -q "Error creating \"$(dirname ${USER_PLUGIN})\"" >+ if [[ -w $(dirname ${user_plugin}) ]] ; then >+ ln -sf ${plugin} ${user_plugin} || die -q "Error creating nsplugin symlink" >+ else >+ die -q "Sorry, you don't have enough permissions to set this users nsplugin" >+ fi >+ } >+ > ## }}} > > get_targets() { >@@ -205,4 +319,17 @@ > plugin_to_vm ${plugin} > } > >+get_user_plugin_vm() { >+ local plugin; >+ >+ if [[ ${MULTILIB_MODE} == "32" ]]; then >+ plugin=$(readlink ${USER_PLUGIN_32}) >+ elif [[ ${MULTILIB_MODE} == "64" ]]; then >+ plugin=$(readlink ${USER_PLUGIN_64}) >+ else >+ plugin=$(readlink ${USER_PLUGIN}) >+ fi >+ plugin_to_vm ${plugin} >+} >+ > # vim: ts=4 sw=4 noet fdm=marker
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 148632
:
97736
| 98332