From unknown Sat Sep 13 11:13:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67545: wrap-program gives different argv[0] for Python scripts Resent-From: Rikard Nordgren Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 30 Nov 2023 14:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 67545 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 67545@debbugs.gnu.org X-Debbugs-Original-To: Received: via spool by submit@debbugs.gnu.org id=B.170135579832052 (code B ref -1); Thu, 30 Nov 2023 14:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 30 Nov 2023 14:49:58 +0000 Received: from localhost ([127.0.0.1]:52668 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8iMW-0008Kr-0h for submit@debbugs.gnu.org; Thu, 30 Nov 2023 09:49:57 -0500 Received: from lists.gnu.org ([2001:470:142::17]:45728) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r8gkT-0005Jg-KP for submit@debbugs.gnu.org; Thu, 30 Nov 2023 08:06:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8gkF-0004qw-I9 for bug-guix@gnu.org; Thu, 30 Nov 2023 08:06:19 -0500 Received: from smtp-out1.uu.se ([130.238.7.172] helo=cursor.its.uu.se) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r8gkC-0001FE-Ai for bug-guix@gnu.org; Thu, 30 Nov 2023 08:06:19 -0500 Received: from mailfilter-ng-1.sunet.se (mailfilter-ng-1.sunet.se [192.36.171.207]) by cursor.its.uu.se (Postfix) with ESMTP id 19E6B68020D for ; Thu, 30 Nov 2023 14:06:09 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uu.se; s=centralsmtp; t=1701349569; bh=qxxwKHNBS8ZHySlaSa2x54WR4UVW8v/B6/E98+/CPIg=; h=Date:To:From:Subject; b=jjlittuBM2sCWUxih6OAVhg/UrJ58ikZSoNPkAyijHqampBczOeSpscboWgNXzKrZ j1LUS3q57Ppa6NJ7YdBFk8JTcLlr8ceUM2i0CYDbOMuUduLVBsRoHHXmHDl0DUm4FC ddBRCCHL9Mas7rcAn3OI00/GSK/ifK7jU4uwPU1k= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uu.se; s=halon; h=content-transfer-encoding:content-type:subject:from:to:mime-version:date: message-id:from; bh=qxxwKHNBS8ZHySlaSa2x54WR4UVW8v/B6/E98+/CPIg=; b=nU9i04Dh0mNDrZ4k51l7+WOIzmtkCKTLdYV4z2JnT6uBnyrNMqwzMjnzlxDiQ8lXciQt0hZbytfcI y/ygcfiUB/9DkRyRse+be0YSOM77X+rbdB4R6vlG6cC6268UXqcK/ZdbF7czCHArhFO0wfqfedJJ1x gnqYwY8TT+VO1ts6LQodlpweLEvdTfUO8bmuLZlTp8WJzA1cLkTvEtbI3uJGVahSOwNhQHAGACyIgU FqJn96kMsJ5HwYEScrtrWda8MyNOQDZmCBQqSmMpy5ASAJvt3+zgdK5mUmvVL304jdR6Y6oE9Pjs6t pnQOkq+vmnW0NyD4WRe8nXks6SUuV1w== X-Halon-ID: 3a15ebad-8f81-11ee-97d8-0050569a42e2 Received: from lyra.its.uu.se (lyra.its.uu.se [130.238.7.73]) by mailfilter-ng-1.sunet.se (Halon) with ESMTPS id 3a15ebad-8f81-11ee-97d8-0050569a42e2; Thu, 30 Nov 2023 13:06:08 +0000 (UTC) Received: from smtp.user.uu.se (uuc-epost014.user.uu.se [130.238.3.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lyra.its.uu.se (Postfix) with ESMTPS id 4AFEB600084 for ; Thu, 30 Nov 2023 14:06:08 +0100 (CET) Received: from [130.238.45.173] (130.238.62.2) by UUC-EPOST014.user.uu.se (130.238.3.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.28; Thu, 30 Nov 2023 14:06:08 +0100 Message-ID: <893a12a8-4b87-3b03-5ab6-acb2bdeea09a@farmaci.uu.se> Date: Thu, 30 Nov 2023 14:06:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 From: Rikard Nordgren Content-Language: en-US Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-Originating-IP: [130.238.62.2] X-ClientProxiedBy: UUC-EPOST014.user.uu.se (130.238.3.24) To UUC-EPOST014.user.uu.se (130.238.3.24) X-UU-Exchange-Origin: Internal Received-SPF: pass client-ip=130.238.7.172; envelope-from=rikard.nordgren@farmaci.uu.se; helo=cursor.its.uu.se X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -0.0 (/) X-Mailman-Approved-At: Thu, 30 Nov 2023 09:49:54 -0500 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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=C3=A4r du har kontakt med oss p=C3=A5 Uppsala universitet med e-post s=C3= =A5 inneb=C3=A4r det att vi behandlar dina personuppgifter. F=C3=B6r att l= =C3=A4sa mer om hur vi g=C3=B6r det kan du l=C3=A4sa h=C3=A4r: http://www.u= u.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://ww= w.uu.se/en/about-uu/data-protection-policy From unknown Sat Sep 13 11:13:16 2025 X-Loop: help-debbugs@gnu.org Subject: bug#67545: wrap-program gives different argv[0] for Python scripts Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Tue, 12 Dec 2023 04:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67545 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Rikard Nordgren Cc: 67545@debbugs.gnu.org Received: via spool by 67545-submit@debbugs.gnu.org id=B67545.17023550653059 (code B ref 67545); Tue, 12 Dec 2023 04:25:02 +0000 Received: (at 67545) by debbugs.gnu.org; 12 Dec 2023 04:24:25 +0000 Received: from localhost ([127.0.0.1]:55094 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCuJl-0000nG-EQ for submit@debbugs.gnu.org; Mon, 11 Dec 2023 23:24:25 -0500 Received: from mail-qt1-x82f.google.com ([2607:f8b0:4864:20::82f]:53556) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rCuJh-0000n1-96 for 67545@debbugs.gnu.org; Mon, 11 Dec 2023 23:24:23 -0500 Received: by mail-qt1-x82f.google.com with SMTP id d75a77b69052e-4257988fd5dso38462291cf.3 for <67545@debbugs.gnu.org>; Mon, 11 Dec 2023 20:24:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702355040; x=1702959840; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=AV8KWZRmWVsOnTN2A0lOyx9M68y8NGnf4UaKYIhJJJ4=; b=B6mLaPBMIqFph80c4An65zhWS37NIetvZcE7N8r5AGlvp1Py6xantu5NYP5JSGbcCQ I/KukVkzahU1DBp8fLNJg3ggRYabg9v1apyqzWhpHe0cPkrZZzQMkXmPbYnqCaW4+Iuh alWdDo7cZRQGkgjWVxNtQDVSM3FlIuonQCLGy9tVdR8bOEGK7KNBMdYgKy/+Qg8+aN2W yqHtjnOpANPwVGo7awp3qq5lPDO2URkFL7nHjkpqliE4tlXvoe5CRQGIqnI5lo5Kiblp O44IEEQg8rUHU7np8dY7Uq7xiXOMac4c5H4EYf016VCkb1c6oBFSPH+0DWTvJNQmJiBH 4T/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702355040; x=1702959840; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=AV8KWZRmWVsOnTN2A0lOyx9M68y8NGnf4UaKYIhJJJ4=; b=Wvd2oHABy1d/Q5FDYRsbXLVuRpPKchs0OwX0NicpdkipH7MnODluVREoRwFHjopaot AR14sSDVSbZlpkjcUvGny2og2Euc+xOt8eeJC7ZEAygE1xaR/k4kwj2NrN3WZ2FkTTJG 59WXbb4+o13mG7ZQRiltpCUGmInu6eqv0BBejiRBWOTdmqW8NGEj/Ww4m3QDcLTBx/s9 9I4QWzDbxJiejilIvROsrepY92MytcYIMRkISLRXz+gLQr1jJQdV5OIyw1fTUdfPCGoJ tjTuZ1hP46C94pd28hPTw7y+CGylT5Zkh3PniqBDp/c9bCDKX0BPlxeYP00qeNZ6cT9+ MO3g== X-Gm-Message-State: AOJu0YxGF69FYNrXzweE7hmKVFTWK2eYoioNdq/P2vOnvf4SnTJM2PeH NTJNtLgvKcb1CNAMACTPv42InKbzZaQ= X-Google-Smtp-Source: AGHT+IGi2D6IqkR3kaNi1FTDX5hVE/J79kD/ZAkTd18MooCTIQ2/tS6wF0h471zpxYuOlaF9EVVowg== X-Received: by 2002:a05:622a:155:b0:425:4043:50f8 with SMTP id v21-20020a05622a015500b00425404350f8mr9105455qtw.135.1702355040073; Mon, 11 Dec 2023 20:24:00 -0800 (PST) Received: from hurd (dsl-157-186.b2b2c.ca. [66.158.157.186]) by smtp.gmail.com with ESMTPSA id ca25-20020a05622a1f1900b004259ba7bc08sm3725045qtb.42.2023.12.11.20.23.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Dec 2023 20:23:59 -0800 (PST) From: Maxim Cournoyer In-Reply-To: <893a12a8-4b87-3b03-5ab6-acb2bdeea09a@farmaci.uu.se> (Rikard Nordgren's message of "Thu, 30 Nov 2023 14:06:07 +0100") References: <893a12a8-4b87-3b03-5ab6-acb2bdeea09a@farmaci.uu.se> Date: Mon, 11 Dec 2023 23:23:58 -0500 Message-ID: <87lea0cald.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, Rikard Nordgren 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