From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:47267) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j6KUN-0007Mr-N3 for guix-patches@gnu.org; Mon, 24 Feb 2020 15:38:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j6KUM-0006Lm-Bm for guix-patches@gnu.org; Mon, 24 Feb 2020 15:38:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48191) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j6KUM-0006Lf-7J for guix-patches@gnu.org; Mon, 24 Feb 2020 15:38:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j6KUM-0004df-37 for guix-patches@gnu.org; Mon, 24 Feb 2020 15:38:02 -0500 Subject: [bug#39292] [PATCH 10/10] gnu: Add rapid-photo-downloader Resent-Message-ID: References: <87sgjtgtju.fsf@cbaines.net> <1889312991.7522.1582454410688@office.mailbox.org> From: Christopher Baines Date: Sun, 23 Feb 2020 16:55:22 +0000 Message-ID: <87v9nxi6px.fsf@cbaines.net> In-reply-to: <1889312991.7522.1582454410688@office.mailbox.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; 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: Sebastian Schott Cc: "39292@debbugs.gnu.org" <39292@debbugs.gnu.org> --=-=-= Content-Type: text/plain Sebastian Schott writes: > Hi Chris, > > you are right, some libraries I added in native-inputs of > rapid-photo-downloader cause trouble, e.g., I got "ValueError: > Namespace Notify not available", when I try to start the program. This > is a bit confusing, because before committing, I successfully tested > this, but maybe I manually installed these libraries and therefore had > no "clean" testing environment. > > Now, I experimented a bit with native-inputs, inputs and > propagated-inputs and managed to start the program, when I install it > with the code at the end of this mail (./pre-inst-env guix install > rapid-photo-downloader). When I just build the program and cd into the > store folder to run it, I still got the "notify error" (./pre-inst-env > guix build rapid-photo-downloader --> cd /gnu/store/.../bin --> > ./rapid-photo-downloader). This makes sense, because without > installing the program, also the propagated-inputs are not installed. > > What is the recommended way to test a program without interfering with > the current user profile, but still considering propagated-inputs? Probably using guix environment --ad-hoc, although to set up the right search paths, you'll need to also include some other packages in the environment. Propagated inputs with search paths are great for things like plugins, and programming language libraries, but for improved reliability and compatibility, they should be avoided for applications like Rapid Photo Downloader. > You mentioned inputs are used for libraries required at runtime. Now I > wonder, why I need to put libnotify, libgudev, usdisks and gexiv2 into > the propagated-inputs to avoid errors like "ValueError: Namespace > Notify not available"? Probably because of a search path like GI_TYPELIB_PATH. I've taken an earlier version of your patch, and tweaked it [1] so that I can start the application directly from the store (running [2]). 1: https://git.cbaines.net/guix/commit/?h=series-2725-tweaked&id=85613884ac9c4122460923aaf1e28ef13aab49df 2: /gnu/store/6ssz223fy59cpz3582jd3xqva49m9w8n-rapid-photo-downloader-0.9.18/bin/rapid-photo-downloader If you take a look at that file [2], you'll see it's a bash script, which sets a number of environment variables. This comes from the wrap-program call in the patch [1]. Now using wrap-program is not an ideal technique, but what I think this approach does provide is that it reduces the chance of other things in your profile breaking rapid-photo-downloader, and it also means that you can install another application that also uses a common dependency, but has a different version of it, or a patched version, without running in to difficulties combining both packages in to one profile. Does that make sense? Thanks, Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAEBCgB9FiEEPonu50WOcg2XVOCyXiijOwuE9XcFAl5UM/1fFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNF ODlFRUU3NDU4RTcyMEQ5NzU0RTBCMjVFMjhBMzNCMEI4NEY1NzcACgkQXiijOwuE 9XfG3A/8CRrUl/cOCdoBgmCr2X5t4jnq/Y+JHOaj3zR+xz2DEkZoLWd334F2WZNQ V6ww7/wsSpr4rlgz5VV8Db2uZDeeowWjLzEbGax/TsTT745HBx6GRkrvNYPdeBvs 2k1ZBXJb6CdaV1LyyspXTONY3oOlP//9FfeLU1mPws1P5hN4gAHRXwKTJB9iYQIZ XzpGGOEOj+YMRuR8rBueFJM60oAO7gfVnpzzry7YcVWCNm7hIJ9Irn/hDMZZTZho PBIxH2+1/7yriG+u/zsK6is1QaCCeXe66SxRF2pWcHr3pJvuBRjK5ZWkb1OA9DM7 ygHzapSoRPQo4XJCIm7h+nT7zZClw7ezBeLqa+hZjgSTxV6y+RpPYwlLmdq3HO/l vkjVgHvS5nyjGuE6GzyKJX6e2Tw1H7KMY2BEM4Rs0XLWqJ9gDVvbHC9q0qqN64B+ 7bDBa/qFzdshQB9sf+UckyPzoRCpCnC4C01R/oRfkl1f2zY45PZ5yQumdsmyLb0P 31YjJnsVz9fVpVzv79rU2Dcg7rEDOvmZ4InT08X3pco1X8QkAhqZUfhNEY+QQw42 ikptKJ0x4SIt0PGrCUGv+bibowBMY9w1il7dr7onUwtk0xbZImTJEwlvXReS0/SE orkib5CLdJAI5g5FzXnFNNXvrL1uS9sNADl62vosUM2fFtEXkRs= =Z2x6 -----END PGP SIGNATURE----- --=-=-=--