diff --git a/invfile.lua.md b/invfile.lua.md index 40bf00d..ea7cb69 100644 --- a/invfile.lua.md +++ b/invfile.lua.md @@ -264,12 +264,30 @@ unattended installation. The enabled channels are passed in as well. ' -p /usr/local --copy --yes ' Metadata for Conda packages is stored in JSON files in -`/opt/conda/pkgs/` `/` `info/recipe.json`. Since the version -and build is given in a slightly different format (version--build) in the -`packages.tsv`, we have to convert it first: +`/opt/conda/pkgs/` `/` `info/recipe.json`. + +The revision value in `packages.tsv` is used to name the tag of the +corresponding Docker image, which disallows the use of `=`. However, Conda uses +an equal sign to separate version code and build number. As a solution we propose +using a double dash (`--`) instead in the `packages.tsv`, which can then be translated +into an equal sign when communicating with Conda. + +We support two formats for the version number: Firstly, a simple specification +of the package version (`1.0.0`). During installation, Conda picks the latest build +for this version and installs it. Secondy, a version and build number specification +of the form `1.0.0--2` which translates to version `1.0.0` and build number `2`. + + local packageDirName = '' + local conda_version = '' + if string.find(revision, "--") then + packageDirName = package .. '-' .. + table.concat(split(revision, "--"), "-") + conda_version = table.concat(split(revision, "--"), "=") + else + packageDirName = package .. '-' .. revision .. '-*' + conda_version = '=' .. revision + end - local packageDirName = package .. '-' .. - table.concat(split(revision, "--"), "-") Extracting the info is as simple as copying the `recipe.json` file into the `/info` directory that is available to other build steps. @@ -297,14 +315,6 @@ is set using the revision from the `packages.tsv`. .. ' read desc ; echo $desc > /info/description ; ' .. ' echo ' .. revision .. [==[ > /info/version ) ]==] -The revision value in `packages.tsv` is used to name the tag of the -corresponding Docker image, which disallows the use of `=`. However, Conda uses -an equal sign to separate version code and build number. As a solution we propose -using a double dash (`--`) instead in the `packages.tsv`, which can then be translated -into an equal sign when communicating with Conda. - - local conda_version = table.concat(split(revision, "--"), "=") - The actual build step utilizes the official `miniconda` image from Continuum Analytics with a default shell. It executes the install and extract information commands. Afterwards, with the help of the `jq` utility image, this information is transformed, diff --git a/packages.tsv b/packages.tsv index 6693e10..3694c57 100644 --- a/packages.tsv +++ b/packages.tsv @@ -22,3 +22,5 @@ conda cufflinks 2.2.1--py27_1 (cuffmerge --help 2>&1) | grep Options > /dev/null conda tophat 2.1.0--py27_0 (tophat --version 2>&1) > /dev/null conda curl 7.45.0--1 curl --fail icanhazip.com conda bcftools 1.3--0 bcftools --version +conda bfc r181 bfc 2>&1 | grep bfc > /dev/null +conda bfc r181--0 bfc 2>&1 | grep bfc > /dev/null