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