summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRepository mirror & CI <repomirrorci@gentoo.org>2020-08-07 11:13:39 +0000
committerRepository mirror & CI <repomirrorci@gentoo.org>2020-08-07 11:13:39 +0000
commitdd8dc30e72ffa91c71273e592272cb0ae6ea2f45 (patch)
tree5d9f1f1743a37c2f73411670a35163ce54ee2c40
parent2020-08-07 10:35:44 UTC (diff)
parentpython*-r1.eclass: Check for invalid impl patterns (diff)
downloadgentoo-dd8dc30e72ffa91c71273e592272cb0ae6ea2f45.tar.gz
gentoo-dd8dc30e72ffa91c71273e592272cb0ae6ea2f45.tar.bz2
gentoo-dd8dc30e72ffa91c71273e592272cb0ae6ea2f45.zip
Merge updates from master
-rw-r--r--eclass/python-r1.eclass6
-rw-r--r--eclass/python-single-r1.eclass4
-rw-r--r--eclass/python-utils-r1.eclass34
-rw-r--r--profiles/package.mask11
4 files changed, 55 insertions, 0 deletions
diff --git a/eclass/python-r1.eclass b/eclass/python-r1.eclass
index 8c3ff5b08095..40944684ec8b 100644
--- a/eclass/python-r1.eclass
+++ b/eclass/python-r1.eclass
@@ -297,6 +297,7 @@ _python_gen_usedep() {
local impl matches=()
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
matches+=(
@@ -380,6 +381,7 @@ python_gen_useflags() {
local impl matches=()
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
matches+=( "python_targets_${impl}" )
@@ -428,6 +430,7 @@ python_gen_cond_dep() {
local dep=${1}
shift
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
# substitute ${PYTHON_USEDEP} if used
@@ -486,6 +489,7 @@ python_gen_impl_dep() {
local PYTHON_REQ_USE=${1}
shift
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
local PYTHON_PKG_DEP
@@ -564,6 +568,7 @@ python_gen_any_dep() {
shift
local i PYTHON_PKG_DEP out=
+ _python_verify_patterns "${@}"
for i in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${i}" "${@}"; then
local PYTHON_USEDEP="python_targets_${i}(-),python_single_target_${i}(+)"
@@ -751,6 +756,7 @@ python_setup() {
# (reverse iteration -- newest impl first)
local found
+ _python_verify_patterns "${@}"
for (( i = ${#_PYTHON_SUPPORTED_IMPLS[@]} - 1; i >= 0; i-- )); do
local impl=${_PYTHON_SUPPORTED_IMPLS[i]}
diff --git a/eclass/python-single-r1.eclass b/eclass/python-single-r1.eclass
index 6fedc7cdf4e0..dc032379cd84 100644
--- a/eclass/python-single-r1.eclass
+++ b/eclass/python-single-r1.eclass
@@ -291,6 +291,7 @@ _python_gen_usedep() {
local impl matches=()
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
matches+=(
@@ -333,6 +334,7 @@ python_gen_useflags() {
local impl matches=()
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
matches+=( "python_single_target_${impl}" )
@@ -382,6 +384,7 @@ python_gen_cond_dep() {
local dep=${1}
shift
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
# substitute ${PYTHON_SINGLE_USEDEP} if used
@@ -445,6 +448,7 @@ python_gen_impl_dep() {
local PYTHON_REQ_USE=${1}
shift
+ _python_verify_patterns "${@}"
for impl in "${_PYTHON_SUPPORTED_IMPLS[@]}"; do
if _python_impl_matches "${impl}" "${@}"; then
local PYTHON_PKG_DEP
diff --git a/eclass/python-utils-r1.eclass b/eclass/python-utils-r1.eclass
index 9bad72a77e98..87cb662c64fd 100644
--- a/eclass/python-utils-r1.eclass
+++ b/eclass/python-utils-r1.eclass
@@ -45,6 +45,18 @@ _PYTHON_ALL_IMPLS=(
)
readonly _PYTHON_ALL_IMPLS
+# @ECLASS-VARIABLE: _PYTHON_HISTORICAL_IMPLS
+# @INTERNAL
+# @DESCRIPTION:
+# All historical Python implementations that are no longer supported.
+_PYTHON_HISTORICAL_IMPLS=(
+ jython2_7
+ pypy pypy1_{8,9} pypy2_0
+ python2_{5,6}
+ python3_{1,2,3,4,5}
+)
+readonly _PYTHON_HISTORICAL_IMPLS
+
# @ECLASS-VARIABLE: PYTHON_COMPAT_NO_STRICT
# @INTERNAL
# @DESCRIPTION:
@@ -89,6 +101,28 @@ _python_impl_supported() {
esac
}
+# @FUNCTION: _python_verify_patterns
+# @USAGE: <pattern>...
+# @INTERNAL
+# @DESCRIPTION:
+# Verify whether the patterns passed to the eclass function are correct
+# (i.e. can match any valid implementation). Dies on wrong pattern.
+_python_verify_patterns() {
+ debug-print-function ${FUNCNAME} "${@}"
+
+ local impl pattern
+ for pattern; do
+ [[ ${pattern} == -[23] ]] && continue
+
+ for impl in "${_PYTHON_ALL_IMPLS[@]}" "${_PYTHON_HISTORICAL_IMPLS[@]}"
+ do
+ [[ ${impl} == ${pattern/./_} ]] && continue 2
+ done
+
+ die "Invalid implementation pattern: ${pattern}"
+ done
+}
+
# @FUNCTION: _python_set_impls
# @INTERNAL
# @DESCRIPTION:
diff --git a/profiles/package.mask b/profiles/package.mask
index 9ef8fcd42d56..7418aea8ea9e 100644
--- a/profiles/package.mask
+++ b/profiles/package.mask
@@ -32,6 +32,17 @@
#--- END OF EXAMPLES ---
+# Michał Górny <mgorny@gentoo.org> (2020-08-07)
+# Last upstream (pre-)release in 2016. Python 3 porting effort is not
+# progressing since February, and PRs are stuck. Homepage is gone.
+# Removal in 30 days. Bug #695010.
+app-i18n/fcitx-sunpinyin
+app-i18n/ibus-sunpinyin
+app-i18n/scim-sunpinyin
+app-i18n/sunpinyin
+app-i18n/sunpinyin-data
+app-i18n/xsunpinyin
+
# Hans de Graaff <graaff@gentoo.org> (2020-08-07)
# Slot with known security issues. Please use a newer slot
# instead. Removal in 30 days. Bug #713478.