[48083] trunk/base

Rainer Müller raimue at macports.org
Fri Mar 13 22:35:47 PDT 2009


On 14.03.2009 6:29 Uhr, raimue at macports.org wrote:
> Revision: 48083
>           http://trac.macports.org/changeset/48083
> Author:   raimue at macports.org
> Date:     2009-03-13 22:29:50 -0700 (Fri, 13 Mar 2009)
> Log Message:
> -----------
> base/aclocal.m4, base/configure:
> Do expansion on ~ when looking for the home directory of a user.
> 
> Most ports expect applications_dir to be an absolute path starting with a
> slash. If this is not the case, constructs like ${destroot}${applications_dir}
> will fail (work/destroot~foo/). This copies files outside the destroot so they
> will not get installed.
> 
> Thanks to Kevin Reid (kpreid) for the report.
> 
> Modified Paths:
> --------------
>     trunk/base/aclocal.m4
>     trunk/base/configure
> 
> Modified: trunk/base/aclocal.m4
> ===================================================================
> --- trunk/base/aclocal.m4	2009-03-14 05:10:13 UTC (rev 48082)
> +++ trunk/base/aclocal.m4	2009-03-14 05:29:50 UTC (rev 48083)
> @@ -454,7 +454,7 @@
>  	    if test "$DSTUSR" = "root" ; then
>  		MPAPPLICATIONSDIR="/Applications/MacPorts"
>  	    else
> -		MPAPPLICATIONSDIR="~$DSTUSR/Applications/MacPorts"
> +		MPAPPLICATIONSDIR="$(eval echo ~$DSTUSR)/Applications/MacPorts"
>  	    fi
>  	fi

Is there a better way to do the expansion than spawning eval in a sub-shell?

If not, I will also merge this to the 1.7.x branch.

Rainer


More information about the macports-dev mailing list