diff options
| author | Tomáš Chvátal <scarabeus@gentoo.org> | 2009-08-07 17:23:12 +0200 |
|---|---|---|
| committer | Tomáš Chvátal <scarabeus@gentoo.org> | 2009-08-07 17:23:12 +0200 |
| commit | cbbbe8a3b60a96f19dcc6cae8914fcdfef0acc31 (patch) | |
| tree | 6a8d627d62b2dc361535aaa5f098efc13eb422df /eclass | |
| parent | c04338ef20c0c1c8478bbaabf7cd0bd5b6b7a9a6 (diff) | |
| download | kde-cbbbe8a3b60a96f19dcc6cae8914fcdfef0acc31.tar.gz kde-cbbbe8a3b60a96f19dcc6cae8914fcdfef0acc31.tar.bz2 kde-cbbbe8a3b60a96f19dcc6cae8914fcdfef0acc31.zip | |
[eclasses] Add function for ease adding blockers.
Diffstat (limited to 'eclass')
| -rw-r--r-- | eclass/kde4-functions.eclass | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index 6495d7320a9..0abe907102d 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -359,6 +359,9 @@ load_library_dependencies() { # installed with USE=-kdeprefix block_other_slots() { local slot + + debug-print-function ${FUNCNAME} "$@" + for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do # Block non kdeprefix ${PN} on other slots if [[ ${SLOT} != ${slot} ]]; then @@ -366,3 +369,27 @@ block_other_slots() { fi done } + +# @FUNCTION: add_blocker +# @DESCRIPTION: +# Create correct RDEPEND value for blocking correct package. +# Usefull for file-collision blocks. +# Parameters are package and version to block. +# add_blocker kde-base/kdelibs 4.2.4 +add_blocker() { + local slot + + debug-print-function ${FUNCNAME} "$@" + + [[ ${1} = "" || ${2} = "" ]] && die "Missing parameter" + for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do + # on -kdeprefix we block every slot + RDEPEND="${RDEPEND} + !kdeprefix? ( !<=${1}:${slot}[-kdeprefix] ) + " + done + # on kdeprefix we block only our slot + RDEPEND="${RDEPEND} + kdeprefix? ( !<=${1}:${SLOT}[kdeprefix] ) + " +} |
