Ticket #148 (new task)

Opened 11 years ago

Last modified 11 years ago

xuvtools: [wishlist] don't change global path-settings in cygwin

Reported by: ne704 [niko@… Owned by: ne704
Priority: minor Milestone:
Component: xuvtools Version:
Keywords: xuvtools, buildsystem, win Cc: mario@…, niko@…


I think it is a potential source of errors to alter the default path-settings for cygwin as currently done in the source:/trunk/xuvtools/scripts/env-lmb.sh#3394 script, since this is absolutely non-standard and other (cygwin) tools might rely on the assumption of having their relevant directories at the topmost position in $PATH.

Instead we could (should) use the same approach already integrated in the current thirdpary-Makefile.Windows (changeset:3471) to filter the PATH-environment variable to conatin just the Windows-only paths when calling a Windows-tool that otherwise would fail.

The same topic applies to the default cygdrive-prefix. If we ask the user to set it to non-default "/" instead of "/cygdrive", we give away the possibility to easily distinguish between cygwin-stuff and windows-stuff and we IMHO gain nothing but a root-directory messed up with things like "/c" "/d" "/m" "/x" and so on.

Here's a code-snippet for shell-scripts (note it's slightly different from the part used in the above mentioned Makefile) to call native windows-programs from within cygwin giving them a "sane" path-environment:

export PATH="$(echo $PATH | tr ':' '\n' | grep /cygdrive | tr '\n' ':')"
>>> call your windows tool here <<<
export PATH="$OLDPATH"

Change History

Changed 11 years ago by emmenlau

Hi! I agree, thanks for bringing this up.

But I would (at the same time) like to have a solution that does not rely on changing the PATH repeatedly. Therefore, before implementing a new solution, we should/could have a telephone-conference and discuss possible options?

Note: See TracTickets for help on using tickets.