[Bug 222358] Mk/bsd.port.mk: include /etc/ports.conf as a file to hold ports-specific settings
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Sep 15 21:22:47 UTC 2017
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=222358
Bug ID: 222358
Summary: Mk/bsd.port.mk: include /etc/ports.conf as a file to
hold ports-specific settings
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: Ports Framework
Assignee: portmgr at FreeBSD.org
Reporter: yasu at utahime.org
CC: freebsd-ports-bugs at FreeBSD.org
Created attachment 186423
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=186423&action=edit
patch file
Writing ports-specific settings to /etc/make.conf is not good because such
settings are also applied when you 'make' something that has nothing to with
ports. There is a workaround to guard them as following:
.if !empty(.CURDIR:M*usr/ports*)
# settings that should be applied only for ports build.
.endif
But there is some cases that such a workaround does not work as expected. For
example,
1. When /usr/ports is symbolic link to somewhere else and real path is
somothing like /foo/bar/baz/portsdir.
2. When you decide to do some experiment, check out port tree to
/some/where/temp/ports, cd to /some/where/temp/ports/category/portname, edit
some files and try 'make PORTSDIR=/some/where/temp/ports'.
By contrast including file for ports-specific settings from bsd.port.mk works
well regardless of whether /usr/ports is symbolic link or not, whatever the
real path of /usr/ports is and whatever value is set as PORTSDIR. And in
addtion there is already similar best practice in base system, /etc/src.conf.
So I think this is better way to isolate ports-specific settings from others.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-ports-bugs
mailing list