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

[lintian] 01/01: Don't warn about unknown template type "entropy" when a package depends on cdebconf. (Closes: #677870)



This is an automated email from the git hooks/post-receive script.

lamby pushed a commit to branch master
in repository lintian.

commit d97ace49e3146f1274195174093dd001eab9b66b
Author: Chris Lamb <lamby@debian.org>
Date:   Mon Jan 1 22:38:56 2018 +0000

    Don't warn about unknown template type "entropy" when a package depends on cdebconf. (Closes: #677870)
---
 checks/debconf.pm                                  |   5 +-
 debian/changelog                                   |   3 +
 .../debian/debian/control.in                       |  16 ++
 .../debian/debian/po/en.po                         |   9 +-
 .../debian/debian/po/en_US.po                      | 207 ++++++++++++++++++++-
 .../debian/debian/po/templates.pot                 |   8 +-
 .../debian/debian/templates                        |   4 +
 7 files changed, 248 insertions(+), 4 deletions(-)

diff --git a/checks/debconf.pm b/checks/debconf.pm
index 875ec3f..d31a760 100644
--- a/checks/debconf.pm
+++ b/checks/debconf.pm
@@ -210,7 +210,10 @@ sub run {
         if (not exists $template->{type}) {
             tag 'no-template-type', "$template->{template}";
         } elsif (not $valid_types{$template->{type}}) {
-            tag 'unknown-template-type', "$template->{type}";
+            # cdebconf has a special "entropy" type
+            tag 'unknown-template-type', "$template->{type}"
+              unless ($template->{type} eq 'entropy'
+                and $alldependencies->implies('cdebconf'));
         } elsif ($template->{type} eq 'select') {
             $isselect = 1;
         } elsif ($template->{type} eq 'multiselect') {
diff --git a/debian/changelog b/debian/changelog
index 586669a..fd389b5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,9 @@ lintian (2.5.68) UNRELEASED; urgency=medium
   * checks/huge-usr-share.pm:
     + [CL] Bump arch-dep-package-has-big-usr-share thresholds; they were
       last set in 2004.  (Closes: #648755)
+  * checks/debconf.pm:
+    + [CL] Don't warn about unknown template type "entropy" when a package
+      depends on cdebconf.  (Closes: #677870)
 
  -- Chris Lamb <lamby@debian.org>  Mon, 01 Jan 2018 15:41:06 +0000
 
diff --git a/t/tests/debconf-templates-general/debian/debian/control.in b/t/tests/debconf-templates-general/debian/debian/control.in
new file mode 100644
index 0000000..fd41dab
--- /dev/null
+++ b/t/tests/debconf-templates-general/debian/debian/control.in
@@ -0,0 +1,16 @@
+Source: {$source}
+Priority: optional
+Section: {$section}
+Maintainer: {$author}
+Standards-Version: {$standards_version}
+Build-Depends: {$build_depends}
+Rules-Requires-Root: no
+
+Package: {$source}
+Architecture: {$architecture}
+Depends: $\{shlibs:Depends\}, $\{misc:Depends\}, cdebconf
+Description: {$description}
+ 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.  It may
+ be an empty package.
diff --git a/t/tests/debconf-templates-general/debian/debian/po/en.po b/t/tests/debconf-templates-general/debian/debian/po/en.po
index 84af2a3..0734922 100644
--- a/t/tests/debconf-templates-general/debian/debian/po/en.po
+++ b/t/tests/debconf-templates-general/debian/debian/po/en.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-01 22:54+0200\n"
+"POT-Creation-Date: 2018-01-01 22:34+0000\n"
 "PO-Revision-Date: 2012-10-01 22:54+0200\n"
 "Last-Translator: Niels Thykier <niels@thykier.net>\n"
 "Language-Team: English\n"
@@ -232,3 +232,10 @@ msgstr ""
 "One green bottle sitting on the wall, One green bottle sitting on the wall, "
 "And if one green bottle should accidentally fall, There'll be no green "
 "bottles sitting on the wall."
+
+#. Type: entropy
+#. Description
+#: ../templates:23001
+#| msgid "Template with unknown type"
+msgid "Template with entropy type"
+msgstr "Template with unknown type"
diff --git a/t/tests/debconf-templates-general/debian/debian/po/en_US.po b/t/tests/debconf-templates-general/debian/debian/po/en_US.po
index 02ead55..450a03c 100644
--- a/t/tests/debconf-templates-general/debian/debian/po/en_US.po
+++ b/t/tests/debconf-templates-general/debian/debian/po/en_US.po
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-01 22:54+0200\n"
+"POT-Creation-Date: 2018-01-01 22:34+0000\n"
 "PO-Revision-Date: 2012-10-01 22:54+0200\n"
 "Last-Translator: Russ Allbery <rra@debian.org>\n"
 "Language-Team: English <debian-i18n@lists.debian.org>\n"
@@ -16,3 +16,208 @@ msgstr ""
 "Content-Type: text/plain; charset=ASCII\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#. Type: error
+#. Description
+#: ../templates:1001
+msgid "Useless note"
+msgstr ""
+
+#. Type: select
+#. Choices
+#: ../templates:2001
+msgid "left, right, up, down"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../templates:2002
+msgid "Pick the odd one out"
+msgstr ""
+
+#. Type: text
+#. Description
+#: ../templates:3001
+msgid "Missing template field."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4001
+msgid "Is this a bad template?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:5001
+msgid "Missing type"
+msgstr ""
+
+#. Type: lintian
+#. Description
+#: ../templates:6001
+msgid "Template with unknown type"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:7001
+msgid "How do you like the default?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:7001
+msgid "On a scale of \"false\" to \"true\"."
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../templates:8001
+msgid "A boolean type would have been better"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../templates:9001
+msgid "Preference"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../templates:10001
+msgid "Missing a Choices field"
+msgstr ""
+
+#. Type: error
+#. Description
+#. Type: error
+#. Description
+#: ../templates:12001
+msgid "Duplicate long description"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:13001
+msgid "Is the field below unknown?"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:14001
+msgid "What is the name of this package checker:"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../templates:15001
+msgid "Select either x or y"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:16001
+msgid "Lintian is the best!"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:17001
+msgid "Do you like sakana?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:17001
+msgid "Or do you prefer sake?"
+msgstr ""
+
+#. Type: note
+#. Description
+#: ../templates:18001
+msgid "Aren't you tired of all these debconf prompts?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:19001
+msgid ""
+"This template has a very long short description, is that what you call an "
+"oxymoron?"
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../templates:20001
+msgid "I think Lintian is the best"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:21001
+msgid "Do you like Lintian?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:21001
+msgid "Pick \"yes\" if you do."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:22001
+msgid "Name the title of this song:"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:22001
+msgid ""
+"Five green bottles sitting on the wall, Five green bottles sitting on the "
+"wall, And if one green bottle should accidentally fall, There'll be four "
+"green bottles sitting on the wall."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:22001
+msgid ""
+"Four green bottles sitting on the wall, Four green bottles sitting on the "
+"wall, And if one green bottle should accidentally fall, There'll be three "
+"green bottles sitting on the wall."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:22001
+msgid ""
+"Three green bottles sitting on the wall, Three green bottles sitting on the "
+"wall, And if one green bottle should accidentally fall, There'll be two "
+"green bottles sitting on the wall."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:22001
+msgid ""
+"Two green bottles sitting on the wall, Two green bottles sitting on the "
+"wall, And if one green bottle should accidentally fall, There'll be one "
+"green bottle sitting on the wall."
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../templates:22001
+msgid ""
+"One green bottle sitting on the wall, One green bottle sitting on the wall, "
+"And if one green bottle should accidentally fall, There'll be no green "
+"bottles sitting on the wall."
+msgstr ""
+
+#. Type: entropy
+#. Description
+#: ../templates:23001
+msgid "Template with entropy type"
+msgstr ""
diff --git a/t/tests/debconf-templates-general/debian/debian/po/templates.pot b/t/tests/debconf-templates-general/debian/debian/po/templates.pot
index c9b8af3..b7f5a7b 100644
--- a/t/tests/debconf-templates-general/debian/debian/po/templates.pot
+++ b/t/tests/debconf-templates-general/debian/debian/po/templates.pot
@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-10-01 22:54+0200\n"
+"POT-Creation-Date: 2018-01-01 22:34+0000\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -215,3 +215,9 @@ msgid ""
 "And if one green bottle should accidentally fall, There'll be no green "
 "bottles sitting on the wall."
 msgstr ""
+
+#. Type: entropy
+#. Description
+#: ../templates:23001
+msgid "Template with entropy type"
+msgstr ""
diff --git a/t/tests/debconf-templates-general/debian/debian/templates b/t/tests/debconf-templates-general/debian/debian/templates
index 787068b..46ca184 100644
--- a/t/tests/debconf-templates-general/debian/debian/templates
+++ b/t/tests/debconf-templates-general/debian/debian/templates
@@ -118,3 +118,7 @@ _Description: Name the title of this song:
  One green bottle sitting on the wall,
  And if one green bottle should accidentally fall,
  There'll be no green bottles sitting on the wall.
+
+Template: debconf/entropy-type
+Type: entropy
+_Description: Template with entropy type

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: