summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-11-28 04:58:17 +0000
committerArfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>2010-11-28 04:58:17 +0000
commit9accec397a18a3739ffad8adfd2d281b70981e27 (patch)
treeabcc88729a68e99bed891af6172f41889469e5d4
parentapp-office/gnumeric, app-office/dia and dev-libs/boost call python_need_rebui... (diff)
downloadpython-updater-9accec397a18a3739ffad8adfd2d281b70981e27.tar.gz
python-updater-9accec397a18a3739ffad8adfd2d281b70981e27.tar.bz2
python-updater-9accec397a18a3739ffad8adfd2d281b70981e27.zip
Update matching of Python ABIs.
-rwxr-xr-xpython-updater19
1 files changed, 18 insertions, 1 deletions
diff --git a/python-updater b/python-updater
index 2df5f4f..34e9da7 100755
--- a/python-updater
+++ b/python-updater
@@ -215,6 +215,23 @@ get_RESTRICT_PYTHON_ABIS() {
fi
}
+# check_python_abi_matching(PYTHON_ABI, restricted_PYTHON_ABI)
+check_python_abi_matching() {
+ if [[ "$2" == *"-cpython" ]]; then
+ [[ "$1" =~ ^[[:digit:]]+\.[[:digit:]]+$ && "$1" == ${2%-cpython} ]]
+ elif [[ "$2" == *"-jython" ]]; then
+ [[ "$1" == $2 ]]
+ else
+ if [[ "$1" =~ ^[[:digit:]]+\.[[:digit:]]+$ ]]; then
+ [[ "$1" == $2 ]]
+ elif [[ "$1" =~ ^[[:digit:]]+\.[[:digit:]]+-jython$ ]]; then
+ [[ "${1%-jython}" == $2 ]]
+ else
+ die "Unrecognized Python ABI '$1'"
+ fi
+ fi
+}
+
# get_OLD_PYTHON_VERSIONS_REGEX()
get_OLD_PYTHON_VERSIONS_REGEX() {
if [[ -n "${PYTHON_REQUESTED_ACTIVE_VERSION}" ]]; then
@@ -526,7 +543,7 @@ for content in $(find ${PKG_DBDIR}/ -name CONTENTS | sort); do
for PYTHON_ABI in ${USE_PYTHON}; do
support_ABI="1"
for restricted_ABI in ${RESTRICT_PYTHON_ABIS}; do
- if [[ "${PYTHON_ABI}" == ${restricted_ABI} ]]; then
+ if check_python_abi_matching "${PYTHON_ABI}" "${restricted_ABI}"; then
support_ABI="0"
break
fi