I am working on some configuration management tools for a modules
installation.
I *think* I need to solve two problems.
The first is "does X exist?", where X would be a module. This would be
mostly used for dependency stuff. I will have to address version issues
soon - phase 1 could be "does any version of X exist?", phase 2 could be
"does X/1.2.3 exist?", and phase 3 could be "Do we have version 1.2.3 or
later of X"?
I think that I can solve all of these cases with something that says "give
me the list of all versions of X that we know about." An empty list imples
that we don't have X installed at all. It's then up to some other layer to
implement the selection criteria (phases 1-3) described above.
The 2nd problem has to do with getting paths.
Sometimes while building software one needs a particular version of a tool.
It may not be possible to simply prepend a module containing this tool to
the PATH; indeed, we don't *know* if that tool's modulefile will prepend or
append to the PATH, or how it will affect any other part of the environment.
One can have a "nest" of disparate dependencies.
So we may need an explicit path to the tool so we can use it during the
build.
Related to this problem is the issue of libraries and #include paths.
I'm thinking that the baby step toward understanding this issue better (and
making some progress) would be to have a way to get the path to the "top" of
the installation area for a particular module, and from there one could:
mp=`module path foo/1.2.3`
and:
CFLAGS+= -I$mp/include
LDFLAGS+= -L$mp/lib
PROG_FOO= $mp/bin/foo
Thoughts or ideas please?
H
|