On Thu, Oct 29, 2009 at 06:10:27PM -0500, Manoj Srivastava wrote: > Package: memtest86+ > Version: 4.00-2 > Severity: serious > User: lintian-ma...@debian.org > Usertags: read-in-maintainer-script > > This maintainer script appears to use read to get information from the > user. Prompting in maintainer scripts must be done by communicating through a > program such as debconf which conforms to the Debian Configuration management > specification, version 2 or higher. > > Refer to Debian Policy Manual section 3.9.1 (Prompting in maintainer scripts) > for details. > > ,----[ 3.9.1 Prompting in maintainer scripts ] > | Package maintainer scripts may prompt the user if necessary. Prompting must > be > | done by communicating through a program, such as debconf, which conforms to > the > | Debian Configuration Management Specification, version 2 or higher. > | > | Packages which are essential, or which are dependencies of essential > packages, > | may fall back on another prompting method if no such interface is available > when > | they are executed. > | > | The Debian Configuration Management Specification is included in the > | debconf_specification files in the debian-policy package. > `----
Hi, A patch converting the prompt to debconf is attached to this email (a package built after the patch is applied is at http://mentors.debian.net/debian/pool/main/m/memtest86+/memtest86+_4.00-2.1.dsc). The question is displayed at medium priority, I'm not entirely sure this is the optimal choice. However, given the lower-use of lilo today (compared to grub/grub2), it would also be an option to simply drop the automatic lilo run and add a Debian.NEWS entry about it. Note: bug 553291 is very similar and if this patch looks fine, I will send a patch for that too (this is why I used the shared/ namespace). regards, iustin
diff -urN /tmp/memtest86+-4.00/debian/changelog memtest86+-4.00/debian/changelog --- /tmp/memtest86+-4.00/debian/changelog 2009-12-02 21:23:44.000000000 +0100 +++ memtest86+-4.00/debian/changelog 2009-12-02 21:59:13.000468227 +0100 @@ -1,3 +1,10 @@ +memtest86+ (4.00-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Replace manual propt with debconf (Closes: #553292). + + -- Iustin Pop <iu...@k1024.org> Wed, 02 Dec 2009 21:58:36 +0100 + memtest86+ (4.00-2) unstable; urgency=low * Fix wrong integration of grub2 patch (Closes: #549125). diff -urN /tmp/memtest86+-4.00/debian/config memtest86+-4.00/debian/config --- /tmp/memtest86+-4.00/debian/config 1970-01-01 01:00:00.000000000 +0100 +++ memtest86+-4.00/debian/config 2009-12-02 22:26:46.780303262 +0100 @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule +db_input medium shared/memtest86-run-lilo || true +db_go || true + +#DEBHELPER# diff -urN /tmp/memtest86+-4.00/debian/control memtest86+-4.00/debian/control --- /tmp/memtest86+-4.00/debian/control 2009-12-02 21:23:44.000000000 +0100 +++ memtest86+-4.00/debian/control 2009-12-02 22:28:47.226961091 +0100 @@ -2,7 +2,8 @@ Section: misc Priority: optional Maintainer: Yann Dirson <dir...@debian.org> -Build-Depends: debhelper (>> 5.0.0), dh-buildinfo, gcc-multilib [amd64 kfreebsd-amd64] +Build-Depends: debhelper (>> 5.0.0), dh-buildinfo, gcc-multilib [amd64 kfreebsd-amd64], + po-debconf Homepage: http://www.memtest.org/ Standards-Version: 3.8.0 diff -urN /tmp/memtest86+-4.00/debian/po/POTFILES.in memtest86+-4.00/debian/po/POTFILES.in --- /tmp/memtest86+-4.00/debian/po/POTFILES.in 1970-01-01 01:00:00.000000000 +0100 +++ memtest86+-4.00/debian/po/POTFILES.in 2009-12-02 22:09:28.017074426 +0100 @@ -0,0 +1 @@ +[type: gettext/rfc822deb] templates diff -urN /tmp/memtest86+-4.00/debian/po/templates.pot memtest86+-4.00/debian/po/templates.pot --- /tmp/memtest86+-4.00/debian/po/templates.pot 1970-01-01 01:00:00.000000000 +0100 +++ memtest86+-4.00/debian/po/templates.pot 2009-12-02 22:23:14.426995452 +0100 @@ -0,0 +1,32 @@ +# 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 <em...@address>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: memtest...@packages.debian.org\n" +"POT-Creation-Date: 2009-12-02 22:23+0100\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <em...@address>\n" +"Language-Team: LANGUAGE <l...@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Type: boolean +#. Description +#: ../templates:1001 +msgid "Run lilo automatically after upgrade (if found)?" +msgstr "" + +#. Type: boolean +#. Description +#: ../templates:1001 +msgid "" +"If lilo is installed and its configuration file contains the memtest86/" +"memtest86+ image, then it should be re-run in order to allow booting the new " +"image." +msgstr "" diff -urN /tmp/memtest86+-4.00/debian/postinst memtest86+-4.00/debian/postinst --- /tmp/memtest86+-4.00/debian/postinst 2009-12-02 21:23:44.000000000 +0100 +++ memtest86+-4.00/debian/postinst 2009-12-02 21:58:26.660476460 +0100 @@ -1,23 +1,20 @@ #!/bin/sh set -e -# offer to run LILO -# (adapted from snippet by chr....@gmx.net) -if [ -x /sbin/lilo ] && [ -r /etc/lilo.conf ] && - [ "${DEBIAN_FRONTEND}" != "noninteractive" ] && +. /usr/share/debconf/confmodule + +if [ "$1" = configure ]; then + db_get shared/memtest86-run-lilo + if [ "$RET" = true ] && + [ -x /sbin/lilo ] && [ -r /etc/lilo.conf ] && grep "image.*=.*/boot/memtest86+.bin" /etc/lilo.conf >/dev/null -then - echo "You seem to have an entry for memtest86+ in /etc/lilo.conf." - printf "Run lilo now [y/N]? " - read c - if [ "$c" = "y" ] || [ "$c" = "Y" ] then lilo fi -fi -if [ "$1" = "configure" ] && [ -x "`which update-grub2 2>/dev/null`" ] ; then - update-grub2 + if [ -x "`which update-grub2 2>/dev/null`" ] ; then + update-grub2 + fi fi #DEBHELPER# diff -urN /tmp/memtest86+-4.00/debian/rules memtest86+-4.00/debian/rules --- /tmp/memtest86+-4.00/debian/rules 2009-12-02 21:23:44.000000000 +0100 +++ memtest86+-4.00/debian/rules 2009-12-02 22:00:17.277132946 +0100 @@ -46,7 +46,7 @@ binary-arch: build install dh_testdir dh_testroot -# dh_installdebconf + dh_installdebconf dh_installdocs README dh_buildinfo dh_installexamples debian/lilo.conf debian/grub-menu.lst diff -urN /tmp/memtest86+-4.00/debian/templates memtest86+-4.00/debian/templates --- /tmp/memtest86+-4.00/debian/templates 1970-01-01 01:00:00.000000000 +0100 +++ memtest86+-4.00/debian/templates 2009-12-02 22:23:10.740328241 +0100 @@ -0,0 +1,7 @@ +Template: shared/memtest86-run-lilo +Type: boolean +Default: false +_Description: Run lilo automatically after upgrade (if found)? + If lilo is installed and its configuration file contains the + memtest86/memtest86+ image, then it should be re-run in order to + allow booting the new image.