GNU bug report logs - #37955
warning: '.desktop' file refers to '', which cannot be found

Previous Next

Package: guix;

Reported by: Pierre Neidhardt <mail <at> ambrevar.xyz>

Date: Mon, 28 Oct 2019 08:35:01 UTC

Severity: normal

Done: Tobias Geerinckx-Rice <me <at> tobias.gr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37955 in the body.
You can then email your comments to 37955 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#37955; Package guix. (Mon, 28 Oct 2019 08:35:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pierre Neidhardt <mail <at> ambrevar.xyz>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Mon, 28 Oct 2019 08:35:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: bug-guix <at> gnu.org
Subject: warning: '.desktop' file refers to '', which cannot be found
Date: Mon, 28 Oct 2019 09:33:59 +0100
[Message part 1 (text/plain, inline)]
Many packages report this (benign?) warning:

--8<---------------cut here---------------start------------->8---
starting phase `patch-dot-desktop-files'
adjusting 2 '.desktop' files in "/gnu/store/j8q725jv5my3gcqi1kgb2g99839xcbap-racket-7.3/share/applications"
warning: '.desktop' file refers to '', which cannot be found
...
--8<---------------cut here---------------end--------------->8---

Racket is one example.

The .desktop file is fine though, there is no empty string nor broken references.

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#37955; Package guix. (Fri, 09 Apr 2021 10:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 37955 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <btild <at> mailbox.org>
To: "37955 <at> debbugs.gnu.org" <37955 <at> debbugs.gnu.org>
Cc: "mail <at> ambrevar.xyz" <mail <at> ambrevar.xyz>
Subject: warning: '.desktop' file refers to '', which cannot be found
Date: Fri, 9 Apr 2021 12:56:35 +0200 (CEST)
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#37955; Package guix. (Fri, 09 Apr 2021 11:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 37955 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Brendan Tildesley <btild <at> mailbox.org>, "37955 <at> debbugs.gnu.org"
 <37955 <at> debbugs.gnu.org>
Subject: Re: warning: '.desktop' file refers to '', which cannot be found
Date: Fri, 09 Apr 2021 13:23:11 +0200
[Message part 1 (text/plain, inline)]
Thanks for the investigation.  Would you like to send a patch?
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#37955; Package guix. (Fri, 09 Apr 2021 11:54:01 GMT) Full text and rfc822 format available.

Message #14 received at 37955 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <btild <at> mailbox.org>
To: "37955 <at> debbugs.gnu.org" <37955 <at> debbugs.gnu.org>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>
Subject: Re: warning: '.desktop' file refers to '', which cannot be found
Date: Fri, 9 Apr 2021 13:53:25 +0200 (CEST)
[Message part 1 (text/plain, inline)]
> On 04/09/2021 1:23 PM Pierre Neidhardt <mail <at> 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.
[0001-build-gnu-build-system-Improve-patch-dot-desktop-fil.patch (text/x-patch, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#37955; Package guix. (Fri, 09 Apr 2021 17:40:02 GMT) Full text and rfc822 format available.

Message #17 received at 37955 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Brendan Tildesley <btild <at> mailbox.org>, "37955 <at> debbugs.gnu.org"
 <37955 <at> debbugs.gnu.org>
Subject: Re: warning: '.desktop' file refers to '', which cannot be found
Date: Fri, 09 Apr 2021 19:39:03 +0200
[Message part 1 (text/plain, inline)]
So if the path is already an absolute store path, then I suppose that
the whole phase is superfluous, isn't it?

Couldn't we just delete it?

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#37955; Package guix. (Sat, 10 Apr 2021 01:30:02 GMT) Full text and rfc822 format available.

Message #20 received at 37955 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <btild <at> mailbox.org>
To: "37955 <at> debbugs.gnu.org" <37955 <at> debbugs.gnu.org>
Cc: Pierre Neidhardt <mail <at> ambrevar.xyz>
Subject: Re: warning: '.desktop' file refers to '', which cannot be found
Date: Sat, 10 Apr 2021 03:29:13 +0200 (CEST)
> On 04/09/2021 7:39 PM Pierre Neidhardt <mail <at> ambrevar.xyz> wrote:
> 
>  
> So if the path is already an absolute store path, then I suppose that
> the whole phase is superfluous, isn't it?
> 
> Couldn't we just delete it?

Do you mean delete the phase entirely or just from Racket? It's not always the case that they are absolute paths. Racket probably just has some code to generate them automatically.




Information forwarded to bug-guix <at> gnu.org:
bug#37955; Package guix. (Sat, 10 Apr 2021 07:09:01 GMT) Full text and rfc822 format available.

Message #23 received at 37955 <at> debbugs.gnu.org (full text, mbox):

From: Pierre Neidhardt <mail <at> ambrevar.xyz>
To: Brendan Tildesley <btild <at> mailbox.org>, "37955 <at> debbugs.gnu.org"
 <37955 <at> debbugs.gnu.org>
Subject: Re: warning: '.desktop' file refers to '', which cannot be found
Date: Sat, 10 Apr 2021 09:08:29 +0200
[Message part 1 (text/plain, inline)]
Brendan Tildesley <btild <at> mailbox.org> writes:

> Do you mean delete the phase entirely or just from Racket? It's not always the case that they are absolute paths. Racket probably just has some code to generate them automatically.

Good point!

-- 
Pierre Neidhardt
https://ambrevar.xyz/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#37955; Package guix. (Sun, 09 Oct 2022 06:49:02 GMT) Full text and rfc822 format available.

Message #26 received at 37955 <at> debbugs.gnu.org (full text, mbox):

From: Brendan Tildesley <mail <at> brendan.scot>
To: 37955 <at> debbugs.gnu.org, "Pierre Neidhardt," <mail <at> ambrevar.xyz>
Subject: Re: bug#37955: warning: '.desktop' file refers to '', which cannot be
 found
Date: Sun, 9 Oct 2022 17:48:39 +1100
PING. Could the patch I sent get reviewed please? This would apply to
core-updates. It's been a while so I don't remember much about it myself
actually.





Reply sent to Tobias Geerinckx-Rice <me <at> tobias.gr>:
You have taken responsibility. (Mon, 10 Oct 2022 12:25:02 GMT) Full text and rfc822 format available.

Notification sent to Pierre Neidhardt <mail <at> ambrevar.xyz>:
bug acknowledged by developer. (Mon, 10 Oct 2022 12:25:02 GMT) Full text and rfc822 format available.

Message #31 received at 37955-done <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: 37955-done <at> debbugs.gnu.org
Subject: Re: warning: '.desktop' file refers to '', which cannot be found
Date: Mon, 10 Oct 2022 14:22:59 +0200
[Message part 1 (text/plain, inline)]
I moved the informational background above the changelog and 
pushed this to c-u as 685110045c04a60bf18163aab1c230f944c871c9.

Thanks!

T G-R
[signature.asc (application/pgp-signature, inline)]

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 08 Nov 2022 12:24:07 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 170 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.