Pierre Neidhardt <m...@ambrevar.xyz> skribis: >> A package will be grafted when any >> of its inputs (direct or transitive) have been replaced. > > I understand why that would happen when _updating_ fish, but why does it > happen > when (re-)building it from scratch, for instance when the graft source is gone > from the store?
Whether a package is grafted depends on its dependencies and the set of applicable grafts. For instance, these are the grafts that can potentially be applied to Fish as of commit 1df40d3dbff82c2990271b406b32633fe216d143: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> ,use(guix) scheme@(guile-user)> ,use(gnu packages shells) scheme@(guile-user)> (define s (open-connection)) scheme@(guile-user)> (package-grafts s fish) $8 = (#<graft /gnu/store/f4d2v9y191zvj66c4rr65s8bix67wnma-libtiff-4.0.9 ==> /gnu/store/p2531jppdwwgn312bzwmm6q2cbmcdyc5-libtiff-4.0.9 2ff7840> #<graft /gnu/store/74iniafz6s76vbshzkq7zvx6nicd91y6-jbig2dec-0.14 ==> /gnu/store/vjailgb48w3jcf7brb2cgf61j9an3blm-jbig2dec-0.15 33b2630> #<graft /gnu/store/dysmb6hz7rr5rvcb05p23dazc5hz26qm-libgcrypt-1.8.2 ==> /gnu/store/hc5cak3fj0dijbm86kpz2asl7ld4gf8y-libgcrypt-1.8.3 32688d0> #<graft /gnu/store/r8ppi963s5xlf78lxd74y31263m1fxl2-libx11-1.6.5 ==> /gnu/store/bid7hvpnm8nq04vm4dszywxsw9g2kmf2-libx11-1.6.6 3268630> #<graft /gnu/store/4n6v2zp5mslq2784j878dmfzzj4vvmza-openssl-1.0.2o ==> /gnu/store/x8nacy2qpqlwi0gm7r6slcynv1cwmicb-openssl-1.0.2o 305de40> #<graft /gnu/store/jxa597l2zp6ydi345djxwabg5gp9h4di-ghostscript-9.23 ==> /gnu/store/fhbiaq9bnp4m79bd6wdfi9px41mwmdib-ghostscript-9.24 294aa80> #<graft /gnu/store/6zz27h4l21b8f2mifrk9sidvib9cns2i-perl-5.26.1 ==> /gnu/store/7ifc22sh86zblnzamqimgmv06idyx69v-perl-5.26.1 3a7be40> #<graft /gnu/store/wvd2bm9zqgy2v6yw8cp9id6hw4zlwa4i-curl-7.59.0 ==> /gnu/store/ia117b5q4pzcm81xj1hkv2qgg898v7x5-curl-7.61.1 20b2c90> #<graft /gnu/store/k177ng58xf43g5v22n60g0w75pqdv339-perl-5.26.1 ==> /gnu/store/v6c0fksl6q8bkshwb0rb74l9n4lyjfnn-perl-5.26.1 3518360>) --8<---------------cut here---------------end--------------->8--- In practice only a subset of these grafts are applied because, for instance, Fish doesn’t depend (directly or indirectly) on Ghostscript at run time whereas it does depend on Perl: --8<---------------cut here---------------start------------->8--- $ guix gc -R $(guix build fish) | grep -E '(perl|ghostscript)' /gnu/store/7ifc22sh86zblnzamqimgmv06idyx69v-perl-5.26.1 --8<---------------cut here---------------end--------------->8--- HTH! Ludo’.