[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[ptp-dev] Where to insert Modules commands for remote sync build
|
This is mostly for Greg, I think. We can move this discussion offline or to a Bugzilla bug if you prefer.
So far, I have Modules support prototyped for building remote synchronized projects. In short, I adjusted the call to remoteServices.getProcessBuilder() in SyncCommandLauncher so that, instead of executing the obvious command (say, "make -f Makefile.mk"), it executes a horrifically long Bash invocation like
bash -l -c for MODULE in `module -t list 2>&1 | grep -E -v ':$|^[ \t]*$'`; do module unload "$MODULE"; done; module load user_paths; module load os_paths; make -f Makefile.mk (Modules commands are only available in login shells, thus
bash -l; and the obvious
module purge doesn't work on some machines, thus list/grep/unload.)
It would be a bit cleaner if all of this could be dumped into a script (IRemoteScript), but script construction seems to happen in RemoteToolsProcessBuilder and isn't easily accessible to the SyncCommandLauncher... and, it wouldn't be available under RSE anyway, from what I can tell.
So, is replacing the command sent to #getProcessBuilder with a Bash invocation the best way to handle this, or do you have a better idea?
Jeff