mtree violations should be debug info, should not be fatal errors

robert delius royar apple at frinabulax.org
Sun Aug 12 06:39:31 PDT 2007


Sun, 12 Aug 2007 (00:02 -0500 UTC) Ryan Schmidt wrote:

> I'm not sure I like that mtree violations are fatal errors. The ports that 
> are now failing to install because of mtree violations installed just fine in 
> MacPorts 1.5.0. Why should they now fail to install? Their content has not 
> changed. Sure, they may be installing things in places they shouldn't, but 
> why should we make the user suffer? We have a -t switch which informs us 
> about forgotten dependencies in the port -- but this does not issue a fatal 
> error. It's just a message which portfile authors can use to improve their 
> portfiles. Maybe mtree violations could be handled similarly.
>
> I'm also concerned about needing to specify in the portfile that the port 
> intends to violate the mtree. For example, I'm going to have to add that to 
> the php5 port, because it wants to install an apache2 module and the apache2 
> layout is considered nonstandard. So just because I want to install one item 
> in a weird place, I have to turn off the mtree violation checks in the entire 
> php5 portfile. It would be nicer if port would just issue nonfatal debug 
> messages letting us know exactly which files were violating the mtree. This 
> way I could assure myself that my port is installing the apache2 module in a 
> weird place, yes, but that everything else is being installed in sane 
> locations.

What if you were to add a directive for port file such as 
add_to_mtree_exceptions(portname|portgroup, [exception-paths, ...])
Then each exceptional port could be registered when it installs.  The 
database could be seeded with ports in certain groups such as aqua.

When a port lists a dependency on one of the exceptionals, and that port 
tries to install something outside ${prefix}, the install path could be 
checked against the exceptions stored for the dependency and any new 
ones added by the port.  If the directory is not in the list, then a 
warning gets issued.

-- 
Dr. Robert Delius Royar                   Associate Professor of English
Morehead State University                             Morehead, Kentucky




More information about the macports-dev mailing list