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

[SCM] Debian package checker branch, master, updated. 2.2.11-22-gea164ad



The following commit has been merged in the master branch:
commit ea164ad1bcdf175ddc9905d3c86236d2cb1215d7
Author: Russ Allbery <rra@debian.org>
Date:   Thu Jun 18 14:40:44 2009 -0700

    Check for incorrect mixing of bitmap fonts in one package
    
    * checks/files{,.desc}:
      + [RA] Diagnose packages including both 100dpi and 75dpi fonts or
        mixing misc and Xdpi fonts.

diff --git a/checks/files b/checks/files
index 4cdd6ee..28208d9 100644
--- a/checks/files
+++ b/checks/files
@@ -161,6 +161,10 @@ my $warned_debug_name = 0;
 my @devhelp;
 my @devhelp_links;
 
+# X11 bitmapped font directories under /usr/share/fonts/X11 in which we've
+# seen files.
+my %x11_font_dirs;
+
 # Read package contents...
 foreach my $file (sort keys %{$info->index}) {
     next if $file eq "";
@@ -428,6 +432,9 @@ foreach my $file (sort keys %{$info->index}) {
 	    } elsif ($dir !~ /^(?:100dpi|75dpi|misc|Type1|encodings|util)$/) {
 		tag 'file-in-unknown-x11-font-directory', $file;
 	    }
+	    if ($dir =~ /^(?:100dpi|75dpi|misc)$/) {
+		$x11_font_dirs{$dir}++;
+	    }
 	}
 	# ---------------- /usr/share/info
 	elsif ($file =~ m,^usr/share/info\S+,) {
@@ -1080,6 +1087,15 @@ for my $file (@devhelp) {
     tag 'package-contains-devhelp-file-without-symlink', $file unless $found;
 }
 
+# Check for including multiple different DPIs of fonts in the same X11 bitmap
+# font package.
+if ($x11_font_dirs{'100dpi'} and $x11_font_dirs{'75dpi'}) {
+    tag 'package-contains-multiple-dpi-fonts';
+}
+if ($x11_font_dirs{misc} and keys (%x11_font_dirs) > 1) {
+    tag 'package-mixes-misc-and-dpi-fonts';
+}
+
 }
 
 sub dir_counts {
diff --git a/checks/files.desc b/checks/files.desc
index 4bc62a7..34aba67 100644
--- a/checks/files.desc
+++ b/checks/files.desc
@@ -1007,7 +1007,26 @@ Severity: serious
 Certainty: certain
 Ref: policy 11.8.5
 Info: Subdirectories of <tt>/usr/share/fonts/X11</tt> other than
- <tt>100dpi</tt>, <tt>75dpi</tt>, <tt>misc</tt>, <tt>Type1</tt>, ad some
+ <tt>100dpi</tt>, <tt>75dpi</tt>, <tt>misc</tt>, <tt>Type1</tt>, and some
  historic exceptions must be neither created nor used.  (The directories
  <tt>encodings</tt> and <tt>util</tt>, used by some X Window System
  packages, are also permitted by Lintian.)
+
+Tag: package-contains-multiple-dpi-fonts
+Severity: normal
+Certainty: certain
+Ref: policy 11.8.5
+Info: This package contains both 100dpi and 75dpi bitmapped fonts.  Both
+ versions should not be included in a single package.  If both resolutions
+ are available, they should be provided in separate binary packages with
+ <tt>-75dpi</tt> or <tt>-100dpi</tt> appended to the package name for the
+ corresponding fonts.
+
+Tag: package-mixes-misc-and-dpi-fonts
+Severity: normal
+Certainty: certain
+Ref: policy 11.8.5
+Info: This package contains both bitmapped fonts for a specific DPI
+ (100dpi or 75dpi) and misc bitmapped fonts.  These should not be combined
+ in the same package.  Instead, the misc bitmapped fonts should be
+ provided in a separate package with <tt>-misc</tt> appended to its name.
diff --git a/debian/changelog b/debian/changelog
index 58a64ce..4a5a7d9 100755
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,8 @@ lintian (2.2.12) UNRELEASED; urgency=low
       - file-in-discouraged-x11-font-directory
       - file-in-unknown-x11-font-directory
       - missing-separator-between-items
+      - package-contains-multiple-dpi-fonts
+      - package-mixes-misc-and-dpi-fonts
     + Removed:
       - missing-comma-between-items
       
@@ -48,6 +50,8 @@ lintian (2.2.12) UNRELEASED; urgency=low
   * checks/files{,.desc}:
     + [RA] Diagnose files installed into discouraged or unknown
       subdirectories of /usr/share/fonts/X11 per Policy 11.8.5.
+    + [RA] Diagnose packages including both 100dpi and 75dpi fonts or
+      mixing misc and Xdpi fonts.
   * checks/menus{,.desc}:
     + [RA] Read menu-methods files from the collected location instead of
       the unpacked binary package and change the unpack level of menus to
diff --git a/t/tests/files-fonts/debian/debian/files-fonts.install b/t/tests/files-fonts/debian/debian/files-fonts.install
index ea053fd..f3dd053 100644
--- a/t/tests/files-fonts/debian/debian/files-fonts.install
+++ b/t/tests/files-fonts/debian/debian/files-fonts.install
@@ -1,3 +1,14 @@
 font.otf usr/share/fonts/truetype
 font.ttf usr/share/fonts/truetype
 4shadow.ttf usr/share/fonts/truetype
+foo.pcf usr/share/fonts/X11/100dpi
+foo.pcf usr/share/fonts/X11/75dpi
+foo.pcf usr/share/fonts/X11/misc
+foo.pcf usr/share/fonts/X11/Type1
+foo.pcf usr/share/fonts/X11/encodings
+foo.pcf usr/share/fonts/X11/util
+foo.pcf usr/share/fonts/X11/PEX
+foo.pcf usr/share/fonts/X11/CID
+foo.pcf usr/share/fonts/X11/Speedo
+foo.pcf usr/share/fonts/X11/cyrillic
+foo.pcf usr/share/fonts/X11/other
diff --git a/t/tests/files-general/debian/foo.pcf b/t/tests/files-fonts/debian/foo.pcf
similarity index 100%
rename from t/tests/files-general/debian/foo.pcf
rename to t/tests/files-fonts/debian/foo.pcf
diff --git a/t/tests/files-fonts/desc b/t/tests/files-fonts/desc
index d1c49b4..d99426d 100644
--- a/t/tests/files-fonts/desc
+++ b/t/tests/files-fonts/desc
@@ -4,4 +4,6 @@ Version: 1.0
 Description: Font file checks
 Test-For:
  duplicate-font-file
+ file-in-discouraged-x11-font-directory
+ file-in-unknown-x11-font-directory
  font-in-non-font-package
diff --git a/t/tests/files-fonts/tags b/t/tests/files-fonts/tags
index 74379ff..7d658ae 100644
--- a/t/tests/files-fonts/tags
+++ b/t/tests/files-fonts/tags
@@ -1,4 +1,11 @@
+E: files-fonts: file-in-unknown-x11-font-directory usr/share/fonts/X11/other/foo.pcf.gz
 I: files-fonts: font-in-non-font-package usr/share/fonts/truetype/font.otf
 I: files-fonts: font-in-non-font-package usr/share/fonts/truetype/font.ttf
 W: files-fonts: duplicate-font-file usr/share/fonts/truetype/4shadow.ttf also in ttf-aenigma
+W: files-fonts: file-in-discouraged-x11-font-directory usr/share/fonts/X11/CID/foo.pcf.gz
+W: files-fonts: file-in-discouraged-x11-font-directory usr/share/fonts/X11/PEX/foo.pcf.gz
+W: files-fonts: file-in-discouraged-x11-font-directory usr/share/fonts/X11/Speedo/foo.pcf.gz
+W: files-fonts: file-in-discouraged-x11-font-directory usr/share/fonts/X11/cyrillic/foo.pcf.gz
+W: files-fonts: package-contains-multiple-dpi-fonts
+W: files-fonts: package-mixes-misc-and-dpi-fonts
 W: ttf-files-fonts: duplicate-font-file usr/share/fonts/truetype/4shadow.ttf also in ttf-aenigma
diff --git a/t/tests/files-general/debian/debian/install b/t/tests/files-general/debian/debian/install
index 216bfa1..37f6343 100644
--- a/t/tests/files-general/debian/debian/install
+++ b/t/tests/files-general/debian/debian/install
@@ -2,14 +2,3 @@ lintian-16x16.png usr/share/apps/lintian/icons/hicolor/22x22
 lintian-22x22.png usr/share/apps/lintian/icons/hicolor/22x22
 --lzma etc/modprobe.d
 lintian.conf etc/modprobe.d
-foo.pcf usr/share/fonts/X11/100dpi
-foo.pcf usr/share/fonts/X11/75dpi
-foo.pcf usr/share/fonts/X11/misc
-foo.pcf usr/share/fonts/X11/Type1
-foo.pcf usr/share/fonts/X11/encodings
-foo.pcf usr/share/fonts/X11/util
-foo.pcf usr/share/fonts/X11/PEX
-foo.pcf usr/share/fonts/X11/CID
-foo.pcf usr/share/fonts/X11/Speedo
-foo.pcf usr/share/fonts/X11/cyrillic
-foo.pcf usr/share/fonts/X11/other
diff --git a/t/tests/files-general/desc b/t/tests/files-general/desc
index a649e99..4539d78 100644
--- a/t/tests/files-general/desc
+++ b/t/tests/files-general/desc
@@ -5,7 +5,5 @@ Description: Test tags about file paths and names
 Test-For:
  dir-or-file-in-var-lock
  dir-or-file-in-var-run
- file-in-discouraged-x11-font-directory
- file-in-unknown-x11-font-directory
  icon-size-and-directory-name-mismatch
  non-conf-file-in-modprobe.d
diff --git a/t/tests/files-general/tags b/t/tests/files-general/tags
index d4449b3..d72c75b 100644
--- a/t/tests/files-general/tags
+++ b/t/tests/files-general/tags
@@ -1,9 +1,4 @@
 E: files-general: dir-or-file-in-var-lock var/lock/lintian/
 E: files-general: dir-or-file-in-var-run var/run/lintian/
-E: files-general: file-in-unknown-x11-font-directory usr/share/fonts/X11/other/foo.pcf.gz
 E: files-general: non-conf-file-in-modprobe.d etc/modprobe.d/--lzma
-W: files-general: file-in-discouraged-x11-font-directory usr/share/fonts/X11/CID/foo.pcf.gz
-W: files-general: file-in-discouraged-x11-font-directory usr/share/fonts/X11/PEX/foo.pcf.gz
-W: files-general: file-in-discouraged-x11-font-directory usr/share/fonts/X11/Speedo/foo.pcf.gz
-W: files-general: file-in-discouraged-x11-font-directory usr/share/fonts/X11/cyrillic/foo.pcf.gz
 W: files-general: icon-size-and-directory-name-mismatch usr/share/apps/lintian/icons/hicolor/22x22/lintian-16x16.png 16x16

-- 
Debian package checker


Reply to: