Opened 7 years ago

Closed 7 years ago

#29704 closed defect (fixed)

go portfile creates bad symlinks

Reported by: cgilmour@… Owned by: singingwolfboy@…
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: haspatch Cc: ryandesign (Ryan Schmidt)
Port: go

Description

Hi,

Installing "go" creates a symbolic link /src/Make.*, instead of a separate link for each individual make file.

116 # gomake command required makefiles

117 ln -s ${prefix}/src/${name}/${name}-${version}/src/Make.* ${destroot}${prefix}/src

Seems to be related to changes from Ticket #29321

I can't find an example in other Portfiles that tries to make symlinks like this, so I don't have a fix/patch.

(I changed mine to use xinstall instead of making symbolic links, plus other changes to install without root privileges. I think the package maintainer might do it a different way instead)

Thanks Caleb

Attachments (2)

go-ln.diff (896 bytes) - added by ryandesign (Ryan Schmidt) 7 years ago.
proposed patch
go-ln.2.diff (957 bytes) - added by ryandesign (Ryan Schmidt) 7 years ago.
fixed proposed patch

Download all attachments as: .zip

Change History (9)

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

Cc: ryandesign@… added
Owner: changed from macports-tickets@… to singingwolfboy@…
Port: go added

The fix is to use an "eval glob" construct.

comment:2 Changed 7 years ago by ryandesign (Ryan Schmidt)

Or possibly an fs-traverse loop.

Changed 7 years ago by ryandesign (Ryan Schmidt)

Attachment: go-ln.diff added

proposed patch

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

Keywords: haspatch added

Or neither of those. ("eval ... [glob ...]" would work if MacPorts' ln supported creating multiple links at once, like the shell's ln does, but it doesn't seem to.) The attached patch uses a "foreach ... [glob ...]" and seems to work. Perhaps this should be committed together with the fix in #29706.

comment:4 Changed 7 years ago by ryandesign (Ryan Schmidt)

No wait, this patch is wrong, needs to glob the files in the destroot...

Changed 7 years ago by ryandesign (Ryan Schmidt)

Attachment: go-ln.2.diff added

fixed proposed patch

comment:5 Changed 7 years ago by ryandesign (Ryan Schmidt)

Here's the fixed version.

comment:6 Changed 7 years ago by singingwolfboy@…

Status: newassigned

Thanks! Verifying your patch on my computer now: it if builds cleanly and fixes the issue, I'll commit it.

comment:7 Changed 7 years ago by singingwolfboy@…

Resolution: fixed
Status: assignedclosed

Committed in r79186.

Note: See TracTickets for help on using tickets.