From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57986) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e0DPE-0003aO-N2 for guix-patches@gnu.org; Thu, 05 Oct 2017 17:10:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e0DP8-0006uK-Jg for guix-patches@gnu.org; Thu, 05 Oct 2017 17:10:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:43171) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e0DP8-0006u0-Eq for guix-patches@gnu.org; Thu, 05 Oct 2017 17:10:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e0DP8-0005ch-8h for guix-patches@gnu.org; Thu, 05 Oct 2017 17:10:02 -0400 Subject: [bug#28693] [PATCH] gnu: Add missing input to python-py3status. Resent-Message-ID: Date: Thu, 5 Oct 2017 23:08:57 +0200 From: =?UTF-8?Q?Tom=C3=A1=C5=A1_?= =?UTF-8?Q?=C4=8Cech?= Message-ID: <20171005210857.5soxmlej6kgvqxrf@penguin> References: <20171003225757.28335-1-sleep_walker@gnu.org> <20171004075944.1e5a7cbf@cbaines.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="mcx6isf2mlddbxia" Content-Disposition: inline In-Reply-To: <20171004075944.1e5a7cbf@cbaines.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Christopher Baines Cc: 28693@debbugs.gnu.org --mcx6isf2mlddbxia Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Christopher, first, let me thank you for your long explanatory review, I really appreciate it. On Wed, Oct 04, 2017 at 06:59:44AM +0000, Christopher Baines wrote: >On Wed, 4 Oct 2017 00:57:57 +0200 >Tom=C3=A1=C5=A1 =C4=8Cech wrote: > >> * gnu/packages/python.scm (python-py3status): Add missing input. >> >> file is used to determine configuration file encoding and py3status >> fails to run when this tool is missing. > >Hey Tom=C3=A1=C5=A1, > >I don't know much about python-py3status, but I had a look at building >it with and without this patch, and it worked for me both times. That is correct. >When building with this patch, so with file as an additional input, the >resulting store item does not reference the file store item (which you >can check using guix size, which lists the referenced store items [1]). > >Given file is used at runtime, it would be good if the resulting store >item for python-py3status referenced file. As far as I can see, file is >used here [2], so you could use the substitute* procedure to replace >the command name with an absolute path to the binary in the store. This >absolute path would then mean that file is recorded as a "runtime" >dependency of python-py3status. I have taken this approach as it seems to me as the most clean one. It works and `guix size' command now shows the file store in the list. >Other approaches include wrapping the py3status binary to ensure the >PATH environment variable includes the dependencies (like file), or >adding file as to propagated-inputs (rather than inputs), which ensures >its installed when py3status is installed. > >All of these 3 approaches I've mentioned have some downsides. Patching >the files is tricky, and what is used where can change in later >releases. It adds burden to maintainer to verify sufficiency and need for every code change but besides that it looks as proper solution. >As for wrapping, that is inelegant, and wouldn't help if this >is used as a python library. Agreed. >Propagated inputs can conflict with other >packages and propagated inputs, which can cause issues for people >installing and upgrading packages. This point is interesting to me - can you please give me example? >>From the number of occurrences of the subprocess module in this >package, this seems to be a problem not limited to the file tool, but a >large number of programs. That is correct but other occurences are related to plugins providing functionality. User has to prepare configuration to use that code. Problem I'm trying to fix is causing hard-to-catch confusing error right after start for everyone who is missing file in PATH. I somehow miss expressing optional run-time dependencies in Guix which would suit for this. I guess I'd go here with lazy approach and provide basic functionality my problem and let advanced user to deal with plugin problems by himself. Otherwise the closure would grow beyond reason. What do you think? Can this be the way here? Best regards, S_W --mcx6isf2mlddbxia Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEDOrssfr9jDQthC2PSiPjT6AzQ20FAlnWn2AACgkQSiPjT6Az Q233gw/+J6pP6/pKdl/hmPP6QSbQvj3qJuhUbVjUJK/pHIyWnV9SWvDzLTEUv8sn Kx3RKn1nKIYQha1eKnC/hU5D8aif5b743TF6fHw3fO+1A1oU5jAJngZoDHz9IN2w ig7hOmpJTeSxYzN5ZOAEfSpDwDN9ej2IvYAi2uhyJI4TaamBBWLVqj/cO1nKTG6C O2Gbq7Pc0H5M1xcmY9Nah5UOPYUh18ofJv6/DRKnj7WUUaEqQgibfJpuJRv5o8qr ZSZxIHINQc7RSAT5GyEFgxKq6VQsn/0bBiOyX3n+NA/2Hdbg2EQoyMnI0DmmX85i otcfyd2hRXMpV6YhTJ0qsrfS9Q3fiLgItvd3E6En8Vnc1JX3zK4OE+vbQLDF4wUF K1JEnIgX+nBO9p5ULDuOaZm1XM3B8nkglDJDTJqtRajNLqJubizN8nOKXVVoZfVq ULqSywO4ajcGJ/W3SUjVk4Q+pVt0N6iICHtze3aqdIYLIefFGrP9vhI1M5EybkRG rgV90+vfv5naNbrJmctIH4u48Ww4+mdx7OnNa/0UhkVmenaVOIlP/2k6URorTeCO +b+w4CxwRAEpvG3AMb6uhgRl4UtFxP1tiD42qJ4jsnpSEfT/DdyzbGuYCjaCFGQS xO0Nio6uT6nG9z6kPAuAQpCV92PtavBdpIjZaos8l0WEVvOMjOQ= =rrJ9 -----END PGP SIGNATURE----- --mcx6isf2mlddbxia--