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

[Pkg-fonts-devel] Bug#701061: Please include the check to warn about font package not marked as Multi-Arch foreign [PATCH]



Package: lintian
Version: 2.5.10.4
Severity: wishlist
Tags: patch

Hi Lintian maintainers,

Please consider applying below mentioned patch which introduces a check
to warn about font packages which are not marked as Multi-Arch
foreign. A discussion about this happened in pkg-fonts team [1]

Additionally I've written a test for the newly introduced tag I've run
the tests for field checks and everything passes

    debian/rules runtests onlyrun=fields


[1] http://lists.alioth.debian.org/pipermail/pkg-fonts-devel/2012-December/011389.html

-- System Information:
Debian Release: 7.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
armel

Kernel: Linux 3.7-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages lintian depends on:
ii  binutils                       2.22-7.1
ii  bzip2                          1.0.6-4
ii  diffstat                       1.55-3
ii  file                           5.11-2
ii  gettext                        0.18.1.1-10
ii  hardening-includes             2.3
ii  intltool-debian                0.35.0+20060710.1
ii  libapt-pkg-perl                0.1.26+b1
ii  libarchive-zip-perl            1.30-6
ii  libc-bin                       2.13-38
ii  libclass-accessor-perl         0.34-1
ii  libclone-perl                  0.31-1+b2
ii  libdpkg-perl                   1.16.9
ii  libemail-valid-perl            0.190-1
ii  libipc-run-perl                0.92-1
ii  libparse-debianchangelog-perl  1.2.0-1
ii  libtimedate-perl               1.2000-1
ii  liburi-perl                    1.60-1
ii  locales                        2.13-38
ii  man-db                         2.6.3-3
ii  patchutils                     0.3.2-1.1
ii  perl [libdigest-sha-perl]      5.14.2-18

lintian recommends no packages.

Versions of packages lintian suggests:
pn  binutils-multiarch     <none>
ii  dpkg-dev               1.16.9
ii  libhtml-parser-perl    3.69-2
pn  libperlio-gzip-perl    <none>
ii  libtext-template-perl  1.45-2
ii  man-db                 2.6.3-3
ii  xz-utils [lzma]        5.1.1alpha+20120614-2

-- no debconf information

-- 
Vasudev Kamath
http://copyninja.info
Connect on ~friendica: copyninja@{frndk.de | vasudev.homelinux.net}
IRC nick: copyninja | vasudev {irc.oftc.net | irc.freenode.net}
GPG Key: C517 C25D E408 759D 98A4  C96B 6C8F 74AE 8770 0B7E
From b40c1407c60b28ea0e11af33e9d8239a36690f5a Mon Sep 17 00:00:00 2001
From: Vasudev Kamath <kamathvasudev@gmail.com>
Date: Thu, 21 Feb 2013 12:02:44 +0530
Subject: =?UTF-8?q?c/fields:=20Warn=20on=20font=20packages=20not=20marked=20?=
 =?UTF-8?q?as=20Multi-Arch=20foreign=0Aor=20Multi-Arch=20allowed?=


Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
---
 checks/fields      |    8 ++++++++
 checks/fields.desc |   11 +++++++++++
 2 files changed, 19 insertions(+)

diff --git a/checks/fields b/checks/fields
index 184bf51..fd13460 100644
--- a/checks/fields
+++ b/checks/fields
@@ -317,6 +317,14 @@ if (defined $info->field('multi-arch')){
     }
 }
 
+if ($type eq 'binary'){
+    if ($pkg =~ /^fonts-/) {
+        if (not defined $info->field ('multi-arch') or $info->field ('multi-arch') !~ m/^foreign|allowed/o) {
+            tag 'font-package-not-multi-arch-foreign';
+        }
+    }
+}
+
 #---- Architecture
 
 if (not defined $info->field('architecture')) {
diff --git a/checks/fields.desc b/checks/fields.desc
index cdce7c1..41b2119 100644
--- a/checks/fields.desc
+++ b/checks/fields.desc
@@ -130,6 +130,17 @@ Info: The package is architecture all and has the Multi-Arch same value.
  This combination is not allowed by the Multi-Arch specification.
 Ref: https://wiki.ubuntu.com/MultiarchSpec
 
+Tag: font-package-not-multi-arch-foreign
+Severity: normal
+Certainty: certain
+Info: This package is architecture all and hence requires a Multi-Arch
+ foreign value.
+ .
+ An Architecture: all package to satisfy the dependencies of a
+ foreign-architecture package, it must be marked Multi-Arch: foreign
+ or Multi-Arch: allowed.
+Ref: https://wiki.ubuntu.com/MultiarchSpec#Dependencies_involving_Architecture:_all_packages/
+
 Tag: aspell-package-not-arch-all
 Severity: normal
 Certainty: certain
-- 
1.7.10.4

From b5e4cc65db233f2efb5bc65147cfb9b3ff5c1f13 Mon Sep 17 00:00:00 2001
From: Vasudev Kamath <kamathvasudev@gmail.com>
Date: Thu, 21 Feb 2013 12:04:01 +0530
Subject: Implemented check for font-package-not-multi-arch-foreign tag


Signed-off-by: Vasudev Kamath <kamathvasudev@gmail.com>
---
 .../debian/debian/control.in                          |   17 +++++++++++++++++
 .../fonts-fields-font-not-multiarch-foreign.install   |    2 ++
 .../debian/font-multiarch-test.ttf                    |    2 ++
 .../fields-font-not-multiarch-foreign/debian/font.ttf |    1 +
 t/tests/fields-font-not-multiarch-foreign/desc        |    6 ++++++
 t/tests/fields-font-not-multiarch-foreign/tags        |    1 +
 6 files changed, 29 insertions(+)
 create mode 100644 t/tests/fields-font-not-multiarch-foreign/debian/debian/control.in
 create mode 100644 t/tests/fields-font-not-multiarch-foreign/debian/debian/fonts-fields-font-not-multiarch-foreign.install
 create mode 100644 t/tests/fields-font-not-multiarch-foreign/debian/font-multiarch-test.ttf
 create mode 100644 t/tests/fields-font-not-multiarch-foreign/debian/font.ttf
 create mode 100644 t/tests/fields-font-not-multiarch-foreign/desc
 create mode 100644 t/tests/fields-font-not-multiarch-foreign/tags

diff --git a/t/tests/fields-font-not-multiarch-foreign/debian/debian/control.in b/t/tests/fields-font-not-multiarch-foreign/debian/debian/control.in
new file mode 100644
index 0000000..0c21d0f
--- /dev/null
+++ b/t/tests/fields-font-not-multiarch-foreign/debian/debian/control.in
@@ -0,0 +1,17 @@
+Source: {$srcpkg}
+Priority: extra
+Section: {$section}
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: debhelper (>= 9)
+Homepage: http://lintian.debian.org/
+
+Package: fonts-{$srcpkg}
+Architecture: {$architecture}
+Depends: $\{misc:Depends\}
+Description: {$description} (okay)
+ Font package containing fonts.
+ .
+ This is a test package designed to exercise some feature or tag of
+ Lintian.  It is part of the Lintian test suite and may do very odd
+ things.  It should not be installed like a regular package.
diff --git a/t/tests/fields-font-not-multiarch-foreign/debian/debian/fonts-fields-font-not-multiarch-foreign.install b/t/tests/fields-font-not-multiarch-foreign/debian/debian/fonts-fields-font-not-multiarch-foreign.install
new file mode 100644
index 0000000..d31329d
--- /dev/null
+++ b/t/tests/fields-font-not-multiarch-foreign/debian/debian/fonts-fields-font-not-multiarch-foreign.install
@@ -0,0 +1,2 @@
+font-multiarch-test.ttf usr/share/fonts/truetype
+font.ttf                usr/share/fonts/truetype
\ No newline at end of file
diff --git a/t/tests/fields-font-not-multiarch-foreign/debian/font-multiarch-test.ttf b/t/tests/fields-font-not-multiarch-foreign/debian/font-multiarch-test.ttf
new file mode 100644
index 0000000..780ab93
--- /dev/null
+++ b/t/tests/fields-font-not-multiarch-foreign/debian/font-multiarch-test.ttf
@@ -0,0 +1,2 @@
+This isn't actually a font.  The current test is based on the file
+name and doesn't care.
diff --git a/t/tests/fields-font-not-multiarch-foreign/debian/font.ttf b/t/tests/fields-font-not-multiarch-foreign/debian/font.ttf
new file mode 100644
index 0000000..c118d8d
--- /dev/null
+++ b/t/tests/fields-font-not-multiarch-foreign/debian/font.ttf
@@ -0,0 +1 @@
+This is a fake font file.
diff --git a/t/tests/fields-font-not-multiarch-foreign/desc b/t/tests/fields-font-not-multiarch-foreign/desc
new file mode 100644
index 0000000..5167607
--- /dev/null
+++ b/t/tests/fields-font-not-multiarch-foreign/desc
@@ -0,0 +1,6 @@
+Testname: fields-font-not-multiarch-foreign
+Sequence: 6000
+Version: 1.0
+Description: Font package Multi-Arch checks
+Test-For:
+ font-package-not-multi-arch-foreign
diff --git a/t/tests/fields-font-not-multiarch-foreign/tags b/t/tests/fields-font-not-multiarch-foreign/tags
new file mode 100644
index 0000000..b0d696b
--- /dev/null
+++ b/t/tests/fields-font-not-multiarch-foreign/tags
@@ -0,0 +1 @@
+W: fonts-fields-font-not-multiarch-foreign: font-package-not-multi-arch-foreign
-- 
1.7.10.4

Attachment: signature.asc
Description: Digital signature


Reply to: