1 |
george 08/04/14 14:54:22 |
2 |
|
3 |
Modified: gnatbuild.eclass |
4 |
Log: |
5 |
changed pkg_postrm to automatically deactivate unmerged gnat profile |
6 |
|
7 |
Revision Changes Path |
8 |
1.39 eclass/gnatbuild.eclass |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/gnatbuild.eclass?rev=1.39&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/gnatbuild.eclass?rev=1.39&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/gnatbuild.eclass?r1=1.38&r2=1.39 |
13 |
|
14 |
Index: gnatbuild.eclass |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v |
17 |
retrieving revision 1.38 |
18 |
retrieving revision 1.39 |
19 |
diff -u -r1.38 -r1.39 |
20 |
--- gnatbuild.eclass 12 Apr 2008 07:47:00 -0000 1.38 |
21 |
+++ gnatbuild.eclass 14 Apr 2008 14:54:21 -0000 1.39 |
22 |
@@ -1,6 +1,6 @@ |
23 |
# Copyright 1999-2006 Gentoo Foundation |
24 |
# Distributed under the terms of the GNU General Public License v2 |
25 |
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.38 2008/04/12 07:47:00 george Exp $ |
26 |
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnatbuild.eclass,v 1.39 2008/04/14 14:54:21 george Exp $ |
27 |
# |
28 |
# Author: George Shapovalov <george@g.o> |
29 |
# Belongs to: ada herd <ada@g.o> |
30 |
@@ -200,9 +200,7 @@ |
31 |
curr_config=$(eselect --no-color gnat show | grep ${CTARGET} | awk '{ print $1 }') || return 0 |
32 |
[[ -z ${curr_config} ]] && return 0 |
33 |
|
34 |
- # extraction of profile prats and all the relevant logic of toolchain.eclass |
35 |
- # is contained here in SLOT and PN vars. The answer basically is, whether |
36 |
- # we have the same profile. A new one should not be enacted |
37 |
+ # The logic is basically "try to keep the same profile if possible" |
38 |
|
39 |
if [[ ${curr_config} == ${CTARGET}-${PN}-${SLOT} ]] ; then |
40 |
return 0 |
41 |
@@ -285,6 +283,8 @@ |
42 |
gnatbuild_pkg_postinst() { |
43 |
if should_we_eselect_gnat; then |
44 |
do_gnat_config |
45 |
+ else |
46 |
+ eselect gnat update |
47 |
fi |
48 |
|
49 |
# if primary compiler list is empty, add this profile to the list, so |
50 |
@@ -302,10 +302,12 @@ |
51 |
|
52 |
|
53 |
gnatbuild_pkg_postrm() { |
54 |
- elog "If you are removing the last version of gnat in this SLOT, please manually run:" |
55 |
- elog " rm /etc/env.d/55gnat-*" |
56 |
- elog "(running this automatically from every pgk_postrm will break" |
57 |
- elog "configuration in case an update was performed)." |
58 |
+ # "eselect gnat update" now removes the env.d file if the corresponding |
59 |
+ # gnat profile was unmerged |
60 |
+ eselect gnat update |
61 |
+ elog "If you just unmerged the last gnat in this SLOT, your active gnat" |
62 |
+ elog "profile got unset. Please check what eselect gnat show tells you" |
63 |
+ elog "and set the desired profile" |
64 |
} |
65 |
#---->> pkg_* <<---- |
66 |
|
67 |
|
68 |
|
69 |
|
70 |
-- |
71 |
gentoo-commits@l.g.o mailing list |