From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CC3DA138247 for ; Sun, 17 Nov 2013 08:34:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1F76FE0964; Sun, 17 Nov 2013 08:34:08 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 90A29E0964 for ; Sun, 17 Nov 2013 08:34:07 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 47A3C33F198 for ; Sun, 17 Nov 2013 08:34:04 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E9EDCE5459 for ; Sun, 17 Nov 2013 08:34:02 +0000 (UTC) From: "Ryan Hill" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Ryan Hill" Message-ID: <1384677371.ee72b9d8a6cdaaaf30bb876d69bfee1f8ea71f3f.dirtyepic@gentoo> Subject: [gentoo-commits] proj/eselect:extern commit in: modules/ X-VCS-Repository: proj/eselect X-VCS-Files: modules/wxwidgets.eselect X-VCS-Directories: modules/ X-VCS-Committer: dirtyepic X-VCS-Committer-Name: Ryan Hill X-VCS-Revision: ee72b9d8a6cdaaaf30bb876d69bfee1f8ea71f3f X-VCS-Branch: extern Date: Sun, 17 Nov 2013 08:34:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: e1b2bd7e-1969-4c3c-a35f-2500b378f7c5 X-Archives-Hash: 782d9655ac5b28dbc15a225ece57b6b0 commit: ee72b9d8a6cdaaaf30bb876d69bfee1f8ea71f3f Author: Ryan Hill gentoo org> AuthorDate: Sun Nov 17 08:36:11 2013 +0000 Commit: Ryan Hill gentoo org> CommitDate: Sun Nov 17 08:36:11 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=ee72b9d8 Always select a profile if one is available (bug #448074). While setting an empty profile was useful for finding ebuilds not using the eclass, these days we have a repoman warning and a lot less SLOT breakage. Also remove 2.6 support from a couple places and clean up. --- modules/wxwidgets.eselect | 58 +++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 30 deletions(-) diff --git a/modules/wxwidgets.eselect b/modules/wxwidgets.eselect index 62333a2..012eb8e 100644 --- a/modules/wxwidgets.eselect +++ b/modules/wxwidgets.eselect @@ -1,13 +1,12 @@ # -*-eselect-*- vim: ft=eselect -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 inherit config DESCRIPTION="Manage the system default wxWidgets profile" MAINTAINER="wxwidgets@gentoo.org" -SVN_DATE='$Date$' -VERSION=$(svn_date_to_version "${SVN_DATE}") +VERSION="20131117" WXCONFFILE="${EROOT}"/var/lib/wxwidgets/current WXCONFDIR="${EROOT}"/usr/lib/wx/config @@ -15,14 +14,13 @@ WXCONFDIR="${EROOT}"/usr/lib/wx/config find_targets() { local conf for conf in ${WXCONFDIR}/*; do - [[ -f ${conf} && -x ${conf} ]] && basename ${conf} + [[ -e ${conf} ]] && basename ${conf} done } set_config() { local target="${1}" targets - # selected by number if is_number "${target}"; then targets=( $(find_targets) ) [[ ${1} -ge 1 && ${1} -le ${#targets[@]} ]] \ @@ -30,12 +28,15 @@ set_config() { target=${targets[$(( ${target} - 1 ))]} fi + # we shouldn't change the profile to "none" if there are available configs + # this can happen if WXCONFFILE got deleted somehow if [[ ${target} == "none" ]]; then - # none is a special case - : - else - [[ ! -f ${WXCONFDIR}/${target} ]] && \ - die -q "\"${1}\" doesn't appear to be a valid profile name" + targets=( $(find_targets) ) + [[ ${#targets[@]} -ge 1 ]] && target=${targets[0]} + fi + + if [[ ! ${target} == "none" && ! -e ${WXCONFDIR}/${target} ]]; then + die -q "\"${1}\" doesn't appear to be a valid profile name" fi echo @@ -90,7 +91,6 @@ describe_list() { do_list() { local i targets currconf - # targets is an array containing names of available configs targets=( $(find_targets) ) [[ -e ${WXCONFFILE} ]] && currconf=$(load_config ${WXCONFFILE} WXCONFIG) @@ -110,7 +110,7 @@ describe_set() { } describe_set_options() { - echo " : Profile name or number (from 'list' action)" + echo " : Profile name or number (from 'list')" } describe_set_parameters() { @@ -121,8 +121,8 @@ do_set() { [[ ! ${#@} -eq 1 ]] \ && die -q "You must specify a profile name or number" - [[ -w "${EROOT}"/var/lib ]] \ - || die -q "You need write permission to /var/lib to perform this action." + [[ ! -w "${EROOT}"/var/lib/ ]] \ + && die -q "You need write permission to /var/lib to perform this action." set_config "${1}" } @@ -136,9 +136,6 @@ do_update() { currconf=$(load_config ${WXCONFFILE} WXCONFIG) - # if current config is "none" leave it alone - [[ ${currconf} == none ]] && return 0 - # if current config is valid leave it alone [[ -e ${WXCONFDIR}/${currconf} ]] && return 0 @@ -202,7 +199,7 @@ do_update() { ;; ver) - for opt in 2.9 2.8 2.6; do + for opt in 2.9 2.8; do if [[ ${opt} == ${wxver[0]} ]]; then continue else @@ -216,11 +213,10 @@ do_update() { # Now we iterate through all the installed configs and find the closest match # ( debug -> char -> toolkit -> ver ) - # meaning w/ a current config of gtk2-unicode-debug-2.6, it will pick - # gtk2-unicode-release-2.6 before - # gtk2-ansi-debug-2.6 before - # base-unicode-debug-2.6 before - # gtk2-unicode-debug-2.8 + # meaning w/ a current config of gtk2-unicode-debug-2.8, it will pick + # gtk2-unicode-release-2.8 before + # base-unicode-debug-2.8 before + # gtk2-unicode-2.9 local d c t v checkconf foundconf @@ -228,7 +224,7 @@ do_update() { for (( t = 0 ; t < ${#wxtoolkit[@]} ; t++ )); do for (( c = 0 ; c < ${#wxchar[@]} ; c++ )); do for (( d = 0 ; d < ${#wxdebug[@]} ; d++ )); do - if [[ ${wxver[$v]} != 2.[6,8] ]]; then + if [[ ${wxver[$v]} != 2.8 ]]; then # >=2.9 doesn't have a debug component checkconf="${wxtoolkit[$t]}-${wxchar[$c]}-${wxver[$v]}" else @@ -245,12 +241,14 @@ do_update() { # nothing installed [[ -z ${foundconf} ]] && foundconf="none" - echo - write_warning_msg "Your currently selected wxWidgets profile: ( ${currconf} )" - write_warning_msg "is no longer available." - write_warning_msg - write_warning_msg "The closest matching profile: ( ${foundconf} )" - write_warning_msg "will be activated in its place." + if [[ ${currconf} != "none" && ${foundconf} != "none" ]]; then + echo + write_warning_msg "Your currently selected wxWidgets profile: ( ${currconf} )" + write_warning_msg "is no longer available." + write_warning_msg + write_warning_msg "The closest matching profile: ( ${foundconf} )" + write_warning_msg "will be activated in its place." + fi do_set ${foundconf} }