MacPorts wrote:
> #18602: Prevent MacPorts from being configured with --prefix=/usr/local
> -------------------------------------+--------------------------------------
> Reporter: ryandes...@… | Owner: macports-tick...@…
>
> Type: defect | Status: new
>
> Priority: Normal | Milestone: MacPorts 1.8.0
>
> Component: base | Version: 1.7.0
>
> Keywords: | Port:
>
> -------------------------------------+--------------------------------------
> MacPorts should not allow users to configure it with
> `--prefix=/usr/local`. Doing so surely breaks some ports, such as
> [comment:ticket:15778:3 macfuse].
I don't think we should forbid it completely. Adding a warning and a
link to the appropriate FAQ entry should be enough.
The port macfuse is broken in a very different way, it's not respecting
${prefix} at all, but hardcoding /opt/local. The problem in the proposed
patch is that it is making assumptions about paths which it should not
be doing.
Imagine it would be untaring to ${destpath}/opt/local by default, there
would be the same problem just with another path. And I am pretty sure
you don't want to forbid that path being used as a prefix. Forbidding
paths being used as prefix is not the proper solution to fix the macfuse
port.
The problem can be overcome by comparing "/usr/local" to the current
prefix, rename it to a temporary filename before renaming to the real
target or untar only parts of the tarball to the correct location right
away.
This would work:
tar -xjf $tarname -C ${destpath}${prefix} --strip-components 2 usr/local
tar -xjf $tarname -C ${destpath} Library
Rainer
_______________________________________________
macports-dev mailing list
[email protected]
http://lists.macosforge.org/mailman/listinfo.cgi/macports-dev