[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[SCM] Debian package checker branch, master, updated. 2.3.2-10-g2b5273b



The following commit has been merged in the master branch:
commit 026ba5994408b9d427c3555485fcfc26e48a1535
Author: Raphael Geissert <atomo64@gmail.com>
Date:   Thu Jan 28 13:55:30 2010 -0600

    Warn about the use of old-style comments separator on php's .ini files

diff --git a/checks/files b/checks/files
index 9e2a0aa..06e692e 100644
--- a/checks/files
+++ b/checks/files
@@ -261,6 +261,17 @@ foreach my $file (sort keys %{$info->index}) {
 	elsif ($file =~ m,^etc/pam.conf, and $pkg ne "libpam-runtime" ) {
 	    tag "config-file-reserved", "$file by libpam-runtime";
 	}
+	#----------------- /etc/php5/conf.d
+	elsif ($file =~ m,^etc/php5/conf.d/.+\.ini$,) {
+	    open (PHPINI, '<', "unpacked/$file") or fail("cannot open .ini file: $!");
+	    while (<PHPINI>) {
+		next unless (m/^\s*#/);
+		tag "obsolete-comments-style-in-php-ini", $file;
+		# only warn once per file:
+		last;
+	    }
+	    close(PHPINI);
+	}
 	# ---------------- /etc/rc.d
 	elsif ($type ne 'udeb' and $file =~ m,^etc/rc\.d/\S, and $pkg !~ /^(?:sysvinit|file-rc)$/) {
 	    tag "package-installs-into-etc-rc.d", "$file";
diff --git a/checks/files.desc b/checks/files.desc
index ebd3fb6..68fad41 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1091,3 +1091,13 @@ Ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=559208
 Info: This package ships a udev rule and installs it under
  <tt>/etc/udev/rules.d</tt>, which is reserved for user-installed files.
  The correct directory for system rules is <tt>/lib/udev/rules.d</tt>.
+
+Tag: obsolete-comments-style-in-php-ini
+Severity: normal
+Certainty: certain
+Info: This package ships a <tt>.ini</tt> file used to configure php but
+ it has comments using the old-style comment separator <tt>#</tt>.
+ Instead, the <tt>;</tt> separator should be used.
+ .
+ Since version 5.3, the PHP interpreter warns about the use of the
+ old style of comment separator.
diff --git a/t/tests/files-general/debian/debian/install b/t/tests/files-general/debian/debian/install
index bf64f88..484eb07 100644
--- a/t/tests/files-general/debian/debian/install
+++ b/t/tests/files-general/debian/debian/install
@@ -7,3 +7,4 @@ lintian.conf etc/modprobe.d
 dir usr/share/info
 foo.vcproj usr/lib/foo
 lintian-lib.conf etc/ld.so.conf.d
+php-foo.ini etc/php5/conf.d
diff --git a/t/tests/files-general/debian/php-foo.ini b/t/tests/files-general/debian/php-foo.ini
new file mode 100644
index 0000000..6a33666
--- /dev/null
+++ b/t/tests/files-general/debian/php-foo.ini
@@ -0,0 +1 @@
+# this style of comments are obsolete
diff --git a/t/tests/files-general/desc b/t/tests/files-general/desc
index ed35486..1fa3607 100644
--- a/t/tests/files-general/desc
+++ b/t/tests/files-general/desc
@@ -10,6 +10,7 @@ Test-For:
  global-data-in-games-directory
  icon-size-and-directory-name-mismatch
  non-conf-file-in-modprobe.d
+ obsolete-comments-style-in-php-ini
  package-contains-empty-directory
  package-contains-info-dir-file
  package-modifies-ld.so-search-path
diff --git a/t/tests/files-general/tags b/t/tests/files-general/tags
index 7bade1e..7c54162 100644
--- a/t/tests/files-general/tags
+++ b/t/tests/files-general/tags
@@ -10,4 +10,5 @@ I: files-general: duplicated-compressed-file usr/share/doc/lintian/lintian-16x16
 I: files-general: package-contains-empty-directory usr/share/man/man1/random/
 W: files-general: executable-not-elf-or-script ./usr/share/man/man5/foo.5.gz
 W: files-general: icon-size-and-directory-name-mismatch usr/share/apps/lintian/icons/hicolor/22x22/lintian-16x16.png 16x16
+W: files-general: obsolete-comments-style-in-php-ini etc/php5/conf.d/php-foo.ini
 W: files-general: windows-devel-file-in-package usr/lib/foo/foo.vcproj

-- 
Debian package checker


Reply to: