From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QG3wR-00080A-9b for garchives@archives.gentoo.org; Sat, 30 Apr 2011 06:46:17 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 815F71C02D; Sat, 30 Apr 2011 06:45:59 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 5149F1C02D for ; Sat, 30 Apr 2011 06:45:59 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id AEA011B402F for ; Sat, 30 Apr 2011 06:45:58 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 9B4F980509 for ; Sat, 30 Apr 2011 06:45:57 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <6321148ad3c045fc63e9b9e8b53f26a1a1abbc6f.mgorny@gentoo> Subject: [gentoo-commits] dev/mgorny:master commit in: eclass/ X-VCS-Repository: dev/mgorny X-VCS-Files: eclass/systemd.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 6321148ad3c045fc63e9b9e8b53f26a1a1abbc6f Date: Sat, 30 Apr 2011 06:45:57 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: ec4667a60197306e501e48e4dc675ee4 commit: 6321148ad3c045fc63e9b9e8b53f26a1a1abbc6f Author: Micha=C5=82 G=C3=B3rny gentoo org> AuthorDate: Sat Apr 30 06:33:28 2011 +0000 Commit: Micha=C5=82 G=C3=B3rny gentoo org> CommitDate: Sat Apr 30 06:33:28 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Ddev/mgorny.git;a=3D= commit;h=3D6321148a [eclass] Docs. --- eclass/systemd.eclass | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index 5325e68..517026a 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -20,6 +20,7 @@ esac # @FUNCTION: systemd_get_unitdir # @DESCRIPTION: # Output the path for the systemd unit directory (not including ${D}). +# This function always succeeds, even if systemd is not installed. systemd_get_unitdir() { debug-print-function ${FUNCNAME} "${@}" =20 @@ -29,7 +30,8 @@ systemd_get_unitdir() { # @FUNCTION: systemd_dounit # @USAGE: unit1 [...] # @DESCRIPTION: -# Install systemd unit(s). +# Install systemd unit(s). Uses doins, thus it is fatal in EAPI 4 +# and non-fatal in earlier EAPIs. systemd_dounit() { debug-print-function ${FUNCNAME} "${@}" =20 @@ -43,9 +45,13 @@ systemd_dounit() { # @USAGE: target service # @DESCRIPTION: # Enable service in desired target, e.g. install a symlink for it. +# Uses dosym, thus it is fatal in EAPI 4 and non-fatal in earlier +# EAPIs. systemd_enable_service() { debug-print-function ${FUNCNAME} "${@}" =20 + [[ ${#} -eq 2 ]] || die "Synopsis: systemd_enable_service target servic= e" + local target=3D${1} local service=3D${2} local ud=3D$(systemd_get_unitdir) @@ -57,7 +63,8 @@ systemd_enable_service() { # @FUNCTION: systemd_with_unitdir # @DESCRIPTION: # Output '--with-systemdsystemunitdir' as expected by systemd-aware conf= igure -# scripts. +# scripts. This function always succeeds. Its output may be quoted in or= der +# to preserve whitespace in paths. systemd_with_unitdir() { debug-print-function ${FUNCNAME} "${@}" =20