Set the default version in modulefiles - environment-modules

Given a directory containing modulefiles for several versions, how does one set a default so that the user can type module load random_tool without having to specify the version number?
% ls random_tool
1.2 2.3 3.0

Given a directory of modulefiles:
% cd random_tool
% ls
1.2 2.3 3.0
You can set one of them to be the default by creating a .version file. For example let's say we want 2.3 to be the default. We create the following .version file.
#%Module
set ModulesVersion 2.3
Now when a person loads random_tool they will get version 2.3.
% module load random_tool
% random_tool --version
2.3
%

Related

Yoctoproject - include newer coreutils (stat)

I am trying to build a custom distribution for an embedded device. I need the 'stat'-command (which is part of GNU coreutils) to support long-options, e.g. stat --printf.
The stat-version the build currently includes is ancient and does not support long-options.
root#target:/# stat -v
stat version 3.0
The receipe for stat is located at sources/poky/meta/recipes-extended/stat_3.3.bb which points to http://www.ibiblio.org/pub/Linux/utils/file/stat-3.3.tar.gz as its SRC_URI.
The coreutils receipe is located at sources/poky/meta/recipes-core/coreutils/coreutils_8.27.bb which points to https://ftp.gnu.org/gnu/coreutils/coreutils-8.27.tar.xz as its SRC_URI.
How I understand it, bitbake uses ALTERNATIVE_PRIORITY[stat] which is defined in both recipes to decide which version is to be included. Since the coreutils_8.27 should be new enough, I tried to simply delete the stat_3.3-receipe. This didn't work, the old 3.3 version of stat is still included.
What would be the best way to include a newer version or coreutils (or stat) which supports long-options?
To fix this I had to include the 'coreutils'-package (IMAGE_INSTALL_append += " coreutils") in my local.conf and raise the ALTERNATIVE_PRIORITY for the coreutils-package.

SchemaCrawler 16.12 version command line not creating my htmlx output

I am using the latest version of schemacrawler (16.1.2) to generate SVG diagrams embedded in HTML output. However it is not creating the diagrams but only printing the table information in text form. If I use an older version of schemacrawler, it works fine. I have Graphviz installed on my machine. What am I doing wrong that is not outputting the diagram?
For Version 16.1.2 this version of the command line I use is not working
source schemacrawler.sh --server=postgresql --host=hostname --database=db_name --user=username --password=password_name --info-level=standard --schemas=schema_name --command=schema --outputformat=htmlx --log-level=CONFIG > schemaGraph.html
For Version 14.17, this version of the command works fine for me
source schemacrawler.sh -server=postgresql -host=hostname -database=db_name -user=username -password=password_name -infolevel=minimum -command=schema -outputformat=htmlx -loglevel=CONFIG > schemaGraph.html
Please try --output-format and see if it works.

upgrading Ajax Control Toolkit 3.0.20820

I need to upgrade my ajaxcontroltoolkit dll version - 3.0.20820 with the latest version 16.1
Below are couple of controls/class, for which I am facing issue:
CollapsiblePanelExtender: property used: CollapsedCssClass & ExpandedCssClass
PasswordStrength: property used: Strength
CalendarExtender: property used: CalendarMode & Enum - CalendarModeType
Q. What can we use instead of above properties as they are not available in version - 16.1?

Does ver only support toolbox?

The link here mentions that the following line is placed in the second line of the Contents.m file, calling ver will print it out as the version.
% Version 1.0.0.0 20-Dec-2016
Does this work only for toolboxes? I have a non-toolbox folder foo. If I do ver foo, it said it cannot find the correct format of version.
It works for any folder on the MATLAB path.
Create a folder called mytmpfolder, and put in it the following file Contents.m:
Contents.m
% MYTMPFOLDER
% Version 2.1.8 (My Version Name) 16-Dec-2016
%
% Description goes here.
%
% MYTMPFOLDER
% mytmpfolder - Some code for doing stuff.
Make sure mytmpfolder is on the MATLAB path. Then type:
>> help mytmpfolder
mytmpfolder
Version 2.1.8 (My Version Name) 16-Dec-2016
Description goes here.
mytmpfolder
mytmpfolder - Some code for doing stuff.
>> ver mytmpfolder
----------------------------------------------------------------------------------------------------
MATLAB Version: 9.0.0.341360 (R2016a)
MATLAB License Number: 628350
Operating System: Microsoft Windows 7 Enterprise Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
----------------------------------------------------------------------------------------------------
MYTMPFOLDER Version 2.1.8 (My Version Name)
>> v = ver('mytmpfolder')
v =
Name: 'MYTMPFOLDER'
Version: '2.1.8'
Release: '(My Version Name)'
Date: '16-Dec-2016'
By the way, there's not really any such thing as a "toolbox folder" vs a "non-toolbox folder". Toolboxes are products from MathWorks, or products that other people make, but once they're installed they're really just folders full of code like any other folders full of code. You'd usually use a mechanism like Contents.m to indicate that a folder represented a sort of special point that collected together an important set of code, but it's up to you.

How to add pre-build step in qmake/qtcreator?

I want the compiled application to have the commit number, source files checksums and other things to be available during the compilation.
In plain Makefiles I do like this:
prog: VERSION source.c
gcc -DVERSION=\"$(shell cat VERSION)\" source.c -o prog
VERSION: .git
git describe > VERSION
How to use something similar with qmake?
If you were to pass the version information as an included file (let's say "version.h") instead of a #define, then you could add the following to your qmake file
# Define how to create version.h
version.target = version.h
version.commands = <PUT_YOUR_COMMANDS_HERE>
version.depends = .git
QMAKE_EXTRA_TARGETS += version
PRE_TARGETDEPS += version.h
The first 3 lines tell how to make a new target object called "version" that generates "version.h". It is made by executing the commands "<PUT_YOUR_COMMANDS_HERE>". The target is dependent on ".git"
The "QMAKE_EXTRA_TARGETS" says there is a new target known as "version".
The "PRE_TARGETDEPS" indicates that "version.h" needs to exist before anything else can be done (which forces it to be made if it isn't already made).
A simpler solution even if #jwernemy as nice way to solve it:
VERSION = $$system(-git-dir=$PWD/.git <PUT_YOUR_GIT_COMMANDS_HERE>)