commit:     a81174869edd49d24b65e6d4f48394318b79cb98
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Oct 21 15:20:42 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Oct 21 15:20:42 2017 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=a8117486

kde-plasma/kwallet-pam: Simplify pkg_postinst

SDDM needs no manual fiddling these days. Anyone else
can look up the provided KDE Wiki link.

Package-Manager: Portage-2.3.12, Repoman-2.3.3

 .../kwallet-pam/kwallet-pam-5.11.49.9999.ebuild    | 22 +---------------------
 kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild     | 22 +---------------------
 2 files changed, 2 insertions(+), 42 deletions(-)

diff --git a/kde-plasma/kwallet-pam/kwallet-pam-5.11.49.9999.ebuild 
b/kde-plasma/kwallet-pam/kwallet-pam-5.11.49.9999.ebuild
index 7025612609..ac6ac2fa98 100644
--- a/kde-plasma/kwallet-pam/kwallet-pam-5.11.49.9999.ebuild
+++ b/kde-plasma/kwallet-pam/kwallet-pam-5.11.49.9999.ebuild
@@ -27,27 +27,7 @@ src_configure() {
 }
 
 pkg_postinst() {
-       check_dm() {
-               if [[ -e "${ROOT}${2}" ]] ; then
-                       if grep -Eq "auth\s+optional\s+pam_kwallet5.so" 
"${ROOT}${2}" && \
-                               grep -Eq "session\s+optional\s+pam_kwallet5.so" 
"${ROOT}${2}" ; then
-                               elog "    ${1} - ${2} ...GOOD"
-                       else
-                               ewarn "    ${1} - ${2} ...BAD"
-                       fi
-               fi
-       }
+       kde5_pkg_postinst
        elog "This package enables auto-unlocking of kde-frameworks/kwallet:5."
-       elog "List of things to make it work:"
-       elog "1.  Use standard blowfish encryption instead of GPG"
-       elog "2.  Use same password for login and kwallet"
-       elog "3.  A display manager with support for PAM"
-       elog "4.a Have the following lines in the display manager's pam.d file:"
-       elog "    -auth        optional        pam_kwallet5.so"
-       elog "    -session     optional        pam_kwallet5.so auto_start"
-       elog "4.b Checking installed DMs..."
-       has_version "x11-misc/sddm" && check_dm "SDDM" "/etc/pam.d/sddm"
-       has_version "x11-misc/lightdm" && check_dm "LightDM" 
"/etc/pam.d/lightdm"
-       elog
        elog "See also: https://wiki.gentoo.org/wiki/KDE#KWallet_auto-unlocking";
 }

diff --git a/kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild 
b/kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild
index 7025612609..ac6ac2fa98 100644
--- a/kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild
+++ b/kde-plasma/kwallet-pam/kwallet-pam-9999.ebuild
@@ -27,27 +27,7 @@ src_configure() {
 }
 
 pkg_postinst() {
-       check_dm() {
-               if [[ -e "${ROOT}${2}" ]] ; then
-                       if grep -Eq "auth\s+optional\s+pam_kwallet5.so" 
"${ROOT}${2}" && \
-                               grep -Eq "session\s+optional\s+pam_kwallet5.so" 
"${ROOT}${2}" ; then
-                               elog "    ${1} - ${2} ...GOOD"
-                       else
-                               ewarn "    ${1} - ${2} ...BAD"
-                       fi
-               fi
-       }
+       kde5_pkg_postinst
        elog "This package enables auto-unlocking of kde-frameworks/kwallet:5."
-       elog "List of things to make it work:"
-       elog "1.  Use standard blowfish encryption instead of GPG"
-       elog "2.  Use same password for login and kwallet"
-       elog "3.  A display manager with support for PAM"
-       elog "4.a Have the following lines in the display manager's pam.d file:"
-       elog "    -auth        optional        pam_kwallet5.so"
-       elog "    -session     optional        pam_kwallet5.so auto_start"
-       elog "4.b Checking installed DMs..."
-       has_version "x11-misc/sddm" && check_dm "SDDM" "/etc/pam.d/sddm"
-       has_version "x11-misc/lightdm" && check_dm "LightDM" 
"/etc/pam.d/lightdm"
-       elog
        elog "See also: https://wiki.gentoo.org/wiki/KDE#KWallet_auto-unlocking";
 }

Reply via email to