summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python-updater.in10
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"