Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Wed, 06 Jul 2016 18:50:12
Message-Id: 1467830985.ab1baddbb30c2e6f8c3120404676355a2cd470d6.kensington@gentoo
1 commit: ab1baddbb30c2e6f8c3120404676355a2cd470d6
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 16 19:31:03 2016 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Wed Jul 6 18:49:45 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab1baddb
7
8 kde5-functions: die if too many arguments are passed to add_*_dep
9
10 This avoids bugs where too many arguments are passed by mistake, causing the
11 last one to be ignored.
12
13 For example, the subslot operator added in d1bc5ac3f0e42df0f0255c8b39d7df16c5d4176b
14 was never applied because too many '' were passed.
15
16 eclass/kde5-functions.eclass | 16 ++++++++++++++++
17 1 file changed, 16 insertions(+)
18
19 diff --git a/eclass/kde5-functions.eclass b/eclass/kde5-functions.eclass
20 index b20d406..a8cc1a3 100644
21 --- a/eclass/kde5-functions.eclass
22 +++ b/eclass/kde5-functions.eclass
23 @@ -141,6 +141,10 @@ _add_category_dep() {
24 add_frameworks_dep() {
25 debug-print-function ${FUNCNAME} "$@"
26
27 + if [[ $# -gt 4 ]]; then
28 + die "${FUNCNAME} was called with too many arguments"
29 + fi
30 +
31 local version
32
33 if [[ -n ${3} ]]; then
34 @@ -169,6 +173,10 @@ add_frameworks_dep() {
35 add_plasma_dep() {
36 debug-print-function ${FUNCNAME} "$@"
37
38 + if [[ $# -gt 4 ]]; then
39 + die "${FUNCNAME} was called with too many arguments"
40 + fi
41 +
42 local version
43
44 if [[ -n ${3} ]]; then
45 @@ -197,6 +205,10 @@ add_plasma_dep() {
46 add_kdeapps_dep() {
47 debug-print-function ${FUNCNAME} "$@"
48
49 + if [[ $# -gt 4 ]]; then
50 + die "${FUNCNAME} was called with too many arguments"
51 + fi
52 +
53 local version
54
55 if [[ -n ${3} ]]; then
56 @@ -230,6 +242,10 @@ add_kdeapps_dep() {
57 add_qt_dep() {
58 debug-print-function ${FUNCNAME} "$@"
59
60 + if [[ $# -gt 4 ]]; then
61 + die "${FUNCNAME} was called with too many arguments"
62 + fi
63 +
64 local version
65
66 if [[ -n ${3} ]]; then