From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id EA4B0385803B for ; Wed, 5 May 2021 20:20:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org EA4B0385803B Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-285-kkv1uqtKP9CtDTmpwXaHwA-1; Wed, 05 May 2021 16:20:39 -0400 X-MC-Unique: kkv1uqtKP9CtDTmpwXaHwA-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 659F31008062; Wed, 5 May 2021 20:20:38 +0000 (UTC) Received: from redhat.com (ovpn-112-75.phx2.redhat.com [10.3.112.75]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 492555D6A8; Wed, 5 May 2021 20:20:38 +0000 (UTC) Received: from fche by redhat.com with local (Exim 4.94) (envelope-from ) id 1leO0a-0007kW-TE; Wed, 05 May 2021 16:20:36 -0400 Date: Wed, 5 May 2021 16:20:36 -0400 From: "Frank Ch. Eigler" To: Mark Wielaard Cc: elfutils-devel@sourceware.org Subject: Re: PATCH: PR27784 debuginfod: notify interactive clients one time about usage Message-ID: <20210505202036.GC22669@redhat.com> References: <20210429184412.GC6131@redhat.com> <4aa0e98c4393f9d30d50b7363b3edc15eb46cd92.camel@klomp.org> MIME-Version: 1.0 In-Reply-To: <4aa0e98c4393f9d30d50b7363b3edc15eb46cd92.camel@klomp.org> User-Agent: Mutt/1.12.0 (2019-05-25) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-13.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: elfutils-devel@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Elfutils-devel mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 May 2021 20:20:43 -0000 Hi - OK, how about this? diff --git a/config/profile.sh.in b/config/profile.sh.in index aa228a0dcd16..aec9e7df30f3 100644 --- a/config/profile.sh.in +++ b/config/profile.sh.in @@ -1,4 +1,18 @@ if [ -n "@DEBUGINFOD_URLS@" ]; then - DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ }@DEBUGINFOD_URLS@" - export DEBUGINFOD_URLS + DEBUGINFOD_URLS="${DEBUGINFOD_URLS-}${DEBUGINFOD_URLS:+ }@DEBUGINFOD_URLS@" + debuginfod_cachedir="${XDG_CACHE_HOME-$HOME/.cache}/debuginfod_client" + notify_p="$debuginfod_cachedir"/notify_p + if [ ! -f "$notify_p" ]; then + msg="NOTICE: This system is configured to auto-download debuginfo from: +$DEBUGINFOD_URLS +NOTICE: Set your \$DEBUGINFOD_URLS differently if desired." + if [ -x /usr/bin/notify-send -a -n "$DISPLAY" ]; then + /usr/bin/notify-send "$msg" + fi + echo "$msg" >&2 + mkdir -p "$debuginfod_cachedir" + touch "$notify_p" + fi + unset debuginfod_cachedir notify_p msg + export DEBUGINFOD_URLS fi