From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51301) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dzdf6-000581-UU for guix-patches@gnu.org; Wed, 04 Oct 2017 03:00:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dzdf1-0004rx-2e for guix-patches@gnu.org; Wed, 04 Oct 2017 03:00:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:38658) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dzdf0-0004qo-W1 for guix-patches@gnu.org; Wed, 04 Oct 2017 03:00:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dzdf0-000185-HT for guix-patches@gnu.org; Wed, 04 Oct 2017 03:00:02 -0400 Subject: [bug#28693] [PATCH] gnu: Add missing input to python-py3status. Resent-Message-ID: Date: Wed, 4 Oct 2017 07:59:44 +0100 From: Christopher Baines Message-ID: <20171004075944.1e5a7cbf@cbaines.net> In-Reply-To: <20171003225757.28335-1-sleep_walker@gnu.org> References: <20171003225757.28335-1-sleep_walker@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/H5F5S74kOUCvkSPwBXvli=2"; protocol="application/pgp-signature" 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: =?UTF-8?Q?Tom=C3=A1=C5=A1_?= =?UTF-8?Q?=C4=8Cech?= Cc: 28693@debbugs.gnu.org --Sig_/H5F5S74kOUCvkSPwBXvli=2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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. >=20 > 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. 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. 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. As for wrapping, that is inelegant, and wouldn't help if this is used as a python library. Propagated inputs can conflict with other packages and propagated inputs, which can cause issues for people installing and upgrading packages. =46rom 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. I'm imagining that you use this, so let me know what you think, and if you have any questions? Thanks for the patch, Chris 1:=20 =E2=86=92 guix size python-py3status store item total s= elf /gnu/store/ks27x0mf95gir0cdgb9h573xbava6v1k-python-3.5.3 171.5 = 65.2 36.7% /gnu/store/n6nvxlk2j8ysffjh3jphn1k5silnakh6-glibc-2.25 38.5 = 37.1 20.9% /gnu/store/3x53yv4v144c9xp02rs64z7j597kkqax-gcc-5.4.0-lib 68.6 = 30.1 16.9% /gnu/store/42d5rjrdkln6nwvzwdc8dyd4w6iy3n5j-coreutils-8.27 86.8 = 14.8 8.3% /gnu/store/m0m6bwzi8lx7kv8zbn3hjrim6flmgnf4-openssl-1.0.2l 74.6 = 5.9 3.3% /gnu/store/09j7scnl3hahcmql986fsjpzj6gqsmzv-ncurses-6.0 74.3 = 5.7 3.2% /gnu/store/b7y66db86k57vbb03nr4bfn9svmks4gf-bash-4.4.12 81.0 = 5.4 3.1% /gnu/store/mpl9b9w60gjzsq470zka5l8p2bmy7r8v-sqlite-3.19.3 79.0 = 3.5 1.9% /gnu/store/5jl21csvr3jmsa4a7d08sqa2waks3f09-gmp-6.1.2 71.2 = 2.6 1.5% /gnu/store/zhrajv6qf2hzn9c3g2bb07559hyrz5xp-bash-static-4.4.12 1.4 = 1.4 0.8% /gnu/store/mipizipnr4y2hly9b429j8id1albbgqi-readline-7.0 75.6 = 1.3 0.7% /gnu/store/g3nari57wcfnm00kv9bnpyzdzfq4h8pk-xz-5.2.2 70.7 = 1.1 0.6% /gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12 39.5 = 1.0 0.5% /gnu/store/9ym4jxs5jhzjbf0dy5wz3ghdd8mp72r8-python-py3status-3.1 177.7 = 0.8 0.5% /gnu/store/47jgabf5wx296alb06pb5iig6cqbmx0v-gdbm-1.13 69.2 = 0.6 0.3% /gnu/store/5lrk6d5cjsv2s29vfji6j59gyf18rb5m-acl-2.2.52 69.3 = 0.4 0.2% /gnu/store/sfx1wh27i6gsrk21p87rdyikc64v7d51-zlib-1.2.11 69.0 = 0.4 0.2% /gnu/store/yz1lf55ag0904w9ib0q2kcjpdx33y7wm-attr-2.4.47 68.9 = 0.2 0.1% /gnu/store/jnbb8ffxxvrw2b4z18zn0g08kqk9rsgl-libffi-3.2.1 68.8 = 0.1 0.1% /gnu/store/yzlmd2nlcyjhx0ydbap7x32zjqxc3hz9-libcap-2.25 68.8 = 0.1 0.1% /gnu/store/v4i3zfiwk6vl0mhdz580diqs0p6sc8vg-python-wrapper-3.5.3 176.9 = 0.0 0.0% total: 177.7 MiB 2: lib/python3.5/site-packages/py3status/parse_config.py --Sig_/H5F5S74kOUCvkSPwBXvli=2 Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAlnUhuBfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XeE6hAArB5K445KJQSPfnkBh+Ip952AMQZnh3z/ZE1f2TFwqrkm5u/a4dRNc5p1 Bnq2SXJCuwzJQ5se5BjHaOaoAiGQ+UiQutAbp/Kmi4pZPv8hSRpQE6woABcLaBaj RKoLSBm8xbn+Cf4HNQgzSOCeHf9F8PGM5ATdaoUN/QAKkZx31qWeT/vbrn56nSkh Jw5FVvkxuAWHWVjwQSqxPa/tMXqIsmKpUIamD7US2YcjeMOaXDoIppl7UEkWBb0C GpvE7r8yD5O9B4uKpVzKdVqe1NC43w/snRqAdvTiwV+xL2PcYhXBF3sYdePf3gAv 5aK7BBtUMsY/2HoNM/ECF4hBv/uWVIb8GbXoskcLGDiwNBvZOuy41WYL1V1MO2Ub I8Bc+YM89FK1aUE+U9XWDRAoYh7mt/Dfrhus+5DqvrGxQKL4YsSwPjBCrHW3HTtA WvC94bQFHVNpED/Y+Tc0lnr8e9SMl/ILZpATxmoalW98yQ8Wa+9xjdVkvEhZ4Mhk YJOsBqQgra4vCaFckV9C1pJVUsE3qxCKghq2819eP1p+wPOS8yCxL/qt1tuVyKFU X8p6kOG2yg6loqenGcTB+ICmR1gKWmoA8aGNpJ0IuezCkwmCBt3RvNi88QXsEbee MYOb2qIzi60/7jnyRQ/qCmRIj5LCNy72M+S0Xq2UnuAVjVk5V5I= =Ev19 -----END PGP SIGNATURE----- --Sig_/H5F5S74kOUCvkSPwBXvli=2--