Bug 218194 - Mk/Uses/go.mk uses ${LOCALBASE} instead of ${PREFIX} in do-install target
Summary: Mk/Uses/go.mk uses ${LOCALBASE} instead of ${PREFIX} in do-install target
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Ports Framework (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Dmitri Goutnik
Depends on:
Reported: 2017-03-28 21:07 UTC by Athanasios Douitsis
Modified: 2019-11-02 20:04 UTC (History)
2 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Athanasios Douitsis 2017-03-28 21:07:50 UTC
(Apologies if I have figured something wrong in this)

In Mk/Uses/go.mk do-install target, line 88 says:


In many cases, one wants to install in different places than ${LOCALBASE}, which if left unchanged will default to /usr/local. 

Example 1 is when running "port test", which will try to set ${PREFIX} directly, but leave ${LOCALBASE} untouched. So, running 'port test' in a USES=go port and with the default do-install target will cause failure during the install phase.

Example 2 is running 'make clean; make package PREFIX=/var/tmp/`make -V PORTNAME`', as suggested in https://www.freebsd.org/doc/en/books/porters-handbook/porting-prefix.html. Again, changing ${PREFIX} does not change the install location which is still /usr/local and the make package command fails.

I respectfully submit that perhaps ${LOCALBASE} should be changed to ${PREFIX}.
Comment 1 Ben Woods freebsd_committer 2018-01-06 06:47:05 UTC
Assign to go maintainer.
Comment 2 Tobias Kortkamp freebsd_committer 2019-11-02 20:04:35 UTC
USES=go uses PREFIX now after one of the many recent changes by dmgk@.