From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2B2AFou0p2AwPAAAgWs5BA (envelope-from ) for ; Fri, 21 May 2021 15:24:27 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id SBw0Eou0p2DkSQAAB5/wlQ (envelope-from ) for ; Fri, 21 May 2021 13:24:27 +0000 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 AB81513488 for ; Fri, 21 May 2021 15:24:26 +0200 (CEST) Received: from localhost ([::1]:38624 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lk58a-0003T6-B1 for larch@yhetil.org; Fri, 21 May 2021 09:24:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk58E-0003S0-Pa for bug-guix@gnu.org; Fri, 21 May 2021 09:24:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52743) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lk58E-0004NC-I9 for bug-guix@gnu.org; Fri, 21 May 2021 09:24:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lk58E-0001a9-Aq for bug-guix@gnu.org; Fri, 21 May 2021 09:24:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#48561: "Daemon not running" exception when avahi-daemon is not running Resent-From: Mathieu Othacehe Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 21 May 2021 13:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48561 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxime Devos Received: via spool by 48561-submit@debbugs.gnu.org id=B48561.16216034006030 (code B ref 48561); Fri, 21 May 2021 13:24:02 +0000 Received: (at 48561) by debbugs.gnu.org; 21 May 2021 13:23:20 +0000 Received: from localhost ([127.0.0.1]:36056 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk57Y-0001ZB-H4 for submit@debbugs.gnu.org; Fri, 21 May 2021 09:23:20 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37686) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lk57U-0001Yw-Ev for 48561@debbugs.gnu.org; Fri, 21 May 2021 09:23:19 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:42338) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lk57O-0004Jx-71; Fri, 21 May 2021 09:23:10 -0400 Received: from [2a01:e0a:19b:d9a0:f2f7:a404:c3d3:f8b4] (port=50342 helo=meije) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lk57N-0000TQ-Sw; Fri, 21 May 2021 09:23:10 -0400 From: Mathieu Othacehe References: <2d3636af080e6bcddc6ba94dc162260c0e73ed54.camel@telenet.be> Date: Fri, 21 May 2021 15:23:08 +0200 In-Reply-To: <2d3636af080e6bcddc6ba94dc162260c0e73ed54.camel@telenet.be> (Maxime Devos's message of "Fri, 21 May 2021 10:48:53 +0200") Message-ID: <87im3cqkzn.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: , Cc: 48561@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621603467; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: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; bh=82RmYVN7pcvqpuJIgyIjtXCM+c82nehE948z0mTjlT0=; b=gqiItmD+yDkJNT9NcIIA85Kxw3hCxLs/xLeF+NowJzmbYKaAJFsuDAScS9IdNOnILazWKP 8bp5ZOFhqUYWyHGfVozeSqovV2RCJaggCcTwY3SzlMvsJNf/mjiXQFJZZIxJUDKmM0R9x3 NsMlzVWctOjbL8547v0ToSPjOiPkIEG3GQZ0jytTKdQ97IK5770JRfWTggP0pVRQYSOYKT zv/JFNgSdFAJGC2Jt8KgQGWHCzwyN0YDdAX8mlIEcDJtdfiA8pVYQNgR3LhclvekzCk5ys 1CKKTOeRuWahwiOBkIuCAd0dbqCuiOJhwTThnXeySBSlGq0hacTwMlSL7LB8bw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621603467; a=rsa-sha256; cv=none; b=dova6B71owACihPgQ2Pi7bFE9w25zYNc3yswEU9TP7XrdLnt6k6DytWlYl6kLMMwiLhmfL UXK9omf9bNDHswOKyLoWydNuHxrMHp2XMXzmf8x/ONz+YWqchxY195+MXz7K2Encks23AR yOXQjVTB/8QCPpO+yO1VbT75l+h/QHiMxDWg19MuVspVuVgIrt/kse8vESjO76TQAW9vKg D/FPiTrQG+oGW393KITru+j8vG1/JonBaAGrmtLkrtC17Og7VQNXPaY+iBUU9ZTv+Wa8Y5 5t+zg1rIwgMojVAjgOJ4pRHBCOGTfxNSZRWK3pLvRaPFB3fkOdQf6OivlPvoUQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.94 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: AB81513488 X-Spam-Score: -2.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZCJnlPvwGxPn --=-=-= Content-Type: text/plain Hello Maxime, > warning: avahi daemon is not running, cannot auto-discover substitute servers! This should be fixed with the attached patch. Thanks, Mathieu --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-scripts-discover-Warn-when-the-daemon-is-unreachable.patch Content-Transfer-Encoding: quoted-printable >From a50bbf99f65d26bbdb0d16112a49335bf913b822 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 21 May 2021 15:21:15 +0200 Subject: [PATCH] scripts: discover: Warn when the daemon is unreachable. * guix/scripts/discover (guix-discover): Print a warning message when the daemon is unreachable. --- guix/scripts/discover.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/guix/scripts/discover.scm b/guix/scripts/discover.scm index be1eaa6e95..e42f7662d0 100644 --- a/guix/scripts/discover.scm +++ b/guix/scripts/discover.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright =C2=A9 2020 Mathieu Othacehe +;;; Copyright =C2=A9 2020, 2021 Mathieu Othacehe ;;; Copyright =C2=A9 2021 Simon Tournier ;;; ;;; This file is part of GNU Guix. @@ -26,6 +26,7 @@ #:use-module (guix build syscalls) #:use-module (guix build utils) #:use-module (guix scripts publish) + #:use-module (avahi) #:use-module (ice-9 rdelim) #:use-module (srfi srfi-37) #:export (read-substitute-urls @@ -138,5 +139,13 @@ to synchronize with the writer." (parameterize ((%publish-file publish-file)) (mkdir-p (dirname publish-file)) (false-if-exception (delete-file publish-file)) - (avahi-browse-service-thread service-proc - #:types %services))))) + (catch 'avahi-error + (lambda () + (avahi-browse-service-thread service-proc + #:types %services)) + (lambda (key err function . _) + (cond + ((eq? err error/no-daemon) + (warning (G_ "Avahi daemon is not running, \ +cannot auto-discover substitutes servers.~%")))) + (exit 1))))))) --=20 2.31.1 --=-=-=--