Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: x11-misc/slim/
Date: Mon, 25 Jul 2016 14:39:11
Message-Id: 1469457537.128e5981559b7760c537e43574f5936648e236d4.axs@gentoo
1 commit: 128e5981559b7760c537e43574f5936648e236d4
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 25 14:36:41 2016 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 25 14:38:57 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=128e5981
7
8 x11-misc/slim: process ${REPLACING_VERSIONS} as a list
9
10 Bug: http://bugs.gentoo.org/589540
11
12 Package-Manager: portage-2.2.28
13
14 x11-misc/slim/slim-1.3.6-r3.ebuild | 22 +++++++++++++++++++---
15 x11-misc/slim/slim-1.3.6-r5.ebuild | 22 +++++++++++++++++++---
16 x11-misc/slim/slim-9999.ebuild | 32 +++++++++++++++++++++++---------
17 3 files changed, 61 insertions(+), 15 deletions(-)
18
19 diff --git a/x11-misc/slim/slim-1.3.6-r3.ebuild b/x11-misc/slim/slim-1.3.6-r3.ebuild
20 index 72bfdfb..0fd5038 100644
21 --- a/x11-misc/slim/slim-1.3.6-r3.ebuild
22 +++ b/x11-misc/slim/slim-1.3.6-r3.ebuild
23 @@ -87,15 +87,31 @@ src_install() {
24 }
25
26 pkg_postinst() {
27 - # note, $REPLACING_VERSIONS will always contain 0 or 1 PV's for slim
28 - if [[ -z ${REPLACING_VERSIONS} ]]; then
29 + # massage ${REPLACING_VERSIONS} to come up with whether or not it's a new install
30 + # or if it's older than 1.3.2-r7
31 + # Note - there should only ever be zero or one version as this package isn't slotted,
32 + # so the logic doesn't worry about what happens if there's two, due to the case where
33 + # a previous emerge attempt failed in the middle of qmerge.
34 + local rv=none
35 + for rv in ${REPLACING_VERSIONS} ; do
36 + if version_is_at_least "1.3.2-r7" "${rv}" ; then
37 + rv=newer
38 + break;
39 + fi
40 + if version_is_at_least "1.0" "${rv}" ; then
41 + rv=older
42 + break;
43 + fi
44 + done
45 +
46 + if [[ ${rv} == none ]]; then
47 elog
48 elog "The configuration file is located at /etc/slim.conf."
49 elog
50 elog "If you wish ${PN} to start automatically, set DISPLAYMANAGER=\"${PN}\" "
51 elog "in /etc/conf.d/xdm and run \"rc-update add xdm default\"."
52 fi
53 - if ! version_is_at_least "1.3.2-r7" "${REPLACING_VERSIONS:-1.0}" ; then
54 + if [[ ${rv} != newer ]]; then
55 elog
56 elog "By default, ${PN} is set up to do proper X session selection, including ~/.xsession"
57 elog "support, as well as selection between sessions available in"
58
59 diff --git a/x11-misc/slim/slim-1.3.6-r5.ebuild b/x11-misc/slim/slim-1.3.6-r5.ebuild
60 index 7e79bb0..53e9a60 100644
61 --- a/x11-misc/slim/slim-1.3.6-r5.ebuild
62 +++ b/x11-misc/slim/slim-1.3.6-r5.ebuild
63 @@ -90,15 +90,31 @@ src_install() {
64 }
65
66 pkg_postinst() {
67 - # note, $REPLACING_VERSIONS will always contain 0 or 1 PV's for slim
68 - if [[ -z ${REPLACING_VERSIONS} ]]; then
69 + # massage ${REPLACING_VERSIONS} to come up with whether or not it's a new install
70 + # or if it's older than 1.3.2-r7
71 + # Note - there should only ever be zero or one version as this package isn't slotted,
72 + # so the logic doesn't worry about what happens if there's two, due to the case where
73 + # a previous emerge attempt failed in the middle of qmerge.
74 + local rv=none
75 + for rv in ${REPLACING_VERSIONS} ; do
76 + if version_is_at_least "1.3.2-r7" "${rv}" ; then
77 + rv=newer
78 + break;
79 + fi
80 + if version_is_at_least "1.0" "${rv}" ; then
81 + rv=older
82 + break;
83 + fi
84 + done
85 +
86 + if [[ ${rv} == none ]]; then
87 elog
88 elog "The configuration file is located at /etc/slim.conf."
89 elog
90 elog "If you wish ${PN} to start automatically, set DISPLAYMANAGER=\"${PN}\" "
91 elog "in /etc/conf.d/xdm and run \"rc-update add xdm default\"."
92 fi
93 - if ! version_is_at_least "1.3.2-r7" "${REPLACING_VERSIONS:-1.0}" ; then
94 + if [[ ${rv} != newer ]]; then
95 elog
96 elog "By default, ${PN} is set up to do proper X session selection, including ~/.xsession"
97 elog "support, as well as selection between sessions available in"
98
99 diff --git a/x11-misc/slim/slim-9999.ebuild b/x11-misc/slim/slim-9999.ebuild
100 index 86ea64f..bea6571 100644
101 --- a/x11-misc/slim/slim-9999.ebuild
102 +++ b/x11-misc/slim/slim-9999.ebuild
103 @@ -84,15 +84,31 @@ src_install() {
104 }
105
106 pkg_postinst() {
107 - # note, $REPLACING_VERSIONS will always contain 0 or 1 PV's for slim
108 - if [[ -z ${REPLACING_VERSIONS} ]]; then
109 + # massage ${REPLACING_VERSIONS} to come up with whether or not it's a new install
110 + # or if it's older than 1.3.2-r7
111 + # Note - there should only ever be zero or one version as this package isn't slotted,
112 + # so the logic doesn't worry about what happens if there's two, due to the case where
113 + # a previous emerge attempt failed in the middle of qmerge.
114 + local rv=none
115 + for rv in ${REPLACING_VERSIONS} ; do
116 + if version_is_at_least "1.3.2-r7" "${rv}" ; then
117 + rv=newer
118 + break;
119 + fi
120 + if version_is_at_least "1.0" "${rv}" ; then
121 + rv=older
122 + break;
123 + fi
124 + done
125 +
126 + if [[ ${rv} == none ]]; then
127 elog
128 elog "The configuration file is located at /etc/slim.conf."
129 elog
130 elog "If you wish ${PN} to start automatically, set DISPLAYMANAGER=\"${PN}\" "
131 elog "in /etc/conf.d/xdm and run \"rc-update add xdm default\"."
132 fi
133 - if ! version_is_at_least "1.3.6" "${REPLACING_VERSIONS:-1.0}" ; then
134 + if [[ ${rv} != newer ]]; then
135 elog
136 elog "By default, ${PN} is set up to provide X session selection based on the"
137 elog ".desktop entries in /usr/share/xsessions/ that are installed by each"
138 @@ -109,12 +125,10 @@ pkg_postinst() {
139 elog "/usr/share/doc/${PF} and change your login_cmd in /etc/slim.conf"
140 elog "accordingly."
141 elog
142 - if ! version_is_at_least "1.3.2-r7" "${REPLACING_VERSIONS:-1.4}" ; then
143 - ewarn "Please note that slim supports consolekit directly. Please do not use any "
144 - ewarn "old work-arounds (including calls to 'ck-launch-session' in xinitrc scripts)"
145 - ewarn "and enable USE=\"consolekit\" instead."
146 - ewarn
147 - fi
148 + ewarn "Please note that slim supports consolekit directly. Please do not use any "
149 + ewarn "old work-arounds (including calls to 'ck-launch-session' in xinitrc scripts)"
150 + ewarn "and enable USE=\"consolekit\" instead."
151 + ewarn
152 fi
153 if ! use pam; then
154 elog "You have merged ${PN} without USE=\"pam\", this will cause ${PN} to fall back to"