2 # Copyright 1999-2013 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
6 PYTHONPATH=${PORTAGE_PYTHONPATH:-${PORTAGE_PYM_PATH}}\
7 "${PORTAGE_PYTHON:-/usr/bin/python}" "${PORTAGE_BIN_PATH}/portageq" "$@"
13 has $x $EBUILD_DEATH_HOOKS || \
14 export EBUILD_DEATH_HOOKS="$EBUILD_DEATH_HOOKS $x"
18 register_success_hook() {
21 has $x $EBUILD_SUCCESS_HOOKS || \
22 export EBUILD_SUCCESS_HOOKS="$EBUILD_SUCCESS_HOOKS $x"
26 __strip_duplicate_slashes() {
29 while [[ ${removed} == *//* ]] ; do
30 removed=${removed//\/\///}
37 [[ -z $1 ]] && return 1
44 [[ -z $1 ]] && return 1
52 [[ -z $1 ]] && return 1
56 echo "${KV%%[^[:digit:]]*}"
60 [[ -z $1 ]] && return 1
62 local KV_MAJOR=$(KV_major "$1")
63 local KV_MINOR=$(KV_minor "$1")
64 local KV_MICRO=$(KV_micro "$1")
65 local KV_int=$(( KV_MAJOR * 65536 + KV_MINOR * 256 + KV_MICRO ))
67 # We make version 2.2.0 the minimum version we will handle as
68 # a sanity check ... if its less, we fail ...
69 if [[ ${KV_int} -ge 131584 ]] ; then
79 [[ -z ${_RC_GET_KV_CACHE} ]] \
80 && _RC_GET_KV_CACHE=$(uname -r)
82 echo $(KV_to_int "${_RC_GET_KV_CACHE}")