[113135] trunk/base/src/port1.0/portlint.tcl
raimue at macports.org
raimue at macports.org
Sat Nov 9 19:56:06 PST 2013
Revision: 113135
https://trac.macports.org/changeset/113135
Author: raimue at macports.org
Date: 2013-11-09 19:56:06 -0800 (Sat, 09 Nov 2013)
Log Message:
-----------
lint: Check for hardcoded prefix path
Modified Paths:
--------------
trunk/base/src/port1.0/portlint.tcl
Modified: trunk/base/src/port1.0/portlint.tcl
===================================================================
--- trunk/base/src/port1.0/portlint.tcl 2013-11-10 01:46:27 UTC (rev 113134)
+++ trunk/base/src/port1.0/portlint.tcl 2013-11-10 03:56:06 UTC (rev 113135)
@@ -285,7 +285,16 @@
set hashline false
}
}
-
+
+ # Check for hardcoded paths
+ if {!$hashline
+ && $name != "MacPorts"
+ && [string match "*/opt/local*" $line]
+ && ![regexp {^\s*reinplace} $line]
+ && ![regexp {^\s*system.*\Wsed\W} $line]} {
+ ui_error "Line $lineno hardcodes /opt/local, use \${prefix} instead"
+ }
+
### TODO: more checks to Portfile syntax
incr lineno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131109/bb93418d/attachment.html>
More information about the macports-changes
mailing list