From 0da0eb273a09e11bb9b3f4df06cbd79b18ff32be Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Thu, 10 Dec 2015 14:15:15 -0500 Subject: All python-updater to function when python2 or python3 is not a symlink --- python-updater.in | 10 ++-------- 1 file 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" -- cgit v1.2.3-65-gdbad