From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ZioJBQszcGBNigAAgWs5BA (envelope-from ) for ; Fri, 09 Apr 2021 12:57:15 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KKadOQozcGCbKAAA1q6Kng (envelope-from ) for ; Fri, 09 Apr 2021 10:57:14 +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 607511E01F for ; Fri, 9 Apr 2021 12:57:14 +0200 (CEST) Received: from localhost ([::1]:53786 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lUop6-0002Qg-LM for larch@yhetil.org; Fri, 09 Apr 2021 06:57:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55086) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lUoox-0002Pc-8i for bug-guix@gnu.org; Fri, 09 Apr 2021 06:57:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:37612) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lUoox-0001Y0-1g for bug-guix@gnu.org; Fri, 09 Apr 2021 06:57:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lUoox-0000Wn-1G for bug-guix@gnu.org; Fri, 09 Apr 2021 06:57:03 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#37955: warning: '.desktop' file refers to '', which cannot be found References: <87pnihfevc.fsf@ambrevar.xyz> In-Reply-To: <87pnihfevc.fsf@ambrevar.xyz> Resent-From: Brendan Tildesley Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 09 Apr 2021 10:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37955 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: "37955@debbugs.gnu.org" <37955@debbugs.gnu.org> Cc: "mail@ambrevar.xyz" Received: via spool by 37955-submit@debbugs.gnu.org id=B37955.16179658091995 (code B ref 37955); Fri, 09 Apr 2021 10:57:02 +0000 Received: (at 37955) by debbugs.gnu.org; 9 Apr 2021 10:56:49 +0000 Received: from localhost ([127.0.0.1]:49156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUooj-0000W7-Bg for submit@debbugs.gnu.org; Fri, 09 Apr 2021 06:56:49 -0400 Received: from mout-p-201.mailbox.org ([80.241.56.171]:58812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lUoof-0000Vo-6e for 37955@debbugs.gnu.org; Fri, 09 Apr 2021 06:56:47 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4FGw6t6KZgzQk23; Fri, 9 Apr 2021 12:56:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mailbox.org; h= content-type:content-type:mime-version:subject:subject :message-id:from:from:date:date:received; s=mail20150812; t= 1617965795; bh=woxnZxynUJKDgcbPbRWpsfpvW4YxQr/EZDK6sUdUByY=; b=X hl50Y8idEfv52aiOu6e5yUi5Q+NqBInyd/xLxkcyBIVFUd4PZjyuB53jkh/jjUFS a1Agc5N43FXGQtFZvSjKp/rDQGdaHp/nAT7haOxmpgdUQsl9pKm3vIc8WnvHaOM+ g4jqnNFFLNVubipkb8HQ0+DoeCCY1qzlUQlc8KUvyMMypFc10bqOnfuqJg9Nx6zB lW3TA4hFSOsUbDfwtPSYzl3Q1D7/sjVkacSBDCkXN+X/KLtO4QiNYn+WEJuv1AnR QxChMvHsW5NUyP1ZVIldSjaNZdCn5VBqbklW5OT7aaZ7CQOR4ndA1EbDSO7XE5UO QesmBV35UGKpB7o3QCQUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1617965797; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type; bh=UFMwH9jAmUR9/8K5puhuTxMb5ZJb84U0ew+VkNkkeVY=; b=mZpG/+Ccx2Mn+TnR1NapGfzFr46SIIZnRFF2PhgAxHmdZgJEBYHFHWYEd1UHA6OUjC7qEn 2ZWIMgrcwglHkJdEsIPvG8nXjkSOEOtvp+EqFdJuQmYexVI/5Cajx30n6YBMEBQShXmGTb fhgncWn61vtoFrTGiwHqKMHdbsX/PrXDayO5vH3ur02lS6k98NFAPXIsRA7TexU5hoEmHD 4XVsm69LU1ZaG4vLxv9Qodv2u1S+N9WQ5o9UpBd7oSJpd6mtoDMUkobXh0zCxs5yY6WM8g 8fNfw8s73KsavUe/0Ak2LLZSV0dqj9LCGIun9qd9AZqq+M07DvhwGEBzmFuWwg== X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter04.heinlein-hosting.de (spamfilter04.heinlein-hosting.de [80.241.56.122]) (amavisd-new, port 10030) with ESMTP id 3buILIjDlYIa; Fri, 9 Apr 2021 12:56:35 +0200 (CEST) Date: Fri, 9 Apr 2021 12:56:35 +0200 (CEST) Message-ID: <1448605157.72653.1617965795461@office.mailbox.org> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_72652_1417392800.1617965795457" X-Priority: 3 Importance: Normal X-MBO-SPAM-Probability: X-Rspamd-Score: -3.31 / 15.00 / 15.00 X-Rspamd-Queue-Id: DC64717BD X-Rspamd-UID: 9c57ae 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" Reply-to: Brendan Tildesley From: Brendan Tildesley via Bug reports for GNU Guix X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1617965834; h=from:from:sender:sender:reply-to: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: dkim-signature; bh=UFMwH9jAmUR9/8K5puhuTxMb5ZJb84U0ew+VkNkkeVY=; b=j+AdgGRqNTyW8zznZk3QcQNgD0IfOzzvytOLcgNAMCsOwoCa41mEjqO8qiTe8iaNas0iPu IletRdk8yxUtIx1MvfAcY5HgTfS3dIuzGFgaFxH4I8Ky4hsNl3uhWH0ZgkQHIm1Lfhb6QG NetiIgW4LI9Ym7Rf5c6py8ShDvOnfCGTe1osK8vIzqjbWWZFwCbRLf+qqLz/+ULtK1Vv+o SKDAG2ZiT/vBuPzI9/xmRgAjzMOn1shGtXOWWQs4r4wsacjwwFGRiP00h4oVdwjWr2N7h3 E+qbu3GiOqa5CHkhqqj3cChOMkwc2hjajkZ02A+JoyyxiwI6pon6jmWAWCVbGQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1617965834; a=rsa-sha256; cv=none; b=m6DE4Bp40vqePXrYtO+L3tAiCXGa9FWQzZFTBmOWT4quH9Kirmjnf+ETuIRfqTAf4z0gvC EbZp+VqlwZehBaCccsatV/y8G2bgJWrUWQ7eUIZYo2Qzk00ohR4se6IFDN8jAKBOF484+h 9hdGef64Bqbn+zfGJEri/NFOVVRFfs+3UVdUwOee3zDB8MNHEXp/r50jv38OwbvqezgrLv 8AfkLeucS5/9EG0U4GF8zhohFWpSKMIk7e3ICXwVv9es92d8FYaWxnIG1rynFefr2BhD46 67H3dCj6QevuWspMo5kjKs5s0HYT/+wIjdOMEm6jn8EnwLOco/O3guoV7Wvcag== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b="X hl50Y8"; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b="mZpG/+Cc"; 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=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b="X hl50Y8"; dkim=fail ("headers rsa verify failed") header.d=mailbox.org header.s=mail20150812 header.b="mZpG/+Cc"; 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: 607511E01F X-Spam-Score: -2.94 X-Migadu-Scanner: scn0.migadu.com X-TUID: eWn8jfkIRCaA ------=_Part_72652_1417392800.1617965795457 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit The Exec paths in these files already refer to absolute paths, infact, /gnu/store paths Thus the regex: ("^Exec=([^/[:blank:]\r\n]*)(.*)$" _ binary rest) with binary = empty string and rest = everything after Exec= Why? The second subexpression [^/[:blank:]\r\n]* is bound to binary, but it means anything that is a series of anything that is not /, space, or newline. absolute paths start with /, so it matches nothing (empty string), and continues to call (which ""). I notice this phase hasn't been edited in 5 years and has other issues, for example: 1. patch-dot-desktop-files only searches the output of the package for paths, not the inputs. This means for example xfce4-settings fails to patch references to exo-open in desktop files. The code should be remade to be more /correct/, and handle all unexpected inputs. In this case the phase is accidentally doing the right thing by failing in a harmless way and correctly not patching the files, but emitting a warning. ------=_Part_72652_1417392800.1617965795457 MIME-Version: 1.0 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 7bit
The Exec paths in these files already refer to absolute paths, infact, /gnu/store paths
Thus the regex:

("^Exec=([^/[:blank:]\r\n]*)(.*)$" _ binary rest)

with binary = empty string and rest = everything after Exec=

Why? The second subexpression [^/[:blank:]\r\n]* is bound to binary, but it means anything
that is a series of anything that is not /, space, or newline. absolute paths start with /, so it matches nothing (empty string), and continues to call (which "").


I notice this phase hasn't been edited in 5 years and has other issues, for example:

1. patch-dot-desktop-files only searches the output of the package for paths, not the inputs. This means for example xfce4-settings fails to patch references to exo-open in desktop files.

The code should be remade to be more /correct/, and handle all unexpected inputs. In this case the phase is accidentally doing the right thing by failing in a harmless way and correctly not patching the files, but emitting a warning.
------=_Part_72652_1417392800.1617965795457--