Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#63305 closed defect (fixed)

goreleaser @0.174.1_1: sh: {MACPORTS_LEGACY_SUPPORT_LDFLAGS=-L/opt/local/lib: No such file or directory

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: herbygillot (Herby Gillot)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc:
Port: goreleaser

Description

There is something wrong with the quoting with regard to the adding of the legacy support flags:

https://build.macports.org/builders/ports-10.12_x86_64-builder/builds/154655/steps/install-port/logs/stdio

sh: {MACPORTS_LEGACY_SUPPORT_LDFLAGS=-L/opt/local/lib: No such file or directory

Change History (3)

comment:1 Changed 3 years ago by ryandesign (Ryan Carsten Schmidt)

The problem is in this block:

post-build {
    system -W ${worksrcpath} "${build.env} ./scripts/completions.sh"
}

build.env is a Tcl list, so Tcl is converting that list to a string representation here for you, but it's not the representation you need. The problem probably only arises when an env value contains a space, which it does when the legacysupport portgroup is in use, which I guess it is here.

I suspect you don't need the legacy support environment variables in order to run this script. Maybe explicitly listing the ones you do need would be a solution, rather than trying to use build.env.

comment:2 Changed 3 years ago by herbygillot (Herby Gillot)

Resolution: fixed
Status: assignedclosed

In 73e109c7ce1bc4317d689e787e1e6b0ea00907b2/macports-ports (master):

goreleaser: run build and post-build step in a unified build script

Closes: #63305

comment:3 Changed 3 years ago by herbygillot (Herby Gillot)

The completions.sh script does run go, so we do need all the environment variables provided by legacysupport. Solution here was just cramming all the build steps into a single build.sh and setting that as the build.cmd so that it gets all the environment variables that would ordinarily go to default build command (go build).

Note: See TracTickets for help on using tickets.