commit:     93ae7daba9c05a6ae74bd320b91c064285190821
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Dec  1 09:40:06 2018 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Dec  1 13:59:23 2018 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=93ae7dab

kde-plasma/plasma-meta: Don't force session manager, add pkg_postinst

1) We don't have to, profiles and deps will do that anyway. Makes QA happy.
2) The informational pkg_postinst is more helpful as it will detect conflicting
session managers after install if they contradict plasma-meta USE settings.

Package-Manager: Portage-2.3.52, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 .../plasma-meta/plasma-meta-5.14.3-r1.ebuild       | 23 +++++++++++++++++++++-
 kde-plasma/plasma-meta/plasma-meta-5.14.4.ebuild   | 23 +++++++++++++++++++++-
 2 files changed, 44 insertions(+), 2 deletions(-)

diff --git a/kde-plasma/plasma-meta/plasma-meta-5.14.3-r1.ebuild 
b/kde-plasma/plasma-meta/plasma-meta-5.14.3-r1.ebuild
index a64a211a705..4d68b770cf6 100644
--- a/kde-plasma/plasma-meta/plasma-meta-5.14.3-r1.ebuild
+++ b/kde-plasma/plasma-meta/plasma-meta-5.14.3-r1.ebuild
@@ -14,7 +14,7 @@ KEYWORDS="~amd64 ~arm ~x86"
 IUSE="bluetooth +browser-integration consolekit crypt +display-manager elogind 
grub gtk +handbook
 +legacy-systray networkmanager pam plymouth +pm-utils pulseaudio +sddm sdk 
systemd +wallpapers"
 
-REQUIRED_USE="^^ ( consolekit elogind systemd )"
+REQUIRED_USE="?? ( consolekit elogind systemd )"
 
 RDEPEND="
        $(add_plasma_dep breeze)
@@ -85,3 +85,24 @@ RDEPEND="
        sdk? ( $(add_plasma_dep plasma-sdk) )
        wallpapers? ( $(add_plasma_dep plasma-workspace-wallpapers) )
 "
+
+pkg_postinst() {
+       local i selected use_pkg_map=(
+               consolekit:sys-auth/consolekit
+               elogind:sys-auth/elogind
+               systemd:sys-apps/systemd
+       )
+       for i in ${use_pkg_map[@]}; do
+               use ${i%:*} && selected="${i%:*}"
+       done
+       for i in ${use_pkg_map[@]}; do
+               if ! use ${i%:*} && has_version ${i#*:}; then
+                       ewarn "An existing installation of ${i#*:} was detected 
even though"
+                       ewarn "${PN} was configured with USE ${selected} 
instead of ${i%:*}."
+                       ewarn "There can only be one session manager at 
runtime, otherwise random issues"
+                       ewarn "may occur. Please make sure USE ${i%:*} is 
nowhere enabled in make.conf"
+                       ewarn "or package.use and remove ${i#*:} before raising 
bugs."
+                       ewarn "For more information, visit 
https://wiki.gentoo.org/wiki/KDE";
+               fi
+       done
+}

diff --git a/kde-plasma/plasma-meta/plasma-meta-5.14.4.ebuild 
b/kde-plasma/plasma-meta/plasma-meta-5.14.4.ebuild
index a64a211a705..4d68b770cf6 100644
--- a/kde-plasma/plasma-meta/plasma-meta-5.14.4.ebuild
+++ b/kde-plasma/plasma-meta/plasma-meta-5.14.4.ebuild
@@ -14,7 +14,7 @@ KEYWORDS="~amd64 ~arm ~x86"
 IUSE="bluetooth +browser-integration consolekit crypt +display-manager elogind 
grub gtk +handbook
 +legacy-systray networkmanager pam plymouth +pm-utils pulseaudio +sddm sdk 
systemd +wallpapers"
 
-REQUIRED_USE="^^ ( consolekit elogind systemd )"
+REQUIRED_USE="?? ( consolekit elogind systemd )"
 
 RDEPEND="
        $(add_plasma_dep breeze)
@@ -85,3 +85,24 @@ RDEPEND="
        sdk? ( $(add_plasma_dep plasma-sdk) )
        wallpapers? ( $(add_plasma_dep plasma-workspace-wallpapers) )
 "
+
+pkg_postinst() {
+       local i selected use_pkg_map=(
+               consolekit:sys-auth/consolekit
+               elogind:sys-auth/elogind
+               systemd:sys-apps/systemd
+       )
+       for i in ${use_pkg_map[@]}; do
+               use ${i%:*} && selected="${i%:*}"
+       done
+       for i in ${use_pkg_map[@]}; do
+               if ! use ${i%:*} && has_version ${i#*:}; then
+                       ewarn "An existing installation of ${i#*:} was detected 
even though"
+                       ewarn "${PN} was configured with USE ${selected} 
instead of ${i%:*}."
+                       ewarn "There can only be one session manager at 
runtime, otherwise random issues"
+                       ewarn "may occur. Please make sure USE ${i%:*} is 
nowhere enabled in make.conf"
+                       ewarn "or package.use and remove ${i#*:} before raising 
bugs."
+                       ewarn "For more information, visit 
https://wiki.gentoo.org/wiki/KDE";
+               fi
+       done
+}

Reply via email to