Sidai team: vwrapper -- `version wrapper' for user applicationsThe Sidai `vwrapper' allows multiple versions of a particular tool to coexist on the system and allows different users to use different version-sets transparently. This is handy for a number of situations:
So for instance, with coreBulder (from Synopsys' SRT hardware design package), you can do: sli4523:/home/mholgate: coreBuilder --show-versions Versions of coreBuilder available: 2000_10_25 2001_01_30and sli4523:/home/mholgate: coreBuilder --use-version=2000_10_25and the correct version will be invoked. You might use this in a Makefile to ensure that every developer in a project uses the same set of tools. You can have a $HOME/.wrapperrc file which specifies default versions of packages to use, which is more use when manually invoking tools: synopsys-srt=2000_10_25 gcc=2.95.2 coreutils=5.2.1There is also an equivalent site wide file. Vwrapper it takes advantage of the fact that the Sidai Way of handling packages is to have a deployment directory with a name containing the version of the package eg: /our/.-ark-deploy/synopsys-srt--2000_10_25 /our/.-ark-deploy/synopsys-srt--2001_01_30It generates a wrapper for each executable which simply invokes the correct version of the real tool. The actual code for the wrapper is in the sidai-vwrapper package, while the ark-vwrapped proto-package is used for packages that wish to use the wrapper. So for GNU `ls' (a silly example!), you might have the following packages: coreutils--5.0.0 coreutils--5.2.1which are standard ARK packages, but are only deployed and not revealed. You would also have a coreutils-wrapperpackage, which would have ark-vwrapper as a prototype and would simply generate a wrapper script for all the binaries in coreutils (including `ls'). (See below). These would be revealed in place of the real binary. So you would have: /our/bin/gls (wrapper script from coreutils-wrapper package)and /our/.-ark-deploy/coreutils--5.0.0/bin/gls /our/.-ark-deploy/coreutils--5.2.1/bin/gls(real binaries from the coreutils--5.0.0 and coreutils--5.2.1 packages).
#!/usr/bin/env python
# Autogenerated Sidai-style version wrapper for:
# bin/gls
# in package:
# coreutils
#
import sys
sys.path.append("/our/lib/sidai-vwrapper")
import wrapper
SYSADMIN = "matt@verilab.com"
DEPLOY_DIR = "/our/.-ark-deploy"
GLOBAL_CONF = "/our/lib/sidai-vwrapper/default-coreutils"
USER_CONF = "~/.wrapperrc"
EXECUTABLE = "bin/ls"
PACKAGE = "coreutils"
try:
wrapper.wrap( sys.argv, EXECUTABLE, PACKAGE,
DEPLOY_DIR, GLOBAL_CONF, USER_CONF )
except wrapper.ExitSuccess, e:
sys.exit( 0 )
except wrapper.ExitFailure, e:
sys.stderr.write( '[wrapper] %s\n' % e )
sys.stderr.write( 'If you did not expect this error, please contact '
+ SYSADMIN + '.\n' )
sys.exit( 99 )
|