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

[SCM] Debian package checker branch, master, updated. 2.5.10-212-g6c863c6



The following commit has been merged in the master branch:
commit 6c863c67b908a6cdc94d32794fb54b4da2b0168b
Author: Niels Thykier <niels@thykier.net>
Date:   Sat Oct 20 22:25:47 2012 +0200

    L::Profile: Always load the "lintian" check
    
    The frontend and L::Tags will generally always attempt to emit the
    tags of the "lintian" check.  When the check is not loaded, it cause
    Lintian to abort with an error.
    
    This patch ensures that L::Profile will load the "lintian" check in
    profiles that did not load itself.  Furthermore, it will enable its
    tags by default.
    
    The main rationale behind (auto) enabling these tags is to assist
    users in debugging their overrides files.  Without these tags enabled,
    incorrect overrides will be "silently ignored".
    
    For profiles that really do not want these tags, the check can be
    disabled via a "Disable-Tags-From-Check".  This is currently done
    in the ftp-master-auto-reject profile.
    
    Signed-off-by: Niels Thykier <niels@thykier.net>

diff --git a/checks/lintian.desc b/checks/lintian.desc
index eb85e8a..3b57382 100644
--- a/checks/lintian.desc
+++ b/checks/lintian.desc
@@ -1,6 +1,9 @@
 Check-Script: lintian
 Info: This description file is a special case.  It contains the tag info
  for the tags produced by the lintian frontend itself.
+ .
+ The tags in this check are enabled in all profiles by default, but can
+ be disabled.
 
 Tag: unused-override
 Severity: wishlist
diff --git a/debian/changelog b/debian/changelog
index 18645e3..3c137e8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -187,6 +187,9 @@ lintian (2.5.11) UNRELEASED; urgency=low
   * lib/Lintian/Profile.pm:
     + [NT] Add support for the new optional "Load-Checks"
       field in profiles.
+    + [NT] Ensure that the "lintian" check is always loaded
+      as these tags are not emitted by check modules.  Also
+      enable the tags from the check by default.
   * lib/Lintian/Tags.pm:
     + [NT] Be explicit about the reason when rejecting an
       override.  Thanks to Yves-Alexis Perez for the report.
diff --git a/lib/Lintian/Profile.pm b/lib/Lintian/Profile.pm
index 999ac51..f4841c5 100644
--- a/lib/Lintian/Profile.pm
+++ b/lib/Lintian/Profile.pm
@@ -122,6 +122,14 @@ sub new {
     }
     croak "Cannot find profile $name (in " . join(', ', map { "$_/profiles" } @$ipath).")"
         unless $profile;
+
+    # Implementation detail: Ensure that the "lintian" check is always
+    # loaded to avoid "attempt to emit unknown tags" caused by
+    # the frontend or L::Tags.  Also default to enabling the Lintian
+    # tags as they are helpful (e.g. for debugging overrides files)
+    my $c = $self->_load_check ($self->name, 'lintian');
+    $self->enable_tags ($c->tags);
+
     $self->_read_profile($profile);
     return $self;
 }
diff --git a/private/generate-profiles.pl b/private/generate-profiles.pl
index 8e468a0..7ec885e 100755
--- a/private/generate-profiles.pl
+++ b/private/generate-profiles.pl
@@ -63,6 +63,8 @@ generate_profile('debian/extra-apache2', {
     });
 
 generate_profile('debian/ftp-master-auto-reject', {
+    # "lintian" is enabled by default, so we explicitly disable it.
+    'Disable-Tags-From-Check' => ['lintian'],
     'Enable-Tags' => [@fatal, @nonfatal],
     },
     { 'Tags' => \@fatal,
diff --git a/profiles/debian/ftp-master-auto-reject.profile b/profiles/debian/ftp-master-auto-reject.profile
index fa7bfac..8148997 100644
--- a/profiles/debian/ftp-master-auto-reject.profile
+++ b/profiles/debian/ftp-master-auto-reject.profile
@@ -1,5 +1,6 @@
 # This profile is auto-generated
 Profile: debian/ftp-master-auto-reject
+Disable-Tags-From-Check: lintian
 Enable-Tags: FSSTND-dir-in-usr, FSSTND-dir-in-var, arch-dependent-file-in-usr-share,
  arch-independent-package-contains-binary-or-object, bad-package-name,
  bad-perm-for-file-in-etc-sudoers.d, bad-relation, bad-version-number,

-- 
Debian package checker


Reply to: