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

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



Control: tags -1 pending

On 2013-02-21 07:48, Vasudev Kamath wrote:
> [...]
> 
> 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
> 
> [...]

Thanks for the patches, these have been merged[1].

When reviewing your patch today, I realised that it was possible to
simplify the "inner if" by using an additional argument to $info->field.
 I have attached a small patch showing the changes I did for comparison.

~Niels

[1] Squashed into a single commit: 11eb576

diff --git a/checks/fields b/checks/fields
index fd13460..3536bf5 100644
--- a/checks/fields
+++ b/checks/fields
@@ -319,9 +319,8 @@ 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';
-        }
+        tag 'font-package-not-multi-arch-foreign'
+            unless $info->field ('multi-arch', 'no') =~ m/^foreign|allowed$/o;
     }
 }
 

Reply to: