R provides a function “Sys.which”, which embeds the full path to “which” at configure time. The path it embeds is that of “which” *before* grafts.
The final package does not retain any reference to the “which” package, however. What’s worse: this cannot be fixed by adding “which” to the environment, as “Sys.which” holds a reference to the ungrafted “which” package. This is a problem in containers, where the ungrafted “which” will not be available even when the “which” package is added to the container. It may also be a security problem, because R references an ungrafted package. -- Ricardo GPG: BCA6 89B6 3655 3801 C3C6 2150 197A 5888 235F ACAC https://elephly.net
