diff options
author | 2015-12-10 14:15:15 -0500 | |
---|---|---|
committer | 2015-12-10 14:15:15 -0500 | |
commit | 0da0eb273a09e11bb9b3f4df06cbd79b18ff32be (patch) | |
tree | c4c8fa8a63f3792a6f0d2385b3536d4b736cda8c | |
parent | Update version. (diff) | |
download | python-updater-0da0eb273a09e11bb9b3f4df06cbd79b18ff32be.tar.gz python-updater-0da0eb273a09e11bb9b3f4df06cbd79b18ff32be.tar.bz2 python-updater-0da0eb273a09e11bb9b3f4df06cbd79b18ff32be.zip |
All python-updater to function when python2 or python3 is not a symlink
-rw-r--r-- | python-updater.in | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/python-updater.in b/python-updater.in index ad58f5e..271e8b3 100644 --- a/python-updater.in +++ b/python-updater.in @@ -512,16 +512,10 @@ if [[ "${PMS_COMMAND[${PMS_INDEX}]}" == "emerge" ]]; then fi if has_version "=dev-lang/python-2*"; then - if [[ "$(readlink "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/python2)" != "python2."* ]]; then - die "'@GENTOO_PORTAGE_EPREFIX@/usr/bin/python2' is not valid symlink" - fi - NEW_PYTHON2_VERSION="$("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/python2 -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')" + NEW_PYTHON2_VERSION="$("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/python2 -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')" || die "Error calling python2" fi if has_version "=dev-lang/python-3*"; then - if [[ "$(readlink "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/python3)" != "python3."* ]]; then - die "'@GENTOO_PORTAGE_EPREFIX@/usr/bin/python3' is not valid symlink" - fi - NEW_PYTHON3_VERSION="$("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/python3 -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')" + NEW_PYTHON3_VERSION="$("@GENTOO_PORTAGE_EPREFIX@"/usr/bin/python3 -c 'from sys import version_info; print(".".join([str(x) for x in version_info[:2]]))')" || die "Error calling python3" fi if [[ -z "${NEW_PYTHON2_VERSION}" && -z "${NEW_PYTHON3_VERSION}" ]]; then die "Python 2 and Python 3 not installed" |