GNU bug report logs - #67545
wrap-program gives different argv[0] for Python scripts

Previous Next

Package: guix;

Reported by: Rikard Nordgren <rikard.nordgren <at> farmaci.uu.se>

Date: Thu, 30 Nov 2023 14:50:02 UTC

Severity: normal

To reply to this bug, email your comments to 67545 AT debbugs.gnu.org.

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#67545; Package guix. (Thu, 30 Nov 2023 14:50:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Rikard Nordgren <rikard.nordgren <at> farmaci.uu.se>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 30 Nov 2023 14:50:02 GMT) Full text and rfc822 format available.

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

From: Rikard Nordgren <rikard.nordgren <at> farmaci.uu.se>
To: <bug-guix <at> gnu.org>
Subject: wrap-program gives different argv[0] for Python scripts
Date: Thu, 30 Nov 2023 14:06:07 +0100
For example the meld package is using wrap-program and the name of the
actual meld executable will be .meld-real. The idea is that the -a
option to exec in the wrapper script should change the name of argv[0],
but for Python scripts this doesn't work. This means that when doing
"meld --version" it gives ".meld-real 3.22.0" instead of the expected
"meld 3.22.0". Any ideas on how this could be fixed?








När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här: http://www.uu.se/om-uu/dataskydd-personuppgifter/

E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here: http://www.uu.se/en/about-uu/data-protection-policy




Information forwarded to bug-guix <at> gnu.org:
bug#67545; Package guix. (Tue, 12 Dec 2023 04:25:02 GMT) Full text and rfc822 format available.

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

From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Rikard Nordgren <rikard.nordgren <at> farmaci.uu.se>
Cc: 67545 <at> debbugs.gnu.org
Subject: Re: bug#67545: wrap-program gives different argv[0] for Python scripts
Date: Mon, 11 Dec 2023 23:23:58 -0500
Hi,

Rikard Nordgren <rikard.nordgren <at> farmaci.uu.se> writes:

> For example the meld package is using wrap-program and the name of the
> actual meld executable will be .meld-real. The idea is that the -a
> option to exec in the wrapper script should change the name of argv[0],
> but for Python scripts this doesn't work. This means that when doing
> "meld --version" it gives ".meld-real 3.22.0" instead of the expected
> "meld 3.22.0". Any ideas on how this could be fixed?

We already have a solution, in the form of 'wrap-script'.  I have an old
series changing pyproject-build-system to use it instead of wrap-program
for core-updates, perhaps I should revive it.

-- 
Thanks,
Maxim




This bug report was last modified 144 days ago.

Previous Next


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