Permalink
Browse files

Filtering Travis binaries for OSX for non-travis env (#3873)

Filtering Travis binaries for OSX for non-Travis Env (they are statically linked and not movable)

Fixes #3690, #3582, #3861

Signed-off-by: Piotr Kuczynski <piotr.kuczynski@gmail.com>
  • Loading branch information...
1 parent ffdf99c commit 24f5dabead0e693011266365fd3cf8e66d97f75d @pkuczynski pkuczynski committed on GitHub Jan 11, 2017
Showing with 21 additions and 0 deletions.
  1. +1 −0 CHANGELOG.md
  2. +20 −0 scripts/functions/utility_system
View
@@ -20,6 +20,7 @@
* Cannot build rbx-2.5.2 on ArchLinux [\#3497](https://github.com/rvm/rvm/issues/3497)
* Remove incompatible version of openssl098 [\#3844](https://github.com/rvm/rvm/issues/3844)
* Failed to fetch the gpg key from keys.gnupg.net [\#3544](https://github.com/rvm/rvm/issues/3544)
+* Filtering Travis binaries for OSX for non Travis env (they are statically linked and not movable) [\#3690](https://github.com/rvm/rvm/issues/3690)
## [1.28.0](https://github.com/rvm/rvm/tag/1.28.0)
@@ -61,13 +61,29 @@ __rvm_ruby_package_file()
esac
}
+__rvm_include_travis_binaries()
+{
+ if [[ $rvm_remote_server_url == *"travis"* && $TRAVIS != true && $_system_name_lowercase == "osx" ]]
+ then
+ rvm_debug "Travis binaries for OSX are not movable and can't be used outside of Travis environment. \
+Skip that source."
+ return 1
+ fi
+
+ return 0
+}
+
__rvm_calculate_remote_file()
{
rvm_remote_server_url="$( __rvm_db "rvm_remote_server_url${3:-}" )"
+
[[ -n "$rvm_remote_server_url" ]] || {
rvm_debug "rvm_remote_server_url${3:-} not found"
return $1
}
+
+ __rvm_include_travis_binaries || return $1
+
__rvm_system_path "" "${3:-}"
__rvm_ruby_package_file "${4:-}"
__remote_file="${rvm_remote_server_url}/${rvm_remote_server_path}${rvm_ruby_package_file}"
@@ -113,11 +129,15 @@ __list_remote_all()
{
\typeset _iterator rvm_remote_server_url rvm_remote_server_path
_iterator=""
+
while
__rvm_db "rvm_remote_server_url${_iterator:-}" rvm_remote_server_url
do
+ __rvm_include_travis_binaries || continue
+
__rvm_system_path "" "${_iterator}"
rvm_debug "__list_remote_all${_iterator:-} $rvm_remote_server_url $rvm_remote_server_path"
+
__list_remote_for "${rvm_remote_server_url}" "$rvm_remote_server_path"
: $(( _iterator+=1 ))
done | \command \sort -u | __rvm_version_sort

0 comments on commit 24f5dab

Please sign in to comment.