[27780] branches/release_1_5/base
source_changes at macosforge.org
source_changes at macosforge.org
Tue Aug 14 00:46:52 PDT 2007
Revision: 27780
http://trac.macosforge.org/projects/macports/changeset/27780
Author: jmpp at macports.org
Date: 2007-08-14 00:46:52 -0700 (Tue, 14 Aug 2007)
Log Message:
-----------
Merged revisions 26683-26692,26695-26708,26712-26718,26720,26724-26729,26732-26736,26738-26743,26745-26752,26754-26764,26766-26803,26805,26807-26808,26810,26815-26828,26830-26841,26843-26849,26852-26862,26867-26869,26871-26902,26904-26920,26922-26936,26938-26939,26941,26943-26975,26977-27017,27019-27020,27023,27027-27042,27045-27052,27054-27064,27066-27078,27081-27109,27111-27121,27123-27126,27128-27139,27141-27198,27200,27203-27294,27298-27312,27314-27378,27380-27404,27406-27414,27416-27509,27511-27517,27529-27616,27619,27623-27641,27643,27645-27646,27648-27710,27712-27779 via svnmerge from
http://svn.macports.org/repository/macports/trunk/base
........
r27709 | mww at macports.org | 2007-08-12 11:13:17 -0400 (Sun, 12 Aug 2007) | 2 lines
mtree-violation: allow files to be installed in /Applications & /Library, too (see #12434)
........
r27710 | mww at macports.org | 2007-08-12 11:26:19 -0400 (Sun, 12 Aug 2007) | 2 lines
add a warning message if a port indicates an mtree violation
........
r27719 | mww at macports.org | 2007-08-12 16:58:37 -0400 (Sun, 12 Aug 2007) | 2 lines
make violations of the layout of the ports-filesystems non-fatal (for now), only issue warnings
........
r27720 | mww at macports.org | 2007-08-12 17:00:48 -0400 (Sun, 12 Aug 2007) | 2 lines
also do not complain about "/Developer"
........
r27773 | eridius at macports.org | 2007-08-14 02:14:52 -0400 (Tue, 14 Aug 2007) | 1 line
Building a better mtree violations check
........
r27779 | jmpp at macports.org | 2007-08-14 03:44:07 -0400 (Tue, 14 Aug 2007) | 1 line
Update ChangeLog with up coming 1.5.11 information.
........
Modified Paths:
--------------
branches/release_1_5/base/ChangeLog
branches/release_1_5/base/src/port1.0/portdestroot.tcl
Property Changed:
----------------
branches/release_1_5/base/
Property changes on: branches/release_1_5/base
___________________________________________________________________
Name: svnmerge-integrated
- /trunk/base:1-26681,26683-26803,26805,26807-26812,26814-26864,26867-27517,27529-27620,27622-27647
+ /trunk/base:1-26681,26683-26803,26805,26807-26812,26814-26864,26867-27517,27529-27620,27622-27710,27712-27779
Modified: branches/release_1_5/base/ChangeLog
===================================================================
--- branches/release_1_5/base/ChangeLog 2007-08-14 07:44:07 UTC (rev 27779)
+++ branches/release_1_5/base/ChangeLog 2007-08-14 07:46:52 UTC (rev 27780)
@@ -4,6 +4,13 @@
###
+Release 1.5.11 (DAY-August-2007 at branches/release_1_5's rREV, by jmpp):
+
+ - Fix mtree checks which inaccurately complained about files in /Applications, /Library & /Developer;
+ mtree checks now also warn the user if a port indicates an intended violation and errors are
+ temporarily non-fatal (mww & eridius in r27709, r27710, r27719, r27720 & r27773).
+
+
Release 1.5.1 (11-August-2007 at branches/release_1_5/base's r27646, by jmpp):
- Remove sed rules taking care of dp based comments in the macports.conf file from the upgrade target in base/Makefile.in,
Modified: branches/release_1_5/base/src/port1.0/portdestroot.tcl
===================================================================
--- branches/release_1_5/base/src/port1.0/portdestroot.tcl 2007-08-14 07:44:07 UTC (rev 27779)
+++ branches/release_1_5/base/src/port1.0/portdestroot.tcl 2007-08-14 07:46:52 UTC (rev 27780)
@@ -229,31 +229,58 @@
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}"
- set mtree_violation "yes" }
+ set prefixPaths [list bin etc include lib libexec sbin share var www Applications Developer Library]
+
+ set pathsToCheck [list /]
+ while {[llength $pathsToCheck] > 0} {
+ set pathToCheck [lshift pathsToCheck]
+ foreach file [glob -nocomplain -directory $destroot$pathToCheck .* *] {
+ if {[file tail $file] eq "." || [file tail $file] eq ".."} {
+ continue
+ }
+ if {[string equal -length [string length $destroot] $destroot $file]} {
+ # just double-checking that $destroot is a prefix, as is appropriate
+ set dfile [file join / [string range $file [string length $destroot] end]]
+ } else {
+ throw MACPORTS "Unexpected filepath `${file}' while checking for mtree violations"
+ }
+ if {$dfile eq $prefix} {
+ # we've found our prefix
+ foreach pfile [glob -nocomplain -tails -directory $file .* *] {
+ if {$pfile eq "." || $pfile eq ".."} {
+ continue
+ }
+ if {[lsearch -exact $prefixPaths $pfile] == -1} {
+ ui_warn "violation by [file join $dfile $pfile]"
+ set mtree_violation "yes"
+ }
+ }
+ } elseif {[string equal -length [expr [string length $dfile] + 1] $dfile/ $prefix]} {
+ # we've found a subpath of our prefix
+ lpush pathsToCheck $dfile
+ } else {
+ # these files are outside of the prefix
+ switch $dfile {
+ /Applications -
+ /Developer -
+ /Library { ui_debug "port installs files in $dfile" }
+ default {
+ ui_warn "violation by $dfile"
+ set mtree_violation "yes"
+ }
+ }
+ }
}
}
# abort here only so all violations can be observed
if { ${mtree_violation} != "no" } {
- error "mtree violation!"
+ ui_warn "[format [msgcat::mc "%s violates the layout of the ports-filesystems!"] [option portname]]"
+ ui_warn "Please fix or indicate this misbehavior (if it is intended), it will be an error in future releases!"
+ # error "mtree violation!"
}
+ } else {
+ ui_warn "[format [msgcat::mc "%s requests to install files outside the common directory structure!"] [option portname]]"
}
# Restore umask
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20070814/af82ce32/attachment.html
More information about the macports-changes
mailing list