[lintian] 02/02: Test for packages shipping "gschemas.compiled" files. Thanks to Andreas Beckmann for the idea. (Closes: #884142)
This is an automated email from the git hooks/post-receive script.
lamby pushed a commit to branch master
in repository lintian.
commit 084d28abb0b4f278837c39801fc7a2d6b9447f61
Author: Chris Lamb <lamby@debian.org>
Date: Tue Dec 12 10:30:02 2017 +0000
Test for packages shipping "gschemas.compiled" files. Thanks to Andreas Beckmann for the idea. (Closes: #884142)
---
checks/files.desc | 8 ++++++++
checks/files.pm | 5 +++++
debian/changelog | 2 ++
t/tests/files-general/debian/debian/dirs | 1 +
t/tests/files-general/debian/debian/rules | 1 +
t/tests/files-general/desc | 1 +
t/tests/files-general/tags | 2 ++
7 files changed, 20 insertions(+)
diff --git a/checks/files.desc b/checks/files.desc
index 1d72a44..0415278 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1816,3 +1816,11 @@ Info: The package is architecture-dependent, ships a static library in a
marking says that the architecture should not matter.
.
Please remove the <tt>Multi-Arch: foreign</tt> stanza.
+
+Tag: package-contains-compiled-glib-schema
+Severity: serious
+Certainty: certain
+Info: This package contains a file named <tt>gschemas.compiled</tt>. This
+ file is generated automatically by triggers and it must not be shipped in
+ any package.
+Refs: #883801
diff --git a/checks/files.pm b/checks/files.pm
index 50701f4..8034913 100644
--- a/checks/files.pm
+++ b/checks/files.pm
@@ -459,6 +459,11 @@ sub run {
push(@devhelp_links, $blessed);
}
+ if ($file->basename eq 'gschemas.compiled') {
+ tag 'package-contains-compiled-glib-schema', $file;
+ warn $fname;
+ }
+
# check for generic obsolete path
foreach my $obsolete_path ($OBSOLETE_PATHS->all) {
my $obs_data = $OBSOLETE_PATHS->value($obsolete_path);
diff --git a/debian/changelog b/debian/changelog
index f97c88d..a418267 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -14,6 +14,8 @@ lintian (2.5.63) UNRELEASED; urgency=medium
report. (Closes: #882684)
+ [CL] Raise the certainty of multiarch-foreign-shared-library from
"wild guess" to "possible" on the suggestion of Helmut Grohne.
+ + [CL] Test for packages shipping "gschemas.compiled" files. Thanks
+ to Andreas Beckmann for the idea. (Closes: #884142)
* checks/python.pm:
+ [CL] Also check for packages installing modules called "site" or
"docs" into the global namespace. (Closes: #769365)
diff --git a/t/tests/files-general/debian/debian/dirs b/t/tests/files-general/debian/debian/dirs
index 11d63ba..2ca6f28 100644
--- a/t/tests/files-general/debian/debian/dirs
+++ b/t/tests/files-general/debian/debian/dirs
@@ -2,6 +2,7 @@ etc
usr/bin
usr/doc
usr/share/foo
+usr/share/glib-2.0/schemas
usr/share/man/man1/random
var/catman
var/lock/lintian
diff --git a/t/tests/files-general/debian/debian/rules b/t/tests/files-general/debian/debian/rules
index 919b694..2cda0ff 100755
--- a/t/tests/files-general/debian/debian/rules
+++ b/t/tests/files-general/debian/debian/rules
@@ -23,6 +23,7 @@ override_dh_install:
touch $(tmp)/usr/share/foo/'*'
touch $(tmp)/usr/share/foo/'ws '
touch $(tmp)/usr/share/foo/.nfs-fake-tmpfile
+ touch $(tmp)/usr/share/glib-2.0/schemas/gschemas.compiled
# If the following line gets messed up, it can be
# restored with something like:
# sed -i 's/@FILE@/bokm\xe5l/'
diff --git a/t/tests/files-general/desc b/t/tests/files-general/desc
index 840a036..19fffde 100644
--- a/t/tests/files-general/desc
+++ b/t/tests/files-general/desc
@@ -23,6 +23,7 @@ Test-For:
non-conf-file-in-modprobe.d
non-standard-toplevel-dir
obsolete-comments-style-in-php-ini
+ package-contains-compiled-glib-schema
package-contains-empty-directory
package-contains-info-dir-file
package-contains-mime-cache-file
diff --git a/t/tests/files-general/tags b/t/tests/files-general/tags
index f64f6d6..84cdec0 100644
--- a/t/tests/files-general/tags
+++ b/t/tests/files-general/tags
@@ -11,6 +11,7 @@ E: files-general: global-data-in-games-directory usr/share/games/icons/hicolor/2
E: files-general: lengthy-symlink usr/share/doc/bar/star ../bar/foo
E: files-general: non-conf-file-in-modprobe.d etc/modprobe.d/--lzma
E: files-general: non-standard-toplevel-dir new-top-level-dir/
+E: files-general: package-contains-compiled-glib-schema usr/share/glib-2.0/schemas/gschemas.compiled
E: files-general: package-contains-info-dir-file usr/share/info/dir.gz
E: files-general: package-contains-mime-cache-file usr/share/mime/types
E: files-general: package-contains-mimeinfo.cache-file usr/share/applications/mimeinfo.cache
@@ -32,3 +33,4 @@ W: files-general: nfs-temporary-file-in-package usr/share/foo/.nfs-fake-tmpfile
W: files-general: obsolete-comments-style-in-php-ini etc/php/7.0/mods-available/php-foo.ini
W: files-general: raster-image-in-scalable-directory usr/share/icons/hicolor/scalable/apps/lintian-16x16.png
W: files-general: windows-devel-file-in-package usr/lib/foo/foo.vcproj
+usr/share/glib-2.0/schemas/gschemas.compiled at /home/lamby/git/debian/lintian/lintian/checks/files.pm line 464.
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git
Reply to: