Skip to content

Commit

Permalink
Merge branch 'hotfix/1.25.1' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
mpapis committed Dec 20, 2013
2 parents 760efc5 + f72e879 commit eb919b5
Show file tree
Hide file tree
Showing 30 changed files with 112 additions and 153 deletions.
2 changes: 1 addition & 1 deletion VERSION
@@ -1 +1 @@
1.25.0
1.25.1
5 changes: 3 additions & 2 deletions gemsets/ruby/1.8.5/global.gems
@@ -1,2 +1,3 @@


gem-wrappers
rubygems-bundler
rvm
5 changes: 3 additions & 2 deletions gemsets/ruby/1.8.6/global.gems
@@ -1,2 +1,3 @@


gem-wrappers
rubygems-bundler
rvm
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions patchsets/ruby/2.0.0/redhat
@@ -0,0 +1 @@
ssl_no_ec2m
2 changes: 1 addition & 1 deletion rvm-test
Submodule rvm-test updated from 0a2c7a to f35a5f
48 changes: 7 additions & 41 deletions scripts/alias
Expand Up @@ -52,25 +52,19 @@ alias_after_delete_default()
{
rvm_log "Deleting default links/files"

for _path in $rvm_bin_path/default_*
for _path in "$rvm_bin_path"/default_*
do
# remove default_ruby
[[ -f "$_path" ]] && \rm -rf ${_path}
[[ -f "$_path" ]] && \rm -rf "${_path}"
# remove ruby
_path=${_path#default_}
[[ -f "$_path" ]] && \rm -rf ${_path}
_path="${_path#default_}"
[[ -f "$_path" ]] && \rm -rf "${_path}"
done

for wrapper in "$rvm_path"/wrappers/default/* gem irb erb ri rdoc testrb rake ruby bundle
for _path in "$rvm_path"/wrappers/default/* gem irb erb ri rdoc testrb rake ruby bundle
do
wrapper="${wrapper##*\/}"
\rm -f "$rvm_bin_path/${wrapper}"

# If the RVM bin path is different from rvm_path/bin, ensure they are
# in sync.
if [[ "${rvm_bin_path}" != "${rvm_path}/bin" ]]
then \rm -f "${rvm_path}/bin/${wrapper}"
fi
_path="${_path##*\/}"
\rm -f "$rvm_bin_path/${_path}"
done
}

Expand All @@ -97,37 +91,9 @@ alias_after_create_default()

environment_id="${final_environment_identifier}"

if (( ${rvm_user_install_flag:=0} == 0 ))
then
# Sets up the default wrappers.
"$rvm_scripts_path/wrapper" "$rvm_ruby_string" --no-prefix
else
"$rvm_scripts_path/wrapper" "$rvm_ruby_string" "default"
fi

RUBY_VERSION="$("$rvm_ruby_home/bin/ruby" -v | __rvm_sed 's#^\(.*\) (.*$#\1#')"

export GEM_HOME GEM_PATH MY_RUBY_HOME RUBY_VERSION

# Copy wrapper scripts for the newly set default to the RVM bin path.
for wrapper in "$rvm_path"/wrappers/default/*
do
[[ -r "${wrapper}" ]] || continue

if [[ -L "$rvm_bin_path/${wrapper##*\/}" ]]
then
\rm -f "$rvm_bin_path/${wrapper##*\/}"
fi

__rvm_cp -f "$wrapper" "$rvm_bin_path/${wrapper##*\/}"

# If the RVM bin path is different from rvm_path/bin, ensure they are
# in sync.
if [[ "${rvm_bin_path}" != "${rvm_path}/bin" ]]
then
__rvm_cp -f "${wrapper}" "${rvm_path}/bin/"
fi
done
}

alias_create()
Expand Down
9 changes: 8 additions & 1 deletion scripts/cleanup
Expand Up @@ -19,10 +19,17 @@ For gemsets removes remove only those without matching ruby.
return 0
}

chmod_unless_link()
{
if [[ -e "$1" && ! -L "$1" ]]
then chmod -R u+w "$1" || return $?
fi
}

remove_or_log()
{
(( rvm_verbose_flag == 0 )) || rvm_log " - removing - $1"
chmod -R u+w "$1" &&
chmod_unless_link "$1" &&
__rvm_rm_rf "$1" ||
{
: $(( failed_counter+=1 ))
Expand Down
9 changes: 2 additions & 7 deletions scripts/cli
Expand Up @@ -893,14 +893,9 @@ rvm()
do)
old_rvm_ruby_string=${rvm_ruby_string:-}
unset rvm_ruby_string
export rvm_ruby_strings
export rvm_ruby_strings rvm_in_flag

(
if [[ -n "${rvm_in_flag}" && -d "${rvm_in_flag}" ]]
then __rvm_cd "${rvm_in_flag}"
fi
"$rvm_scripts_path/set" "$rvm_action" "${rvm_ruby_args[@]}"
)
"$rvm_scripts_path/set" "$rvm_action" "${rvm_ruby_args[@]}"
result=$?

# Restore the state pre-sets.
Expand Down
3 changes: 2 additions & 1 deletion scripts/external
Expand Up @@ -504,7 +504,8 @@ external_import_validate_binary()
__rvm_fix_wrappers()
{
typeset actual_file
__rvm_find "$rvm_rubies_path/$rvm_ruby_string/bin/" -type f | while read actual_file
__rvm_find "$rvm_rubies_path/$rvm_ruby_string/bin/" -type f |
while read actual_file
do
if
[[ -s "$actual_file" ]]
Expand Down
2 changes: 1 addition & 1 deletion scripts/functions/environment
Expand Up @@ -84,7 +84,7 @@ __rvm_ensure_has_environment_files()
{
typeset file_name variable value environment_id __path __gem_home

__gem_home="${1:-"${rvm_ruby_gem_home}"}"
__gem_home="${rvm_ruby_gem_home}"
file_name="${__gem_home}/environment"
__path=""
if [[ "${__gem_home##*@}" != "global" ]]
Expand Down
16 changes: 12 additions & 4 deletions scripts/functions/gemset
Expand Up @@ -76,7 +76,6 @@ gemset_create()
else
mkdir -p "$gem_home/cache"
fi
__rvm_ensure_has_environment_files "$gem_home"
rvm_log "$rvm_ruby_string - #gemset created $gem_home"
if
(( ${rvm_skip_gemsets_flag:-0} == 0 ))
Expand Down Expand Up @@ -206,6 +205,8 @@ gemset_initial()
[[ -d "$rvm_gems_path/${rvm_ruby_string}/cache" ]] ||
mkdir -p "$rvm_gems_path/${rvm_ruby_string}/cache" 2>/dev/null

__rvm_ensure_has_environment_files

paths=( $( __rvm_ruby_string_paths_under "$rvm_gemsets_path" | sort -r ) )

for _iterator in "${paths[@]}"
Expand All @@ -229,8 +230,15 @@ gemset_initial()
done
__rvm_log_command "gemset.wrappers.$1" \
"$rvm_ruby_string - #generating ${1} wrappers" \
gem wrappers regenerate 2>/dev/null || true
# ruby -rgem-wrappers/command -e WrappersCommand.new.execute_regenerate
run_gem_wrappers_regenerate 2>/dev/null || true
}

run_gem_wrappers_regenerate()
{
gem search gem-wrappers | grep gem-wrappers >/dev/null ||
gem install gem-wrappers &&
gem wrappers regenerate ||
return $?
}

__gemset_gem()
Expand Down Expand Up @@ -269,8 +277,8 @@ __rvm_rubygems_create_link()

__rvm_initial_gemsets_create()
{
__rvm_log_command "chmod.bin" "$rvm_ruby_string - #making binaries executable" chmod +x "$rvm_ruby_home/bin"/* &&
( rubygems_setup ${rvm_rubygems_version:-latest} ) && # () for exit in rubygems_fatal_error
__rvm_log_command "chmod.bin" "" chmod +x "$rvm_ruby_home/bin"/* &&
__rvm_rubygems_create_link "$1" &&
gemset_create "global" ""
}
49 changes: 29 additions & 20 deletions scripts/functions/manage/base
Expand Up @@ -129,7 +129,7 @@ __rvm_apply_patch()
else
__rvm_apply_patch_prepare
touch "patches.list"
__rvm_log_command "patch.apply.${_patch_name##*\/}" "Applying patch ${_full_patch_path}" \
__rvm_log_command "patch.apply.${_patch_name##*\/}" "$rvm_ruby_string - #applying patch ${_full_patch_path}" \
__rvm_patch -F ${_patch_fuzziness} -p${_patch_level} -N -f -i "${_local_patch_path}" &&
printf "%b" "${_patch_name}\n" >> "patches.list"
__rvm_apply_patch_remove
Expand Down Expand Up @@ -233,7 +233,7 @@ __rvm_install_source()
__rvm_post_configure_${rvm_ruby_interpreter}
fi

__rvm_every_nth_dot 20 __rvm_log_command "make" "$rvm_ruby_string - #compiling" ${rvm_ruby_make:-__rvm_make} "${rvm_make_flags[@]}" ||
__rvm_log_command "make" "$rvm_ruby_string - #compiling" ${rvm_ruby_make:-__rvm_make} "${rvm_make_flags[@]}" ||
{
result=$?
rvm_error "There has been an error while running make. Halting the installation."
Expand Down Expand Up @@ -287,6 +287,14 @@ __rvm_install_source()
rvm_log "Install of $rvm_ruby_string - #complete "
}

__rvm_old_ruby()
{
case "$1" in
(ree*|ruby-1.8*|ruby-1.9.1*|ruby-1.9.2*) return 0 ;;
(*) return 1 ;;
esac
}

__rvm_install_ruby_try_remote()
{
: rvm_disable_binary_flag:${rvm_disable_binary_flag:=0}: rvm_remote_flag:${rvm_remote_flag:=0}:
Expand All @@ -311,6 +319,12 @@ __rvm_install_ruby_try_remote()
then
rvm_error "Requested binary installation but no rubies are available to download, consider skipping --binary flag."
return 1
elif
__rvm_old_ruby "${rvm_ruby_string}"
then
rvm_log "No binary rubies available for: $(__rvm_system_path -)/${rvm_ruby_string}.
It is not possible to build movable binaries for rubies 1.8-1.9.2, but you can do it for your system only.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies."
else
rvm_warn "No binary rubies available for: $(__rvm_system_path -)/${rvm_ruby_string}.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies."
Expand Down Expand Up @@ -422,7 +436,7 @@ __rvm_check_default()
[[ -n "$current_ruby_interpreter" ]] &&
[[ "$current_ruby_interpreter" == "$default_ruby_interpreter" ]]
then
__rvm_log_command 'default.restore' 'Removing default ruby interpreter' \
__rvm_log_command 'default.restore' "$rvm_ruby_string - #removing default ruby interpreter" \
rvm use system --default
fi
}
Expand Down Expand Up @@ -454,7 +468,7 @@ __rvm_remove_ruby()
if
[[ -d "${_dir}/$rvm_ruby_string" ]]
then
__rvm_log_command "remove.${_dir##*/}" "Removing ${_dir}/$rvm_ruby_string" __rvm_rm_rf "${_dir}/$rvm_ruby_string"
__rvm_log_command "remove.${_dir##*/}" "$rvm_ruby_string - #removing ${_dir}/$rvm_ruby_string" __rvm_rm_rf "${_dir}/$rvm_ruby_string"
else
rvm_log "${_dir}/$rvm_ruby_string has already been removed."
fi
Expand Down Expand Up @@ -532,15 +546,15 @@ __rvm_remove_gemsets()
if
(( ${rvm_gems_flag:=0} == 1 ))
then
__rvm_log_command remove_gemsets "Removing $rvm_ruby_string gemsets" __rvm_remove_gemsets__ ||
__rvm_log_command remove_gemsets "$rvm_ruby_string - #removing gemsets" __rvm_remove_gemsets__ ||
return $?
fi
true # for OSX
}

__rvm_remove_wrappers()
{
rvm_log "Removing $rvm_ruby_string wrappers..."
rvm_log "$rvm_ruby_string - #removing wrappers"
typeset -a wrappers
typeset wrapper

Expand All @@ -556,7 +570,7 @@ __rvm_remove_wrappers()

__rvm_remove_environments()
{
rvm_log "Removing $rvm_ruby_string environments..."
rvm_log "$rvm_ruby_string - #removing environments"
typeset environments environment

for environment in "$rvm_environments_path/$rvm_ruby_string" "$rvm_environments_path/$rvm_ruby_string"@*
Expand All @@ -569,7 +583,7 @@ __rvm_remove_environments()

__rvm_remove_aliases()
{
rvm_log "Removing $rvm_ruby_string aliases..."
rvm_log "$rvm_ruby_string - #removing aliases"
typeset alias_name aliases

aliases=($(__rvm_awk '/'$rvm_ruby_string'/{print}' "$rvm_path/config/alias" | __rvm_sed 's/=.*//'))
Expand All @@ -584,29 +598,24 @@ __rvm_remove_archives()
{
if (( ${rvm_archive_flag:=0} == 1 ))
then
rvm_log "Removing $rvm_ruby_string archives..."
rvm_log "$rvm_ruby_string - #removing archives"
\rm -f ${rvm_archives_path}/${rvm_ruby_package_file}.*
fi
}

# Iterate over all binaries and check for symlinked wrappers etc.
__rvm_remove_binaries()
{
rvm_log "Removing $rvm_ruby_string binaries..."
typeset full_binary_path linked_binary_path
typeset -a binaries
rvm_log "$rvm_ruby_string - #removing binaries"
typeset _binary_path
typeset -a _binaries

__rvm_read_lines binaries <(
__rvm_read_lines _binaries <(
__rvm_find "${rvm_bin_path:-$rvm_path/bin}" -maxdepth 1 -mindepth 1 "${name_opt}" "*$rvm_ruby_string" -or "${name_opt}" "*$rvm_ruby_string@*"
)
for full_binary_path in "${binaries[@]}"
for _binary_path in "${_binaries[@]}"
do
if
[[ -L "$full_binary_path" ]] &&
__rvm_string_match "$(__rvm_readlink "$full_binary_path")" "*$rvm_ruby_string/*" "*$rvm_ruby_string@*"
then
\rm -f "$full_binary_path"
fi
\rm -f "${_binary_path}"
done
}

Expand Down
12 changes: 6 additions & 6 deletions scripts/functions/manage/rubinius
Expand Up @@ -49,7 +49,7 @@ rubinius_install_ensure_wrapper()
if (( $# ))
then __rvm_log_command "install_${__binary}" "$rvm_ruby_string - #install ${__binary}" "$@" || return $?
fi
"${rvm_scripts_path:-${rvm_path}/scripts}"/wrapper "$ruby" --no-links ${__binary} || return $?
gem wrappers regenerate || return $?
}
}

Expand Down Expand Up @@ -99,9 +99,10 @@ rubinius_install()
then
ruby="${ruby}@rubinius"
(
rvm_create_flag=1
rvm_verbose_flag=0
__rvm_select "$ruby"
typeset rvm_create_flag=1
typeset rvm_internal_use_flag=1
typeset rvm_use_flag=0
__rvm_use "$ruby"
)
fi
rvm_log "Using $ruby for $rvm_ruby_string installation"
Expand Down Expand Up @@ -130,8 +131,7 @@ rubinius_install()
then rvm_ruby_make="CONFIGURE_ARGS=${rvm_configure_args## } "
fi

__rvm_every_nth_dot 20 \
__rvm_log_command rake "$rvm_ruby_string - #compiling" \
__rvm_log_command rake "$rvm_ruby_string - #compiling" \
"${rvm_ruby_make:-}$rvm_wrappers_path/$ruby/rake" install --trace ||
return $?
[[ -d "$rvm_ruby_home" && -f "$rvm_ruby_home/bin/rbx" ]] ||
Expand Down

0 comments on commit eb919b5

Please sign in to comment.