[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PATH revisited: one PATH to "rule the [Debian] World"



On Mon, Sep 25, 2023 at 06:08 Tom Browder <tom.browder@gmail.com> wrote:
On Sun, Sep 24, 2023 at 17:23 Tom Browder <tom.browder@gmail.com> wrote:
On Sun, Sep 24, 2023 at 17:04 Greg Wooledge <greg@wooledge.org> wrote:
On Sun, Sep 24, 2023 at 04:45:11PM -0500, Tom Browder wrote:
> I'm sure I was too casual in my comments. I want all users, including root,
> to have the Raku executables in their PATH, nothing else would be changed
> from current use
...
Ah, good old X-Y.
Create symlinks from /usr/local/bin/ to wherever the programs are
physically installed.  Then don't touch PATH at all.
My brain isn't clicking on all eight, but I think you suggested that before--I'll try that, thanks, Greg!

Well, that's not going to work. I failed to say my program is a bit more complicated:

0. It's executed by 'root'.
1. It uses 'raku'.
2. During its operation, the location of the 'raku' version to be used after it completes changes from '/usr/local/bin' to '/opt/rakudo-pkg/bin'.
3. Due to requirement 2, I don't think it's safe to attempt to overwrite current executables with a symlink to new executables of the same basename.

I think I need to have the program change all the path-affecting files specified by Greg and others so that PATH includes both locations with the new location coming before the original location.

Then the script can safely remove the original version. 

-Tom

Reply to: