From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id gAp3OptLVWRwZwAASxT56A (envelope-from ) for ; Fri, 05 May 2023 20:31:56 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sJo0OptLVWQbRQEA9RJhRA (envelope-from ) for ; Fri, 05 May 2023 20:31:55 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id C502011FEE for ; Fri, 5 May 2023 20:31:55 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pv0C0-0005DN-HQ; Fri, 05 May 2023 14:30:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pv0Bv-0005Az-9Y for bug-guix@gnu.org; Fri, 05 May 2023 14:30:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pv0Bv-0005uu-0k for bug-guix@gnu.org; Fri, 05 May 2023 14:30:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pv0Bu-0003AR-Sn for bug-guix@gnu.org; Fri, 05 May 2023 14:30:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#63082: [PATCH v3 02/16] services: mpd: Add an 'update' action to trigger a database update. Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 05 May 2023 18:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63082 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 63082@debbugs.gnu.org Cc: Maxim Cournoyer Received: via spool by 63082-submit@debbugs.gnu.org id=B63082.168331137611924 (code B ref 63082); Fri, 05 May 2023 18:30:02 +0000 Received: (at 63082) by debbugs.gnu.org; 5 May 2023 18:29:36 +0000 Received: from localhost ([127.0.0.1]:57472 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BU-00036F-7n for submit@debbugs.gnu.org; Fri, 05 May 2023 14:29:36 -0400 Received: from mail-qt1-f170.google.com ([209.85.160.170]:59852) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pv0BR-00035M-20 for 63082@debbugs.gnu.org; Fri, 05 May 2023 14:29:33 -0400 Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-3f0596e2c00so10046841cf.3 for <63082@debbugs.gnu.org>; Fri, 05 May 2023 11:29:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683311367; x=1685903367; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aF8Y+2+ZyVx5UW/zOLlL+v0Sh0dgY6Sxnn88k3JrNQo=; b=fPTUc/ph0jy8hExDidcuV+Z3WugnKJPm0gReZ+YKFkReYl0PK19rmm8l23Uv9K2rJA HaeTBG1U9sZQNLg/lfcpxf4LfxME9GzF85VnhC13JXEiY0s//tbFXGNCCcfKFqZZhkrj 9gIe57n1MoBAtirdQ0xFzJT1TcsnvRslQFtSCEeJY2Cb08J80409aiOqD/k6oj/IelmR e7gtR30accX/rlWKc86vkvyIy2xUBl6g+zBbVZvIuYDwlJJIUWS2CnCVR122hkumhAiW F2tF+NhYKjxr08Fv8TOlNjOSGlOvWRRccaTeEalXoyMkbHQgKbbZkCZxVmUZX51xzNKc w0kg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683311367; x=1685903367; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aF8Y+2+ZyVx5UW/zOLlL+v0Sh0dgY6Sxnn88k3JrNQo=; b=kA0j2voMMxFzO6zCi2GAzG1tK3ev5upHsGsjWoauKXsshMH2MiOi+MmKzF+oyYOf/i 6bhTEfKoT18a1UFUI6k1fRpN5nPHPfhx4lMHT0vhfiGwj9CPTpRaGnOf5NV3Qm1yhztO 9KPThHtn0aatcJxJxSX/bKTlveDhKfJXLGF/LQhURb2dYBRMzsUVtZWfYBLDCN8Sm0IR 6/CxzIV/basIYIQZBdK3L9tHR2t6M/KN3QrubqS6KYoQgdXzg4kB0k+Fcx1w8ZtEsxd9 GH3RCgxkTFe1IRG0oacytrVqTohx0y9RK2ejv0vUrZjrRX0duy4bpMO2lb407FZ/OaIh RP0w== X-Gm-Message-State: AC+VfDwIxbB7LQ+8dl9LPZNj4pQcromq+Ieg6FQKQjYuFBvgMHtnQ4QS q7qQu1ryoh4btzRo18uZurIK/qz5lSw= X-Google-Smtp-Source: ACHHUZ7vvtiJRitMkA2QfvImw8oIWUuFAd3WrdwHCAWO0FWL4q5YmhSF0RUlJ/jXu8gs/7wfK2s4rg== X-Received: by 2002:ac8:7f47:0:b0:3ee:8baf:29bf with SMTP id g7-20020ac87f47000000b003ee8baf29bfmr4366852qtk.42.1683311367361; Fri, 05 May 2023 11:29:27 -0700 (PDT) Received: from localhost.localdomain (dsl-205-236-230-162.b2b2c.ca. [205.236.230.162]) by smtp.gmail.com with ESMTPSA id c1-20020ac81e81000000b003e97fe68511sm834399qtm.3.2023.05.05.11.29.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 May 2023 11:29:26 -0700 (PDT) From: Maxim Cournoyer Date: Fri, 5 May 2023 14:28:57 -0400 Message-Id: <685ac37d86b0e8eb135c5e40aa1f89240c2b4934.1683299529.git.maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1683311515; a=rsa-sha256; cv=none; b=ZgD+cO6A6wmrpMXCMZ1hrITAyAC72eKm4gcIii9Mn5VxSzFx28Q1EfQYdbNdjfNLiTYqcq LLF0pEG983EVHgofwAPH57nINPDBqYSxaAlTKTljwu9ZRPQJ2TJmxESui4GauaqZ4+rAGL 8ovlIilLeKkap2XGOIZsqJwFpZkUAmfeyJq0dBcJV2klphKIQTozb+e9D/Z8OxH/eSJ87k rtRRcXQVlDJppDcN4JVmIurcGkcsOZMr1an7b6e8bgIQcW3QaMVZwv8REHgXWyRaiIvala Demb8Au+GJdBB2Mt8a0lPRYMF5gzUaH1bn3PdxUtyROMvpeiTgquKCrAcrxNUA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="fPTUc/ph"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1683311515; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=aF8Y+2+ZyVx5UW/zOLlL+v0Sh0dgY6Sxnn88k3JrNQo=; b=DMXrGEP4UBntMG/3KrBKc/L2Awz/FO97mzK38QupVLip19VXQJGma221pbUky1OljuIaSb W6b8gV7FF6G1q2Pn2aIHj4x5p366YrAeT86A98j/65ZDtbikruH5gHS1XbxKmMHneRvlZw n7gjzw+VAQnKF6ey6VEw1b3vG3zXFZSgMrmiZzZ51rEh2shVLpiaOZ99Ff8AZD6Y9+Kh8+ Cv2k6ECBiMSJi1L79sLiGj/X2vUGGooxraWIDMCqQkCzrYheUVtPllemK8npNXu7Iw2anz 1E9Kvkq6q5pcSnr0nP3thj+1AnoiMKAGd75eeIx8hKHBf18eShL4jcn4VBXFBw== X-Migadu-Spam-Score: -2.70 X-Spam-Score: -2.70 X-Migadu-Queue-Id: C502011FEE X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b="fPTUc/ph"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-TUID: P/Y8Aio7pYJy * gnu/services/audio.scm (mpd-shepherd-service): Register a new update action. * doc/guix.texi (Audio Services): Document it. --- doc/guix.texi | 10 ++++++++++ gnu/services/audio.scm | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 66eb44812d..d68d7dd7eb 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -33575,6 +33575,16 @@ Audio Services (port "6666"))) @end lisp +Most MPD clients will trigger a database update upon connecting, but you +can also use the @code{update} action do to so: + +@example +herd update mpd +@end example + +All the MPD configuration fields are documented below, and a more +complex example follows. + @defvar mpd-service-type The service type for @command{mpd} @end defvar diff --git a/gnu/services/audio.scm b/gnu/services/audio.scm index 8c061da47f..6e4ce3f9fb 100644 --- a/gnu/services/audio.scm +++ b/gnu/services/audio.scm @@ -620,6 +620,17 @@ (define (mpd-shepherd-service config) (format #t "Issued SIGHUP to Service MPD (PID ~a)." pid)) + (format #t "Service MPD is not running."))))) + (shepherd-action + (name 'update) + (documentation "Request MPD to update its music database.") + (procedure + #~(lambda (pid) + (if pid + (begin + (invoke #$(file-append mpd-mpc "/bin/mpc") "update") + (format #t "Database update requested for service \ +MPD (PID ~a)." pid)) (format #t "Service MPD is not running."))))))))))) (define (mpd-accounts config) -- 2.39.2