Debian Bug report logs - #397785
lintian: Warn if a postinst script doesn't understand reconfigure

version graph

Package: lintian; Maintainer for lintian is Debian Lintian Maintainers <[email protected]>; Source for lintian is src:lintian (PTS, buildd, popcon).

Reported by: Frank Küster <[email protected]>

Date: Thu, 9 Nov 2006 14:03:09 UTC

Severity: wishlist

Found in version 1.5.8

Fix blocked by 629247: lintian: Please use a decent shell script parser

Reply or subscribe to this bug.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to [email protected], Frank Küster <[email protected]>, Debconf Developers <[email protected]>, Debian Lintian Maintainers <[email protected]>:
Bug#397785; Package lintian. (full text, mbox, link).


Acknowledgement sent to Frank Küster <[email protected]>:
New Bug report received and forwarded. Copy sent to Frank Küster <[email protected]>, Debconf Developers <[email protected]>, Debian Lintian Maintainers <[email protected]>. (full text, mbox, link).


Message #5 received at [email protected] (full text, mbox, reply):

From: Frank Küster <[email protected]>
To: Debian Bug Tracking System <[email protected]>
Subject: [debconf] Should warn if postinst doesn't understand argument "reconfigure"
Date: Thu, 09 Nov 2006 14:57:28 +0100
Package: lintian
Version: 1.5.8
Severity: wishlist

From debconf-devel(7):

,----
| the right thing would be to pass $1 = "reconfigure", but doing so
| without breaking all the postinsts that use debconf is difficult.  The
| migration plan away from this hack is to encourage people to write
| postinsts that accept "reconfigure", and once they all do, begin
| passing that variable.
`----

To aid in that goal, it would be nice if lintian complained if
reconfigure is not accepted.

Regards, Frank

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (99, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.17-2-686
Locale: LANG=de_DE@euro, LC_CTYPE=de_DE@euro (charmap=ISO-8859-15)

Versions of packages debconf depends on:
ii  debconf-i18n               1.4.30.13     full internationalization support 
ii  perl-base                  5.8.4-8sarge5 The Pathologically Eclectic Rubbis

-- debconf information:
* debconf/priority: medium
* debconf/frontend: Kde

-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Information forwarded to [email protected], Debian Lintian Maintainers <[email protected]>:
Bug#397785; Package lintian. (full text, mbox, link).


Acknowledgement sent to Russ Allbery <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <[email protected]>. (full text, mbox, link).


Message #10 received at [email protected] (full text, mbox, reply):

From: Russ Allbery <[email protected]>
To: Frank Küster <[email protected]>
Cc: [email protected]
Subject: Re: Bug#397785: [debconf] Should warn if postinst doesn't understand argument "reconfigure"
Date: Thu, 09 Nov 2006 11:54:15 -0800
Frank Küster <[email protected]> writes:

> Package: lintian
> Version: 1.5.8
> Severity: wishlist

> From debconf-devel(7):

> ,----
> | the right thing would be to pass $1 = "reconfigure", but doing so
> | without breaking all the postinsts that use debconf is difficult.  The
> | migration plan away from this hack is to encourage people to write
> | postinsts that accept "reconfigure", and once they all do, begin
> | passing that variable.
> `----

> To aid in that goal, it would be nice if lintian complained if
> reconfigure is not accepted.

Agreed, but I don't have any idea how to do that given that the tests in
postinst can be written as case statements or if statements and in many
different formats and syntaxes and simply missing the word "reconfigure"
doesn't mean that the postinst is wrong.

-- 
Russ Allbery ([email protected])               <http://www.eyrie.org/~eagle/>



Information forwarded to [email protected], Debian Lintian Maintainers <[email protected]>:
Bug#397785; Package lintian. (full text, mbox, link).


Acknowledgement sent to Frank Küster <[email protected]>:
Extra info received and forwarded to list. Copy sent to Debian Lintian Maintainers <[email protected]>. (full text, mbox, link).


Message #15 received at [email protected] (full text, mbox, reply):

From: Frank Küster <[email protected]>
To: Russ Allbery <[email protected]>
Cc: [email protected]
Subject: Re: Bug#397785: [debconf] Should warn if postinst doesn't understand argument "reconfigure"
Date: Fri, 10 Nov 2006 07:59:45 +0100
Russ Allbery <[email protected]> wrote:

> Frank Küster <[email protected]> writes:
>
>> Package: lintian
>> Version: 1.5.8
>> Severity: wishlist
>
>> From debconf-devel(7):
>
>> ,----
>> | the right thing would be to pass $1 = "reconfigure", but doing so
>> | without breaking all the postinsts that use debconf is difficult.  The
>> | migration plan away from this hack is to encourage people to write
>> | postinsts that accept "reconfigure", and once they all do, begin
>> | passing that variable.
>> `----
>
>> To aid in that goal, it would be nice if lintian complained if
>> reconfigure is not accepted.
>
> Agreed, but I don't have any idea how to do that given that the tests in
> postinst can be written as case statements or if statements and in many
> different formats and syntaxes and simply missing the word "reconfigure"
> doesn't mean that the postinst is wrong.

Yes, this is hard and probably won't go without false positives and
negatives... 

One approach might be to

- find assignments of $1 to a variable name

- check all occurrences of 

case ['"]*\$(1|name_found)['"] 

  or analogous 

if (\[|test) ...

  whether there's an occurence of "reconfigure" before "esac" or before
  "then", respectively.  I'd say it's a feature not to allow
  "*configure" in case statements.

Even if this approach might give false positives, I still think it's
better to do such a check than none at all.  

Regards, Frank
-- 
Dr. Frank Küster
Single Molecule Spectroscopy, Protein Folding @ Inst. f. Biochemie, Univ. Zürich
Debian Developer (teTeX/TeXLive)



Changed Bug title to `[checks/debconf] warn if postinst doesn't understand reconfigure' from `[debconf] Should warn if postinst doesn't understand argument "reconfigure"'. Request was from Russ Allbery <[email protected]> to [email protected]. (Sun, 11 Jan 2009 04:09:16 GMT) (full text, mbox, link).


Added blocking bug(s) of 397785: 629247 Request was from Niels Thykier <[email protected]> to [email protected]. (Sun, 26 Jun 2011 19:15:03 GMT) (full text, mbox, link).


Changed Bug title to 'lintian: Warn if a postinst script doesn't understand reconfigure' from '[checks/debconf] warn if postinst doesn't understand reconfigure'. Request was from Chris Lamb <[email protected]> to [email protected]. (Mon, 29 Jan 2018 13:48:19 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 08:30:40 2025; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.