Package: update-inetd
Version: 4.27-0.2
Severity: minor
Tags: patch

Hi,

Your debconf templates do not follow many recommandations of the
developers-reference. A full patch is attached, here are my comments:

- debian/po/*
  -> switch to po-debconf (see po-debconf(7)), fixes the following
     lintian warning:
    W: update-inetd source: not-using-po-debconf
- debian/rules:
  -> update po in the clean target, to be sure that PO files are always
     up-to-date in the source package
- debian/templates:
  |-Type: select
  |-Choices: yes, no
  |-Default: yes
  |+Type: boolean
  |+Default: true
  -> select templates with (yes,no) choices are boolean templates, fixes
     the following lintian warnings:
     W: update-inetd: malformed-prompt-in-templates
          update-inetd/ask-several-entries
     W: update-inetd: malformed-prompt-in-templates
          update-inetd/ask-entry-present
     W: update-inetd: malformed-prompt-in-templates
          update-inetd/ask-remove-entries
     W: update-inetd: malformed-prompt-in-templates
          update-inetd/ask-disable-entries

  |- There is already an entry for ${sservice} in ${inetdcf},
  |- but I don't recognise it.  Here is what it looks like:
  |+ There is already a not recognised entry for ${sservice} in ${inetdcf},
  |+ Here is what it looks like:
  -> do not use the first person, fixes the following lintian warning:
    W: update-inetd: using-first-person-in-templates
        update-inetd/ask-entry-present

  |+#flag:translate!:3,5
  -> do not translate ${newentry} and ${lookslike}

  Other changes are due to the use of debconf-gettextize to switch to
  po-debconf.

- DebianNet.pm
  -> adapt the source to reflect the boolean templates

Cheers,

-- 
Thomas Huriaux
diff -Nur update-inetd-4.27/debian/po/POTFILES.in update-inetd-4.27.new/debian/po/POTFILES.in
--- update-inetd-4.27/debian/po/POTFILES.in	1970-01-01 01:00:00.000000000 +0100
+++ update-inetd-4.27.new/debian/po/POTFILES.in	2006-12-09 13:57:08.000000000 +0100
@@ -0,0 +1 @@
+[type: gettext/rfc822deb] templates
diff -Nur update-inetd-4.27/debian/po/templates.pot update-inetd-4.27.new/debian/po/templates.pot
--- update-inetd-4.27/debian/po/templates.pot	1970-01-01 01:00:00.000000000 +0100
+++ update-inetd-4.27.new/debian/po/templates.pot	2006-12-09 14:37:34.000000000 +0100
@@ -0,0 +1,77 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <[EMAIL PROTECTED]>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: [EMAIL PROTECTED]"
+"POT-Creation-Date: 2006-12-09 14:37+0100\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <[EMAIL PROTECTED]>\n"
+"Language-Team: LANGUAGE <[EMAIL PROTECTED]>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "Ignore multiple entries and continue without changes?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:1001
+msgid "There are several entries for ${sservice} in ${inetdcf}."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Leave existing entry and continue without changes?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid "Trying to add the following entry:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:2001
+msgid ""
+"There is already a not recognised entry for ${sservice} in ${inetdcf}, Here "
+"is what it looks like:"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:3001
+msgid "Remove inetd entries?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:3001
+msgid ""
+"${inetdcf} contains multiple entries for the `${service}' service. You're "
+"about to remove these entries."
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4001
+msgid "Disable inetd entries?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../templates:4001
+msgid ""
+"${inetdcf} contains multiple entries for the `${service}' service. You're "
+"about to disable these entries."
+msgstr ""
diff -Nur update-inetd-4.27/debian/rules update-inetd-4.27.new/debian/rules
--- update-inetd-4.27/debian/rules	2006-11-12 19:15:24.000000000 +0100
+++ update-inetd-4.27.new/debian/rules	2006-12-09 14:36:45.000000000 +0100
@@ -6,6 +6,7 @@
 clean:
 	dh_testdir
 	dh_testroot
+	debconf-updatepo
 
 	dh_clean
 
diff -Nur update-inetd-4.27/debian/templates update-inetd-4.27.new/debian/templates
--- update-inetd-4.27/debian/templates	2006-11-12 19:15:24.000000000 +0100
+++ update-inetd-4.27.new/debian/templates	2006-12-09 14:39:34.000000000 +0100
@@ -1,37 +1,33 @@
 Template: update-inetd/ask-several-entries
-Type: select
-Choices: yes, no
-Default: yes
-Description: Ignore multiple entries and continue without changes?
+Type: boolean
+Default: true
+_Description: Ignore multiple entries and continue without changes?
  There are several entries for ${sservice} in ${inetdcf}.
 
 Template: update-inetd/ask-entry-present
-Type: select
-Choices: yes, no
-Default: yes
-Description: Leave existing entry and continue without changes?
+Type: boolean
+Default: true
+#flag:translate!:3,5
+_Description: Leave existing entry and continue without changes?
  Trying to add the following entry:
  .
  ${newentry}
  .
- There is already an entry for ${sservice} in ${inetdcf},
- but I don't recognise it.  Here is what it looks like:
+ There is already a not recognised entry for ${sservice} in ${inetdcf},
+ Here is what it looks like:
  .
  ${lookslike}
 
 Template: update-inetd/ask-remove-entries
-Type: select
-Choices: yes, no
-Default: no
-Description: Remove inetd entries?
- ${inetdcf} contains multiple entries for
- the `${service}' service. You're about to remove these entries.
+Type: boolean
+Default: false
+_Description: Remove inetd entries?
+ ${inetdcf} contains multiple entries for the `${service}' service. You're
+ about to remove these entries.
 
 Template: update-inetd/ask-disable-entries
-Type: select
-Choices: yes, no
-Default: no
-Description: Disable inetd entries?
- ${inetdcf} contains multiple entries for
- the `${service}' service. You're about to disable these entries.
-
+Type: boolean
+Default: false
+_Description: Disable inetd entries?
+ ${inetdcf} contains multiple entries for the `${service}' service. You're
+ about to disable these entries.
diff -Nur update-inetd-4.27/DebianNet.pm update-inetd-4.27.new/DebianNet.pm
--- update-inetd-4.27/DebianNet.pm	2006-11-12 19:15:24.000000000 +0100
+++ update-inetd-4.27.new/DebianNet.pm	2006-12-09 14:02:50.000000000 +0100
@@ -48,7 +48,7 @@
         } else {
             if (grep(m/^$sservice\s+/,@inetd)) {
                 if (grep(m/^$sservice\s+/,@inetd) > 1) {
-		    set("update-inetd/ask-several-entries", "yes");
+		    set("update-inetd/ask-several-entries", "true");
 		    fset("update-inetd/ask-several-entries", "seen", "false");
 		    subst("update-inetd/ask-several-entries", "sservice", "$sservice");
 		    subst("update-inetd/ask-several-entries", "inetdcf", "$inetdcf");
@@ -56,10 +56,10 @@
 		    @ret = go();
 		    if ($ret[0] == 0) {
 		        @ret = get("update-inetd/ask-several-entries");
-			exit(1) if ($ret[1] !~ m/y/i);
+			exit(1) if ($ret[1] !~ m/true/i);
 		    }
                 } elsif (!grep(m:^#?.*$searchentry.*:, @inetd)) {
-		    set("update-inetd/ask-entry-present", "yes");
+		    set("update-inetd/ask-entry-present", "true");
 		    fset("update-inetd/ask-entry-present", "seen", "false");
 		    subst("update-inetd/ask-entry-present", "newentry", "$newentry");
 		    subst("update-inetd/ask-entry-present", "sservice", "$sservice");
@@ -71,7 +71,7 @@
 		    @ret = go();
 		    if ($ret[0] == 0) {
 		        @ret = get("update-inetd/ask-entry-present");
-			exit(1) if ($ret[1] !~ m/y/i);
+			exit(1) if ($ret[1] !~ m/true/i);
 		    }
                 }
             } elsif (grep(m/^#\s*$sservice\s+/, @inetd) >= 1 or
@@ -124,7 +124,7 @@
     }
 
     if ((&scan_entries("$service") > 1) and (not defined($multi))) {
-	set("update-inetd/ask-remove-entries", "no");
+	set("update-inetd/ask-remove-entries", "false");
 	fset("update-inetd/ask-remove-entries", "seen", "false");
         subst("update-inetd/ask-remove-entries", "service", "$service");
 	subst("update-inetd/ask-remove-entries", "inetdcf", "$inetdcf");
@@ -132,7 +132,7 @@
 	@ret = go();
 	if ($ret[0] == 0) {
 	    @ret = get("update-inetd/ask-remove-entries");
-	    return(1) if ($ret[1] =~ /^[^y]/i);
+	    return(1) if ($ret[1] =~ /false/i);
         }
     }
 
@@ -163,7 +163,7 @@
     chomp($service);
 
     if ((&scan_entries("$service", $pattern) > 1) and (not defined($multi))) {
-	set("update-inetd/ask-disable-entries", "no");
+	set("update-inetd/ask-disable-entries", "false");
 	fset("update-inetd/ask-disable-entries", "seen", "false");
         subst("update-inetd/ask-disable-entries", "service", "$service");
 	subst("update-inetd/ask-disable-entries", "inetdcf", "$inetdcf");
@@ -171,7 +171,7 @@
 	@ret = go();
 	if ($ret[0] == 0) {
 	    @ret = get("update-inetd/ask-disable-entries");
-	    return(1) if ($ret[1] =~ /^[^y]/i);
+	    return(1) if ($ret[1] =~ /false/i);
         }
     }
 

Attachment: signature.asc
Description: Digital signature

Reply via email to