diff options
author | 2012-11-22 02:36:22 +0000 | |
---|---|---|
committer | 2012-11-22 02:36:22 +0000 | |
commit | a94e2da583e44ff44a6b1a2d60edcd968cd08c8a (patch) | |
tree | 9186069ad42398169c7ed3c53656cd2abbd0dbfe /app-admin/eselect-boost/files | |
parent | Remove obsolete masks. (diff) | |
download | gentoo-2-a94e2da583e44ff44a6b1a2d60edcd968cd08c8a.tar.gz gentoo-2-a94e2da583e44ff44a6b1a2d60edcd968cd08c8a.tar.bz2 gentoo-2-a94e2da583e44ff44a6b1a2d60edcd968cd08c8a.zip |
Remove select-boost since boost is no longer slotted.
Diffstat (limited to 'app-admin/eselect-boost/files')
-rw-r--r-- | app-admin/eselect-boost/files/boost.eselect-0.2 | 205 | ||||
-rw-r--r-- | app-admin/eselect-boost/files/boost.eselect-0.3 | 229 | ||||
-rw-r--r-- | app-admin/eselect-boost/files/boost.eselect-0.4 | 254 |
3 files changed, 0 insertions, 688 deletions
diff --git a/app-admin/eselect-boost/files/boost.eselect-0.2 b/app-admin/eselect-boost/files/boost.eselect-0.2 deleted file mode 100644 index 7449dca1bb64..000000000000 --- a/app-admin/eselect-boost/files/boost.eselect-0.2 +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright 1999-2008 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id: boost.eselect-0.2,v 1.2 2010/01/22 15:00:56 jer Exp $ - -# This eclass-module has been initially written by Łukasz Michalik <lmi@ift.uni.wroc.pl> -# Corrections and extensions by Tiziano Müller <dev-zero@gentoo.org> - -DESCRIPTION="Manage boost installations" - -_boost_tools="bcp bjam compiler_status inspect library_status process_jam_log quickbook wave" - -find_targets() { - local f - for f in "${ROOT}"/usr/include/boost-[[:digit:]]* ; do - [[ -d "${f}" ]] && echo $(basename "${f}") - done -} - -remove_installation() { - local link - for link in "${ROOT}/usr/include/boost" "${ROOT}/usr/share/boostbook" ; do - if [[ -L "${link}" ]] ; then - rm "${link}" || die -q "Couldn't remove \"${link}\" symlink" - else - [[ -e "${link}" ]] && die -q "\"${link}\" exists and isn't a symlink" - fi - done - - pushd "${ROOT}/usr/%LIBDIR%" 1>/dev/null - local lib - for lib in libboost_*.{a,so} ; do - [[ -L "${lib}" && "${lib}" != libboost_*[[:digit:]]_[[:digit:]][[:digit:]].@(a|so) ]] || continue - rm "${lib}" || die -q "Unable to remove \"/usr/%LIBDIR%/${lib}\" symlink" - done - popd 1>/dev/null - - pushd "${ROOT}"/usr/bin 1>/dev/null - local tool - for tool in ${_boost_tools} ; do - [[ -L "${tool}" ]] && ( rm "${tool}" || die -q "Unable to remove \"/usr/bin/${tool}\" symlink" ) - done - popd 1>/dev/null - - local mod="mpi.so" - for moddir in "${ROOT}"/usr/%LIBDIR%/python*/site-packages ; do - if [ -L "${moddir}/${mod}" ] ; then - rm "${moddir}/${mod}" || die -q "Unable to remove \"${moddir}/${mod}\" symlink" - else - [[ -e "${moddir}/${mod}" ]] && die -q "\"${moddir}/${mod}\" exists and isn't a symlink" - fi - done -} - -set_installation() { - [[ -z "${2}" ]] && die -q "Too few parameters to set_installation()" - local target="${1}" - local version="${2}" - - if [[ -d "${ROOT}/usr/include/${target}" ]] ; then - pushd "${ROOT}/usr/include" 1>/dev/null - ln -s "${target}/boost" boost || die -q "Couldn't create symlink \"/usr/include/boost\"" - popd 1>/dev/null - - pushd "${ROOT}/usr/share/" 1>/dev/null - [[ -d "boostbook-${version}" ]] && \ - ( ln -s "boostbook-${version}" "boostbook" || die -q "Couldn't create symlink \"/usr/bin/${tool}\"" ) - popd 1>/dev/null - - pushd "${ROOT}/usr/%LIBDIR%" 1>/dev/null - local lib - for lib in libboost_*-"${version}".{a,so} ; do - [[ -e "${lib}" ]] && \ - ( ln -s "${lib}" "${lib//-${version}}" || die -q "Couldn't create symlink \"/usr/%LIBDIR%/${lib}\"" ) - done - popd 1>/dev/null - - pushd "${ROOT}/usr/bin/" 1>/dev/null - local tool - for tool in ${_boost_tools} ; do - [[ -e "${tool}" ]] && die -q "\"/usr/bin/${tool}\" exists and isn't a symlink" - [[ -e "${tool}-${version}" ]] && \ - ( ln -s "${tool}-${version}" "${tool}" || die -q "Couldn't create symlink \"/usr/bin/${tool}\"" ) - done - popd 1>/dev/null - - local mod="mpi.so" - for moddir in "${ROOT}"/usr/%LIBDIR%/python*/site-packages ; do - pushd "${moddir}" 1>/dev/null - [[ -e "${mod}" ]] && die -q "\"${moddir}/${mod}\" exists and isn't a symlink" - [[ -e "mpi_${version}/mpi.so" ]] && \ - ( ln -s "mpi_${version}/${mod}" "${mod}" || die -q "Couldn't create symlink \"${moddir}/${mod}\"" ) - popd 1>/dev/null - done - - else - die -q "Target \"${target}\" doesn't appear to be valid!" - fi -} - -### show action ### - -describe_show() { - echo "Show the current boost version used" -} - -do_show() { - local include - - write_list_start "Current boost version:" - if [[ -L "${ROOT}"/usr/include/boost ]] ; then - include=$(basename $(dirname $(canonicalise "${ROOT}"/usr/include/boost ))) - write_kv_list_entry "${include%/}" "" - else - write_kv_list_entry "(unset)" "" - fi -} - -### list action ### - -describe_list() { - echo "List available boost versions" -} - -do_list() { - local targets=( $(find_targets ) ) - write_list_start "Available boost versions:" - if [[ -n "${targets[@]}" ]] ; then - local i - for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do - [[ "${targets[${i}]}" == $(basename $(dirname $(canonicalise "${ROOT}"/usr/include/boost))) ]] && \ - targets[${i}]="${targets[${i}]} $(highlight '*' )" - done - write_numbered_list "${targets[@]}" - else - write_kv_list_entry "(none found)" "" - fi -} - -### set action ### - -describe_set() { - echo "Set a new boost version" -} - -describe_set_parameters() { - echo "<target>" -} - -describe_set_options() { - echo "target : Target name or number (from 'list' action)" -} - -do_set() { - if [[ -z "${1}" ]] ; then - # no parameter - die -q "You didn't tell me what to set the version to" - fi - - local target="${1}" - if is_number "${target}" ; then - targets=($(find_targets)) - target="${targets[$((${target} - 1))]}" - fi - local version="${target//boost-}" - - if [[ -L "${ROOT}"/usr/include/boost ]] ; then - if ! remove_installation ; then - die -q "Couldn't unset existing installation" - elif ! set_installation "${target}" "${version}" ; then - die -q "Couldn't set a new installation" - fi - elif [[ -e "${ROOT}"/usr/include/boost ]] ; then - die -q "Sorry, existing boost installation confuses me" - else - set_installation "${target}" "${version}" || die -q "Couldn't set a new version" - fi -} - -### update action ### - -describe_update() { - echo "Automaticly update boost version used" -} - -do_update() { - local current= - if [[ -L "${ROOT}/usr/include/boost" ]]; then - current=$(basename $(canonicalise "${ROOT}/usr/include/boost") ) - if [[ ! -e $(canonicalise "${ROOT}/usr/include/boost") ]]; then - # clean up dead symlinks - remove_installation || die -q "Couldn't remove existing installation" - fi - elif [[ -e "${ROOT}/usr/include/boost" ]]; then - die -q "Sorry, \"/usr/include/boost\" exists but is not a symlink" - fi - - local targets=($(find_targets)) - if [[ ${#targets[@]} -gt 0 ]]; then - remove_installation - local target="${targets[@]:(-1)}" - set_installation "${target}" "${target//boost-}" || die -q "Couldn't set a new symlink" - else - die -q "No slotted boost version found" - fi -} diff --git a/app-admin/eselect-boost/files/boost.eselect-0.3 b/app-admin/eselect-boost/files/boost.eselect-0.3 deleted file mode 100644 index 9d9f02edaa2a..000000000000 --- a/app-admin/eselect-boost/files/boost.eselect-0.3 +++ /dev/null @@ -1,229 +0,0 @@ -# Copyright 1999-2011 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id: boost.eselect-0.3,v 1.3 2011/08/28 06:48:29 ulm Exp $ - -# This eclass-module has been initially written by Łukasz Michalik <lmi@ift.uni.wroc.pl> -# Corrections and extensions by Tiziano Müller <dev-zero@gentoo.org> - -DESCRIPTION="Manage boost installations" -MAINTAINER="dev-zero@gentoo.org" -VERSION="0.3" - -_boost_tools="bcp bjam compiler_status inspect library_status process_jam_log quickbook wave" - -# ... meaning: <none> and -debug: -_suffices="|-debug" - -find_targets() { - local f - # use ls here to get a really empty set in case no boost is installed - for d in $(ls -d "${ROOT}"/usr/share/boost-eselect/profiles/* 2>/dev/null) ; do - for p in "${d}"/* ; do - echo "boost-$(basename ${d})/$(basename ${p})" - done - done -} - -remove_installation() { - echo "Removing symlinks from old version" - - local link - for link in "${ROOT}/usr/include/boost" "${ROOT}/usr/share/boostbook" ; do - if [[ -L "${link}" ]] ; then - rm "${link}" || die -q "Couldn't remove \"${link}\" symlink" - else - [[ -e "${link}" ]] && die -q "\"${link}\" exists and isn't a symlink" - fi - done - - pushd "${ROOT}/usr/%LIBDIR%" 1>/dev/null - local lib - for lib in libboost_*.{a,so} ; do - [[ -L "${lib}" && "${lib}" != libboost_*[[:digit:]]_[[:digit:]][[:digit:]]@(${_suffices}).@(a|so) ]] || continue - rm "${lib}" || die -q "Unable to remove \"/usr/%LIBDIR%/${lib}\" symlink" - done - popd 1>/dev/null - - pushd "${ROOT}"/usr/bin 1>/dev/null - local tool - for tool in ${_boost_tools} ; do - [[ -L "${tool}" ]] && ( rm "${tool}" || die -q "Unable to remove \"/usr/bin/${tool}\" symlink" ) - done - popd 1>/dev/null - - local mod="mpi.so" - for moddir in "${ROOT}"/usr/%LIBDIR%/python*/site-packages ; do - if [ -L "${moddir}/${mod}" ] ; then - rm "${moddir}/${mod}" || die -q "Unable to remove \"${moddir}/${mod}\" symlink" - else - [[ -e "${moddir}/${mod}" ]] && die -q "\"${moddir}/${mod}\" exists and isn't a symlink" - fi - done - - if [ -L "${ROOT}/etc/eselect/boost/active" ] ; then - rm "${ROOT}/etc/eselect/boost/active" || die -q "Unable to remove \"${ROOT}/etc/eselect/boost/active\" symlink" - else - [[ -e "${ROOT}/etc/eselect/boost/active" ]] && die -q "\"${ROOT}/etc/eselect/boost/active\" exists and isn't a symlink" - fi -} - -set_installation() { - [[ -z "${1}" ]] && die -q "Too few parameters to set_installation()" - local target="${1}" - - echo "Creating symlinks for ${target}" - - local profile="${target/*\/}" - local version="${target/\/${profile}}" - version="${version/boost-}" - version="${version/./_}" - - cd "${ROOT}/etc/eselect/boost" - ln -s "${ROOT}/usr/share/boost-eselect/profiles/${target//boost-}" active || die -q "Couldn't create symlink active -> /usr/share/boost-eselect/profiles/${target//boost-}/${profile}" - - . "${ROOT}/usr/share/boost-eselect/profiles/${target//boost-}" - - for t in ${dirs} ${bins} ${libs} ; do - [[ -e "${ROOT}${t}" ]] || die -q "\"${t}\" listed as target does not exist" - - pushd "$(dirname ${ROOT}${t})" 1>/dev/null - local ts=$(basename "${t}") - local tt="${ts//-${version}}" - tt="${tt//${suffix}}" - ln -s ${ts} ${tt} || die -q "Couldn't create symlink \"$(pwd)/${tt}\"" - popd 1>/dev/null - done - - [[ -d "${ROOT}${includes}" ]] || die -q "\"${includes}\" does not exist" - pushd "${ROOT}/usr/include" 1>/dev/null - ln -s ${includes//\/usr\/include\/} boost || die -q "Couldn't create symlink \"/usr/include/boost\"" - popd 1>/dev/null - - for t in ${python} ; do - pushd "$(dirname ${ROOT}${t})/.." 1>/dev/null - local ts="$(basename $(dirname ${ROOT}${t}))/${t//*\/}" - ts="${ts//${suffix}}" - local tt=${t//*\/} - ln -s "${ts}" "${tt}" || die -q "Couldn't create symlink \"$(pwd)/${tt}\"" - popd 1>/dev/null - done -} - -### show action ### - -describe_show() { - echo "Show the current boost version used" -} - -do_show() { - local include - - write_list_start "Current boost version:" - if [[ -L "${ROOT}"/usr/include/boost ]] ; then - include=$(basename $(dirname $(canonicalise "${ROOT}"/usr/include/boost ))) - write_kv_list_entry "${include%/}" "" - else - write_kv_list_entry "(unset)" "" - fi -} - -### list action ### - -describe_list() { - echo "List available boost versions" -} - -do_list() { - local targets=( $(find_targets ) ) - write_list_start "Available boost versions:" - if [[ -n "${targets[@]}" ]] ; then - local i - local active_slot=$(canonicalise "${ROOT}/etc/eselect/boost/active") - active_slot=${active_slot/"${ROOT}/usr/share/boost-eselect/profiles/"/boost-} - for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do - if [[ "${targets[${i}]}" == ${active_slot} ]] ; then - targets[${i}]="${targets[${i}]} $(highlight '*' )" - fi - done - write_numbered_list "${targets[@]}" - else - write_kv_list_entry "(none found)" "" - fi -} - -### set action ### - -describe_set() { - echo "Set a new boost version" -} - -describe_set_parameters() { - echo "<target>" -} - -describe_set_options() { - echo "target : Target name or number (from 'list' action)" -} - -do_set() { - if [[ -z "${1}" ]] ; then - # no parameter - die -q "You didn't tell me what to set the version to" - fi - - local target="${1}" - if is_number "${target}" ; then - targets=($(find_targets)) - target="${targets[$((${target} - 1))]}" - fi - - remove_installation - set_installation "${target}" -} - -### update action ### - -describe_update() { - echo "Automatically update boost version used" -} - -do_update() { - # set default profile - profile="default" - - # extract profile if there's already one boost version selected - if [ -L "${ROOT}"/etc/eselect/boost/active ] ; then - profile=$(basename $(canonicalise "${ROOT}/etc/eselect/boost/active")) - fi - - echo "Previously selected profile: ${profile}" - - remove_installation - - local targets=($(find_targets)) - [[ ${#targets[@]} -gt 0 ]] || die -q "No slotted boost version found" - - # contains surely the highest available version, but maybe not the right profile - local last_target="${targets[@]:(-1)}" - # strip profile - local target_version="${last_target//\/*}" - - # in case the previously used profile isn't available anymore - local target="${target_version}/default" - local matching_profile_found=0 - for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do - if [[ "${targets[${i}]}" == "${target_version}/${profile}" ]] ; then - target="${targets[${i}]}" - matching_profile_found=1 - break - fi - done - - if [[ "${matching_profile_found}" == 1 ]] ; then - echo "Found a matching profile \"${profile}\" for the new version." - else - echo "Didn't find the previously selected profile \"${profile}\" for the new version. Resetting to \"default\"." - fi - - set_installation "${target}" -} diff --git a/app-admin/eselect-boost/files/boost.eselect-0.4 b/app-admin/eselect-boost/files/boost.eselect-0.4 deleted file mode 100644 index 3baddd74481a..000000000000 --- a/app-admin/eselect-boost/files/boost.eselect-0.4 +++ /dev/null @@ -1,254 +0,0 @@ -# Copyright 1999-2012 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id: boost.eselect-0.4,v 1.1 2012/04/02 00:51:03 floppym Exp $ - -# This eclass-module has been initially written by Łukasz Michalik <lmi@ift.uni.wroc.pl> -# Corrections and extensions by Tiziano Müller <dev-zero@gentoo.org> - -DESCRIPTION="Manage boost installations" -MAINTAINER="dev-zero@gentoo.org" -VERSION="0.4" - -_boost_tools="bcp bjam compiler_status inspect library_status process_jam_log quickbook wave" - -# ... meaning: <none> and -debug: -_suffices="|-debug" - -find_targets() { - local f - # use ls here to get a really empty set in case no boost is installed - for d in $(ls -d "${ROOT}"/usr/share/boost-eselect/profiles/* 2>/dev/null) ; do - for p in "${d}"/* ; do - echo "boost-$(basename ${d})/$(basename ${p})" - done - done -} - -remove_installation() { - echo "Removing symlinks from old version" - - local link - for link in "${ROOT}/usr/include/boost" "${ROOT}/usr/share/boostbook" ; do - if [[ -L "${link}" ]] ; then - rm "${link}" || die -q "Couldn't remove \"${link}\" symlink" - else - [[ -e "${link}" ]] && die -q "\"${link}\" exists and isn't a symlink" - fi - done - - pushd "${ROOT}/usr/%LIBDIR%" 1>/dev/null - local lib - for lib in libboost_*.{a,so} ; do - [[ -L "${lib}" && "${lib}" != libboost_*[[:digit:]]_[[:digit:]][[:digit:]]@(${_suffices}).@(a|so) ]] || continue - rm "${lib}" || die -q "Unable to remove \"/usr/%LIBDIR%/${lib}\" symlink" - done - popd 1>/dev/null - - pushd "${ROOT}"/usr/bin 1>/dev/null - local tool - for tool in ${_boost_tools} ; do - [[ -L "${tool}" ]] && ( rm "${tool}" || die -q "Unable to remove \"/usr/bin/${tool}\" symlink" ) - done - popd 1>/dev/null - - local python_module python_module_dir - for python_module in mpi.py mpi_debug.py ; do - for python_module_dir in "${ROOT}"usr/%LIBDIR%/python*/site-packages ; do - if [[ -e "${python_module_dir}/${python_module}" ]] ; then - rm "${python_module_dir}/${python_module}" || die -q "Unable to remove \"${python_module_dir}/${python_module}\"" - fi - done - done - - # Deprecated code for older versions of Boost. - local mod="mpi.so" - for moddir in "${ROOT}"/usr/%LIBDIR%/python*/site-packages ; do - if [ -L "${moddir}/${mod}" ] ; then - rm "${moddir}/${mod}" || die -q "Unable to remove \"${moddir}/${mod}\" symlink" - else - [[ -e "${moddir}/${mod}" ]] && die -q "\"${moddir}/${mod}\" exists and isn't a symlink" - fi - done - - local python_module - for python_module in ${python_modules} ; do - local target_python_module="${python_module#*:}" - local wrapper_python_module="${python_module%:*}" - echo "from ${target_python_module} import *" > "${ROOT}${wrapper_python_module}" || die -q "Couldn't create wrapper python module \"$(pwd)/${wrapper_python_module}\"" - done - - if [ -L "${ROOT}/etc/eselect/boost/active" ] ; then - rm "${ROOT}/etc/eselect/boost/active" || die -q "Unable to remove \"${ROOT}/etc/eselect/boost/active\" symlink" - else - [[ -e "${ROOT}/etc/eselect/boost/active" ]] && die -q "\"${ROOT}/etc/eselect/boost/active\" exists and isn't a symlink" - fi -} - -set_installation() { - [[ -z "${1}" ]] && die -q "Too few parameters to set_installation()" - local target="${1}" - - echo "Creating symlinks for ${target}" - - local profile="${target/*\/}" - local version="${target/\/${profile}}" - version="${version/boost-}" - version="${version/./_}" - - cd "${ROOT}/etc/eselect/boost" - ln -s "${ROOT}/usr/share/boost-eselect/profiles/${target//boost-}" active || die -q "Couldn't create symlink active -> /usr/share/boost-eselect/profiles/${target//boost-}/${profile}" - - . "${ROOT}/usr/share/boost-eselect/profiles/${target//boost-}" - - for t in ${dirs} ${bins} ${libs} ; do - [[ -e "${ROOT}${t}" ]] || die -q "\"${t}\" listed as target does not exist" - - pushd "$(dirname ${ROOT}${t})" 1>/dev/null - local ts=$(basename "${t}") - local tt="${ts//-${version}}" - tt="${tt//${suffix}}" - ln -s ${ts} ${tt} || die -q "Couldn't create symlink \"$(pwd)/${tt}\"" - popd 1>/dev/null - done - - [[ -d "${ROOT}${includes}" ]] || die -q "\"${includes}\" does not exist" - pushd "${ROOT}/usr/include" 1>/dev/null - ln -s ${includes//\/usr\/include\/} boost || die -q "Couldn't create symlink \"/usr/include/boost\"" - popd 1>/dev/null - - local python_module - for python_module in ${python_modules} ; do - local target_python_module="${python_module#*:}" - local wrapper_python_module="${python_module%:*}" - echo "from ${target_python_module} import *" > "${ROOT}${wrapper_python_module}" || die -q "Couldn't create wrapper python module \"$(pwd)/${wrapper_python_module}\"" - done - - # Deprecated code for older versions of Boost. - for t in ${python} ; do - pushd "$(dirname ${ROOT}${t})/.." 1>/dev/null - local ts="$(basename $(dirname ${ROOT}${t}))/${t//*\/}" - ts="${ts//${suffix}}" - local tt=${t//*\/} - ln -s "${ts}" "${tt}" || die -q "Couldn't create symlink \"$(pwd)/${tt}\"" - popd 1>/dev/null - done -} - -### show action ### - -describe_show() { - echo "Show the current boost version used" -} - -do_show() { - local include - - write_list_start "Current boost version:" - if [[ -L "${ROOT}"/usr/include/boost ]] ; then - include=$(basename $(dirname $(canonicalise "${ROOT}"/usr/include/boost ))) - write_kv_list_entry "${include%/}" "" - else - write_kv_list_entry "(unset)" "" - fi -} - -### list action ### - -describe_list() { - echo "List available boost versions" -} - -do_list() { - local targets=( $(find_targets ) ) - write_list_start "Available boost versions:" - if [[ -n "${targets[@]}" ]] ; then - local i - local active_slot=$(canonicalise "${ROOT}/etc/eselect/boost/active") - active_slot=${active_slot/"${ROOT}/usr/share/boost-eselect/profiles/"/boost-} - for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do - if [[ "${targets[${i}]}" == ${active_slot} ]] ; then - targets[${i}]="${targets[${i}]} $(highlight '*' )" - fi - done - write_numbered_list "${targets[@]}" - else - write_kv_list_entry "(none found)" "" - fi -} - -### set action ### - -describe_set() { - echo "Set a new boost version" -} - -describe_set_parameters() { - echo "<target>" -} - -describe_set_options() { - echo "target : Target name or number (from 'list' action)" -} - -do_set() { - if [[ -z "${1}" ]] ; then - # no parameter - die -q "You didn't tell me what to set the version to" - fi - - local target="${1}" - if is_number "${target}" ; then - targets=($(find_targets)) - target="${targets[$((${target} - 1))]}" - fi - - remove_installation - set_installation "${target}" -} - -### update action ### - -describe_update() { - echo "Automatically update boost version used" -} - -do_update() { - # set default profile - profile="default" - - # extract profile if there's already one boost version selected - if [ -L "${ROOT}"/etc/eselect/boost/active ] ; then - profile=$(basename $(canonicalise "${ROOT}/etc/eselect/boost/active")) - fi - - echo "Previously selected profile: ${profile}" - - remove_installation - - local targets=($(find_targets)) - [[ ${#targets[@]} -gt 0 ]] || die -q "No slotted boost version found" - - # contains surely the highest available version, but maybe not the right profile - local last_target="${targets[@]:(-1)}" - # strip profile - local target_version="${last_target//\/*}" - - # in case the previously used profile isn't available anymore - local target="${target_version}/default" - local matching_profile_found=0 - for (( i = 0 ; i < ${#targets[@]} ; i = i + 1 )) ; do - if [[ "${targets[${i}]}" == "${target_version}/${profile}" ]] ; then - target="${targets[${i}]}" - matching_profile_found=1 - break - fi - done - - if [[ "${matching_profile_found}" == 1 ]] ; then - echo "Found a matching profile \"${profile}\" for the new version." - else - echo "Didn't find the previously selected profile \"${profile}\" for the new version. Resetting to \"default\"." - fi - - set_installation "${target}" -} |