[27709] trunk/base/src/port1.0/portdestroot.tcl
source_changes at macosforge.org
source_changes at macosforge.org
Sun Aug 12 08:13:17 PDT 2007
Revision: 27709
http://trac.macosforge.org/projects/macports/changeset/27709
Author: mww at macports.org
Date: 2007-08-12 08:13:17 -0700 (Sun, 12 Aug 2007)
Log Message:
-----------
mtree-violation: allow files to be installed in /Applications & /Libary, too (see #12434)
Modified Paths:
--------------
trunk/base/src/port1.0/portdestroot.tcl
Modified: trunk/base/src/port1.0/portdestroot.tcl
===================================================================
--- trunk/base/src/port1.0/portdestroot.tcl 2007-08-12 14:36:10 UTC (rev 27708)
+++ trunk/base/src/port1.0/portdestroot.tcl 2007-08-12 15:13:17 UTC (rev 27709)
@@ -229,24 +229,41 @@
ui_debug "checking for mtree violations"
set mtree_violation "no"
- # test files in ${prefix}
- foreach f [glob -directory "${destroot}${prefix}" *] {
- set c [file tail ${f}]
- # ignore bin, sbin, ... and only fail on other names
- switch ${c} {
- bin { }
- etc { }
- include { }
- lib { }
- libexec { }
- sbin { }
- share { }
- var { }
- www { }
- Applications { }
- Library { }
- default { ui_error "violation by ${prefix}/${c}"
+ # prepare the 1st directory name from prefix (e. g. "opt")
+ set dprefix [file tail [file dirname ${prefix}]]
+
+ # look at files in ${destroot}
+ foreach g [glob -directory "${destroot}" *] {
+ set b [file tail ${g}]
+ if { "${b}" == "${dprefix}" } {
+ # this is the normal $prefix-tree
+ foreach f [glob -directory "${destroot}${prefix}" *] {
+ set c [file tail ${f}]
+ # ignore bin, sbin, ... and only fail on other names
+ switch ${c} {
+ bin { }
+ etc { }
+ include { }
+ lib { }
+ libexec { }
+ sbin { }
+ share { }
+ var { }
+ www { }
+ Applications { }
+ Library { }
+ default { ui_error "violation by ${prefix}/${c}"
+ set mtree_violation "yes" }
+ }
+ }
+ } else {
+ # these files are outside $prefix
+ switch ${b} {
+ Applications { ui_debug "port installs files in /Applications" }
+ Library { ui_debug "port installs files in /Library" }
+ default { ui_error "violation by /${b}"
set mtree_violation "yes" }
+ }
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070812/1b90192e/attachment.html
More information about the macports-changes
mailing list