diff options
author | Michael Palimaka <kensington@gentoo.org> | 2016-06-17 05:31:03 +1000 |
---|---|---|
committer | Michael Palimaka <kensington@gentoo.org> | 2016-07-07 04:49:45 +1000 |
commit | ab1baddbb30c2e6f8c3120404676355a2cd470d6 (patch) | |
tree | 8c5427d0fa31a78e9b847b312e589da5e9708ee3 /eclass/kde5-functions.eclass | |
parent | games-action/chickens: remove deprecated games eclass (diff) | |
download | gentoo-ab1baddbb30c2e6f8c3120404676355a2cd470d6.tar.gz gentoo-ab1baddbb30c2e6f8c3120404676355a2cd470d6.tar.bz2 gentoo-ab1baddbb30c2e6f8c3120404676355a2cd470d6.zip |
kde5-functions: die if too many arguments are passed to add_*_dep
This avoids bugs where too many arguments are passed by mistake, causing the
last one to be ignored.
For example, the subslot operator added in d1bc5ac3f0e42df0f0255c8b39d7df16c5d4176b
was never applied because too many '' were passed.
Diffstat (limited to 'eclass/kde5-functions.eclass')
-rw-r--r-- | eclass/kde5-functions.eclass | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass index b20d406721dd..a8cc1a344327 100644 --- a/eclass/kde5-functions.eclass +++ b/eclass/kde5-functions.eclass @@ -141,6 +141,10 @@ _add_category_dep() { add_frameworks_dep() { debug-print-function ${FUNCNAME} "$@" + if [[ $# -gt 4 ]]; then + die "${FUNCNAME} was called with too many arguments" + fi + local version if [[ -n ${3} ]]; then @@ -169,6 +173,10 @@ add_frameworks_dep() { add_plasma_dep() { debug-print-function ${FUNCNAME} "$@" + if [[ $# -gt 4 ]]; then + die "${FUNCNAME} was called with too many arguments" + fi + local version if [[ -n ${3} ]]; then @@ -197,6 +205,10 @@ add_plasma_dep() { add_kdeapps_dep() { debug-print-function ${FUNCNAME} "$@" + if [[ $# -gt 4 ]]; then + die "${FUNCNAME} was called with too many arguments" + fi + local version if [[ -n ${3} ]]; then @@ -230,6 +242,10 @@ add_kdeapps_dep() { add_qt_dep() { debug-print-function ${FUNCNAME} "$@" + if [[ $# -gt 4 ]]; then + die "${FUNCNAME} was called with too many arguments" + fi + local version if [[ -n ${3} ]]; then |