mtree violation
Ryan Schmidt
ryandesign at macports.org
Wed Mar 7 19:40:18 UTC 2018
On Mar 7, 2018, at 10:24, macports at parvis.nl wrote:
> oops: different answers, which is best?
Using the API offered by the build system is best. In this case, the API is to set the PREFIX argument.
If a Makefile didn't offer a variable for changing the prefix, then you'd have to patch. But since this one does offer a variable, you don't.
> On 2018-03-07, at 12:16, Ryan Schmidt wrote:
>
>> Presumably, you're meant to specify PREFIX=/opt/local in build.args.
>
> The advantage is not making a patch for Makefile.
Yes.
> combined:
> ---------
>
> pre-build {
> build.args PREFIX=${prefix}
> }
>
> :debug:build build phase started at Wed Mar 7 17:17:19 CET 2018
> :notice:build ---> Building jdupes
> :debug:build Executing proc-pre-org.macports.build-build-0
> :debug:build Executing org.macports.build (jdupes)
> :debug:build Environment:
> :debug:build CC_PRINT_OPTIONS='YES'
> :debug:build CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_Users_paul_Develop_macports_jdupes_sysutils_jdupes/jdupes/wor
> k/.CC_PRINT_OPTIONS'
> :debug:build CPATH='/opt/local/include'
> :debug:build LIBRARY_PATH='/opt/local/lib'
> :debug:build MACOSX_DEPLOYMENT_TARGET='10.11'
> :info:build Executing: cd "/opt/local/var/macports/build/_Users_paul_Develop_macports_jdupes_sysutils_jdupes/jdupes/work/jdupes
> -1.9" && /usr/bin/make -j8 -w all PREFIX=/opt/local
> (...)
> :debug:destroot checking for mtree violations
> :warn:destroot violation by /usr
> :warn:destroot jdupes violates the layout of the ports-filesystems!
>
> but it fails. it seems that build.args doesn not overwrite PREIX in Makefile.
It does, but it turns out the makefile doesn't use PREFIX during the build phase. It only seems to use it during the destroot phase. So use:
destroot.args PREFIX=${prefix}
No need to put it inside a pre-destroot block.
More information about the macports-users
mailing list