From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-1278242-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id F0E991382C5
	for <garchives@archives.gentoo.org>; Tue,  4 May 2021 16:05:22 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 55DCBE070D;
	Tue,  4 May 2021 16:05:22 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 36D89E069C
	for <gentoo-commits@lists.gentoo.org>; Tue,  4 May 2021 16:05:22 +0000 (UTC)
Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id 513E333BE3B
	for <gentoo-commits@lists.gentoo.org>; Tue,  4 May 2021 16:05:21 +0000 (UTC)
Received: from localhost.localdomain (localhost [IPv6:::1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id CC826729
	for <gentoo-commits@lists.gentoo.org>; Tue,  4 May 2021 16:05:19 +0000 (UTC)
From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" <asturm@gentoo.org>
Message-ID: <1620143772.2b64abf82a29fef9dfe1f2a5e9c5ad4d099bb4ce.asturm@gentoo>
Subject: [gentoo-commits] proj/kde:master commit in: media-sound/amarok/
X-VCS-Repository: proj/kde
X-VCS-Files: media-sound/amarok/amarok-9999.ebuild
X-VCS-Directories: media-sound/amarok/
X-VCS-Committer: asturm
X-VCS-Committer-Name: Andreas Sturmlechner
X-VCS-Revision: 2b64abf82a29fef9dfe1f2a5e9c5ad4d099bb4ce
X-VCS-Branch: master
Date: Tue,  4 May 2021 16:05:19 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
X-Archives-Salt: a3dfe046-e3ca-4228-88f3-a14accd386b7
X-Archives-Hash: bef6833c141892e9d488d8506d9cc3fa

commit:     2b64abf82a29fef9dfe1f2a5e9c5ad4d099bb4ce
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue May  4 15:15:54 2021 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue May  4 15:56:12 2021 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=2b64abf8

media-sound/amarok: Unclutter pkg_postinst() message

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

 media-sound/amarok/amarok-9999.ebuild | 36 ++++++++++++++++++-----------------
 1 file changed, 19 insertions(+), 17 deletions(-)

diff --git a/media-sound/amarok/amarok-9999.ebuild b/media-sound/amarok/amarok-9999.ebuild
index 397a86c538..40c1222c75 100644
--- a/media-sound/amarok/amarok-9999.ebuild
+++ b/media-sound/amarok/amarok-9999.ebuild
@@ -111,25 +111,27 @@ pkg_postinst() {
 		echo "${1} ($(has_version ${1} || echo "not ")installed)"
 	}
 
+	db_name() {
+		use mariadb && echo "MariaDB" || echo "MySQL"
+	}
+
 	optfeature "Audio CD support" kde-apps/audiocd-kio
 
-	if [[ -z "${REPLACING_VERSIONS}" ]]; then
-		elog "You'll have to configure amarok to use an external database server:"
-		if use mariadb ; then
-			elog "    $(pkg_is_installed dev-db/mariadb)"
-			elog "    For preliminary configuration of MariaDB Server please refer to"
-			elog "    https://wiki.gentoo.org/wiki/MariaDB#Configuration"
-		else
-			elog "    $(pkg_is_installed dev-db/mysql)"
-			elog "    For preliminary configuration of MySQL Server please refer to"
-			elog "    https://wiki.gentoo.org/wiki/MySQL#Configuration"
-		fi
-		elog "Please read https://community.kde.org/Amarok/Community/MySQL for details on how"
-		elog "to configure the external database and migrate your data from the embedded database."
-		elog "To create external amarok database with default user/password please:"
-		elog "    1. Make sure that MySQL or MariaDB is installed and configured (see above)"
-		elog "    2. Ensure that 'mysql' service is started and then run command 'emerge --config amarok'"
-		elog "    3. On 'Configure Amarok - Database' menu page check 'Use external MySQL database' and press OK"
+	if [[ -z ${REPLACING_VERSIONS} ]]; then
+		elog "You must configure ${PN} to use an external database server."
+		elog " 1. Make sure either MySQL or MariaDB is installed and configured"
+		elog "    Checking local system:"
+		elog "      $(pkg_is_installed dev-db/mariadb)"
+		elog "      $(pkg_is_installed dev-db/mysql)"
+		elog "    For preliminary configuration of $(db_name) Server refer to"
+		elog "    https://wiki.gentoo.org/wiki/$(db_name)#Configuration"
+		elog " 2. Ensure 'mysql' service is started and run:"
+		elog "    # emerge --config amarok"
+		elog " 3. Run ${PN} and go to 'Configure Amarok - Database' menu page"
+		elog "    Check 'Use external MySQL database' and press OK"
+		elog
+		elog "For more information please read:"
+		elog "  https://community.kde.org/Amarok/Community/MySQL"
 	fi
 }