Update of /cvsroot/fink/fink/perlmod/Fink
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv957
Modified Files:
ChangeLog Validation.pm
Log Message:
Catch *Script explicit interpretter calls that do not fail if their commands
crash.
Index: Validation.pm
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/Validation.pm,v
retrieving revision 1.202
retrieving revision 1.203
diff -u -d -r1.202 -r1.203
--- Validation.pm 6 Dec 2005 22:36:12 -0000 1.202
+++ Validation.pm 13 Dec 2005 05:59:17 -0000 1.203
@@ -29,6 +29,7 @@
use File::Find qw(find);
use File::Path qw(rmtree);
use File::Temp qw(tempdir);
+use File::Basename qw(basename);
use strict;
use warnings;
@@ -298,6 +299,7 @@
# + Check syntax of dpkg Depends-style fields
# + validate dependency syntax
# + Type is not 'dummy'
+# + Explicit interp in pkg-building *Script get -ev or -ex
#
# TODO: Optionally, should sort the fields to the recommended field order
# - better validation of splitoffs
@@ -923,6 +925,26 @@
}
}
+ # Explicit interpretters in fink package building script should be
+ # called with -ev or -ex so that they abort if any command fails
+ foreach my $field (qw/patchscript compilescript installscript/) {
+ next unless defined ($value = $properties->{$field});
+ if ($value =~ /^\s*\#!\s*(\S+)\s*(.*)/) {
+ my ($shell, $args) = ($1, $2);
+ $shell = basename $shell;
+ if (grep {$shell eq $_} qw/bash csh ksh sh tcsh zsh/) {
+ unless ($args =~ /-\S*e/) {
+ print "Warning: -e flag not passed to
explicit interpreter in \"$field\"$splitoff_field. ($filename)\n";
+ $looks_good = 0;
+ }
+ unless ($args =~ /-\S*[vx]/) {
+ print "Warning: -v or -x flag not
passed to explicit interpreter in \"$field\"$splitoff_field. ($filename)\n";
+ $looks_good = 0;
+ }
+ }
+ }
+ }
+
return $looks_good;
}
Index: ChangeLog
===================================================================
RCS file: /cvsroot/fink/fink/perlmod/Fink/ChangeLog,v
retrieving revision 1.1203
retrieving revision 1.1204
diff -u -d -r1.1203 -r1.1204
--- ChangeLog 9 Dec 2005 17:42:50 -0000 1.1203
+++ ChangeLog 13 Dec 2005 05:59:17 -0000 1.1204
@@ -1,3 +1,8 @@
+2005-12-13 Daniel Macks <[EMAIL PROTECTED]>
+
+ * Validation.pm: .info validator warns if an explicit #!
+ interpretter is used but -e and -v flags are not passed to it.
+
2005-12-09 Daniel Macks <[EMAIL PROTECTED]>
* Engine.pm: Milder warning when unable to remove buildlocks when
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Fink-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-commits