Commit a8cb408d authored by Jérome Perrin's avatar Jérome Perrin

slaprunner: fix slapos-software parameter usage

It was applied by the combination of [slapos-repo] that checkouts master
branch and [slapos-repo-config] that checkouts
$${slap-parameter:slapos-software} branch afterwards.
When instance profile runs for the second time, [slapos-repo] resets to
master and [slapos-repo-config] does nothing.
This fix consists in using directly $${slap-parameter:slapos-software}
in [slapos-repo].

[slapos-repo-config] was also setting up .project, this is still the
case and the section was renamed to [instance-software] for
consistency.
parent f6ecf165
......@@ -19,9 +19,9 @@ parts =
symlinks
shellinabox
slapos-cfg
slapos-repo-config
cron-entry-prepare-software
deploy-instance-parameters
instance-software
instance-software-type
minishell-cwd
bash-profile
......@@ -558,12 +558,7 @@ repository = $${slap-parameter:slapos-repository}
git-executable = ${git:location}/bin/git
develop = true
location = $${directory:project}/slapos
[slapos-repo-config]
recipe = plone.recipe.command
stop-on-error = true
command = cd $${slapos-repo:location} && ${git:location}/bin/git checkout $${slap-parameter:slapos-reference} && SR=$${slap-parameter:slapos-software} && if [ -n "$SR" ] && [ ! -f "$${directory:etc}/.project" ]; then echo workspace/slapos/$${slap-parameter:slapos-software}/ > $${directory:etc}/.project; fi
update-command = true
branch = $${slap-parameter:slapos-reference}
[prepare-software]
recipe = slapos.cookbook:wrapper
......@@ -599,6 +594,11 @@ stop-on-error = true
software-type-path = $${directory:etc}/.software_type.xml
command = if [ ! -f $${:software-type-path} -a "$${slap-parameter:slapos-software-type}" != "" ]; then echo "$${slap-parameter:slapos-software-type}" > $${:software-type-path}; fi
[instance-software]
recipe = plone.recipe.command
stop-on-error = true
command = SR=$${slap-parameter:slapos-software} && if [ -n "$SR" ] && [ ! -f "$${directory:etc}/.project" ]; then echo workspace/slapos/$${slap-parameter:slapos-software}/ > $${directory:etc}/.project; fi
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = $${slap-connection:computer-id}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment