I tried to use the "alternatives" key in my parcels.json. However, Cloudera's parcel validiator kicked it out with:
==> Unrecognized field "scripts.alternatives". Recognized fields are "[defines, _defines]"
My parcel.json file is:
{
"schema_version": 1,
"name": "Runtime",
"version": "2",
"setActiveSymlink": true,
"depends": "",
"replaces": "MATLAB_Runtime",
"conflicts": "",
"provides": [
"mine"
],
"scripts": {
"defines": "env.sh",
"alternatives": "alternatives.json"
},
"packages": [
{ "name" : "Runtime",
"version": "2"
}
],
"components": [
{ "name" : "mine",
"version" : "2",
"pkg_version": "2",
"pkg_release": "2"
}
],
"users":{},
"groups":[]
}
The json validates fine without the "alternatives" key.
The schema for parcels.json is described in One Engineer’s Experience with Parcel.
And the validates.json contents are described in The alternatives.json file