unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Brendan Tildesley via Bug reports for GNU Guix <bug-guix@gnu.org>
To: "37955@debbugs.gnu.org" <37955@debbugs.gnu.org>
Cc: Pierre Neidhardt <mail@ambrevar.xyz>
Subject: bug#37955: warning: '.desktop' file refers to '', which cannot be found
Date: Fri, 9 Apr 2021 13:53:25 +0200 (CEST)	[thread overview]
Message-ID: <584340044.73615.1617969205543@office.mailbox.org> (raw)
In-Reply-To: <87y2drg0rk.fsf@ambrevar.xyz>

[-- Attachment #1: Type: text/plain, Size: 254 bytes --]


> On 04/09/2021 1:23 PM Pierre Neidhardt <mail@ambrevar.xyz> wrote:
> 
>  
> Thanks for the investigation.  Would you like to send a patch?

I'm not sure what the right way to fix it is. I may have come up with a brilliant idea. Untested patch attached.

[-- Attachment #2: 0001-build-gnu-build-system-Improve-patch-dot-desktop-fil.patch --]
[-- Type: text/x-patch, Size: 1595 bytes --]

From 64c200f3630de13ec3487cb5c756b47b133c6ecf Mon Sep 17 00:00:00 2001
From: Brendan Tildesley <mail@brendan.scot>
Date: Fri, 9 Apr 2021 21:43:54 +1000
Subject: [PATCH] build: gnu-build-system: Improve patch-dot-desktop-files.

* guix/build/gnu-build-system.scm (patch-dot-desktop-files):
When patching .desktop files, Exec= values beginning with '/', (or
spaces or newline characters) will result in the 'binary' symbol
matching an empty string. Changing *, meaning 0 or more, to +, meaning 1
or more ensures it will match a binary of atleast 1 length, or nothing.
---
 guix/build/gnu-build-system.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index 2e7dff2034..99636c442a 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -725,9 +725,9 @@ which cannot be found~%"
                      ;; UTF-8-encoded.
                      (with-fluids ((%default-port-encoding "UTF-8"))
                        (substitute* files
-                         (("^Exec=([^/[:blank:]\r\n]*)(.*)$" _ binary rest)
+                         (("^Exec=([^/[:blank:]\r\n]+)(.*)$" _ binary rest)
                           (string-append "Exec=" (which binary) rest))
-                         (("^TryExec=([^/[:blank:]\r\n]*)(.*)$" _ binary rest)
+                         (("^TryExec=([^/[:blank:]\r\n]+)(.*)$" _ binary rest)
                           (string-append "TryExec="
                                          (which binary) rest)))))))))
             outputs)
-- 
2.31.1


  reply	other threads:[~2021-04-09 11:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-28  8:33 bug#37955: warning: '.desktop' file refers to '', which cannot be found Pierre Neidhardt
2021-04-09 10:56 ` Brendan Tildesley via Bug reports for GNU Guix
2021-04-09 11:23   ` Pierre Neidhardt
2021-04-09 11:53     ` Brendan Tildesley via Bug reports for GNU Guix [this message]
2021-04-09 17:39       ` Pierre Neidhardt
2021-04-10  1:29         ` Brendan Tildesley via Bug reports for GNU Guix
2021-04-10  7:08           ` Pierre Neidhardt
2022-10-09  6:48 ` Brendan Tildesley
2022-10-10 12:22 ` Tobias Geerinckx-Rice via Bug reports for GNU Guix

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=584340044.73615.1617969205543@office.mailbox.org \
    --to=bug-guix@gnu.org \
    --cc=37955@debbugs.gnu.org \
    --cc=btild@mailbox.org \
    --cc=mail@ambrevar.xyz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).