diff options
author | George Shapovalov <george@gentoo.org> | 2008-04-14 14:54:21 +0000 |
---|---|---|
committer | George Shapovalov <george@gentoo.org> | 2008-04-14 14:54:21 +0000 |
commit | a65fec3b5a75b9fe6c1b8ee230b3907110510633 (patch) | |
tree | 3b9bfc117ac9f6e16ac84f9a5bb01c4e384de108 /eclass | |
parent | split profile validity check off the get_active_gnat and made the update acti... (diff) | |
download | gentoo-2-a65fec3b5a75b9fe6c1b8ee230b3907110510633.tar.gz gentoo-2-a65fec3b5a75b9fe6c1b8ee230b3907110510633.tar.bz2 gentoo-2-a65fec3b5a75b9fe6c1b8ee230b3907110510633.zip |
changed pkg_postrm to automatically deactivate unmerged gnat profile
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/gnatbuild.eclass | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/eclass/gnatbuild.eclass b/eclass/gnatbuild.eclass index 0b1dccc3304c..e3a2814c4bfb 100644 --- a/eclass/gnatbuild.eclass +++ b/eclass/gnatbuild.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.38 2008/04/12 07:47:00 george Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.39 2008/04/14 14:54:21 george Exp $ # # Author: George Shapovalov <george@gentoo.org> # Belongs to: ada herd <ada@gentoo.org> @@ -200,9 +200,7 @@ should_we_eselect_gnat() { curr_config=$(eselect --no-color gnat show | grep ${CTARGET} | awk '{ print $1 }') || return 0 [[ -z ${curr_config} ]] && return 0 - # extraction of profile prats and all the relevant logic of toolchain.eclass - # is contained here in SLOT and PN vars. The answer basically is, whether - # we have the same profile. A new one should not be enacted + # The logic is basically "try to keep the same profile if possible" if [[ ${curr_config} == ${CTARGET}-${PN}-${SLOT} ]] ; then return 0 @@ -285,6 +283,8 @@ gnatbuild_pkg_setup() { gnatbuild_pkg_postinst() { if should_we_eselect_gnat; then do_gnat_config + else + eselect gnat update fi # if primary compiler list is empty, add this profile to the list, so @@ -302,10 +302,12 @@ gnatbuild_pkg_postinst() { gnatbuild_pkg_postrm() { - elog "If you are removing the last version of gnat in this SLOT, please manually run:" - elog " rm /etc/env.d/55gnat-*" - elog "(running this automatically from every pgk_postrm will break" - elog "configuration in case an update was performed)." + # "eselect gnat update" now removes the env.d file if the corresponding + # gnat profile was unmerged + eselect gnat update + elog "If you just unmerged the last gnat in this SLOT, your active gnat" + elog "profile got unset. Please check what eselect gnat show tells you" + elog "and set the desired profile" } #---->> pkg_* <<---- |