juliangruber / anarchyos

AnarchyOS
MIT License
74 stars 1 forks source link

sandboxed command and module loading #5

Open ghost opened 11 years ago

ghost commented 11 years ago

We need something like nvm/nave for EVERY command and library. Some prior art: http://modules.sourceforge.net/

With the modules package you do module load NAME@VERSION and it creates a subshell with the module or library NAME at the requested VERSION and the LD_LIBRARY_PATH and PATH are updated to point to the vendored lib/ and bin/ directories for NAME.

juliangruber commented 11 years ago

what could we use besides subshells?

AndersDJohnson commented 11 years ago

@juliangruber Symlinks in the PATH?

juliangruber commented 11 years ago

we need something like

$ sub --LD=MODULE_LIBRARY_PATH --PATH=MODULE_PATH

that

juliangruber commented 11 years ago

@adjohnson916 ammending PATH is dealing with a global, while with subshells you're modifying a copy of a global, which is way less prone to errors or side effects.

mmalecki commented 11 years ago

Symlinks in PATH have the advantage of allowing for default version. I think that should allow for both - people expect a sane default version in global scope after installing a package (otherwise adoption might be a problem).

dominictarr commented 11 years ago

if you kept a database (or something) of what versions you want, you could resolve generate a correct PATH that represented the dependency tree you needed.