Commit 754acb1b authored by Kirill Smelkov's avatar Kirill Smelkov

golang: Don't require users to put \ into gowork.install

Previously it was required to put \ into multi-entry gowork.install,
because the way it was processed was to directly pass it into bash
command, and if \n were there the command was cut by bash and the
trailing was considered as another command.

We can avoid that by explicitly processing \n in gowork.install and
translate it to just ' '. This helps people because now gowork.install
becomes just a regular multiline buildout entry, similar e.g. to
gowork.cpkgpath et all.

Here is one example where it helps:

jerome/slapos@95c45fe0 (comment 68408)

/reviewed-by @jerome
/reviewed-on nexedi/slapos!430
parent 6dedddd1
......@@ -61,8 +61,8 @@ environment-extra =
#
# [gowork]
# install =
# lab.nexedi.com/kirr/neo/go/... \
# github.com/pkg/profile \
# lab.nexedi.com/kirr/neo/go/...
# github.com/pkg/profile
# golang.org/x/perf/cmd/benchstat
#
# For Cgo support pkg-config is made pre-available by gowork, and users
......@@ -120,7 +120,7 @@ stop-on-error = true
# clients should put package list to install to gowork:install ("..." requests installing everything)
[gowork.goinstall]
recipe = plone.recipe.command
command = bash -c ". ${gowork:env.sh} && go install ${gowork:buildflags} -v ${gowork:install}"
command = bash -c ". ${gowork:env.sh} && go install ${gowork:buildflags} -v $(echo -n '${gowork:install}' |tr '\n' ' ')"
update-command = ${:command}
stop-on-error = true
......
......@@ -191,9 +191,9 @@ environment =
[gowork]
golang = ${golang19:location}
install =
lab.nexedi.com/kirr/git-backup \
gitlab.com/gitlab-org/gitlab-workhorse \
gitlab.com/gitlab-org/gitlab-workhorse/cmd/gitlab-zip-cat \
lab.nexedi.com/kirr/git-backup
gitlab.com/gitlab-org/gitlab-workhorse
gitlab.com/gitlab-org/gitlab-workhorse/cmd/gitlab-zip-cat
gitlab.com/gitlab-org/gitlab-workhorse/cmd/gitlab-zip-metadata
cpkgpath =
......
......@@ -46,8 +46,8 @@ parts =
# go packages to install (+ automatically their dependencies)
[gowork]
install =
lab.nexedi.com/kirr/neo/go/... \
github.com/pkg/profile \
lab.nexedi.com/kirr/neo/go/...
github.com/pkg/profile
golang.org/x/perf/cmd/benchstat
cpkgpath =
......
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