Debian Bug report logs - #404045
dialog: Form error

version graph

Package: dialog; Maintainer for dialog is Santiago Vila <sanvila@debian.org>; Source for dialog is src:dialog.

Reported by: "Peter M." <peter.mdk@gmail.com>

Date: Thu, 21 Dec 2006 11:03:02 UTC

Severity: important

Found in version dialog/1.0-20060221-1

Fixed in version dialog/1.0-20060221-2

Done: Santiago Vila <sanvila@debian.org>

Bug is archived. No further changes may be made.

Forwarded to Thomas Dickey <dickey@invisible-island.net>

Toggle useless messages

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


Report forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#404045; Package dialog. Full text and rfc822 format available.

Acknowledgement sent to "Peter M." <peter.mdk@gmail.com>:
New Bug report received and forwarded. Copy sent to Santiago Vila <sanvila@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: "Peter M." <peter.mdk@gmail.com>
To: "Debian Bug Tracking System" <submit@bugs.debian.org>
Subject: dialog: Form error
Date: Thu, 21 Dec 2006 11:52:59 +0100
Package: dialog
Version: 1.0-20060221-1
Severity: important

The following script behaves differently on Debian 3.1 and Debian 4.0
in regards to navigation and more importantly the output.

----------------------------------
#!/bin/sh

DIALOG=/usr/bin/dialog

$DIALOG \
 --backtitle "Configuration" \
 --form "Enter Value" \
  0 0 0 \
  "Min"     1 1   0 1 20  0 0 \
  "Max"     2 1 100 2 20  0 0 \
  "Current" 3 1  25 3 20 12 0 \
  2>output
----------------------------------

The purpose of the script is to show a "Min" and a "Max" value and then let
the user enter a value in the "Current" field. As the field length of
"Min" and "Max" is 0 the field is non editable.

On Debian 3.1 the "Current" field is highlighted and the cursor is
also placed there. After hitting return or <TAB> + "OK" the file
"output" contains only the value entered for "Current". This behavior is
in line with the manpage.

On Debian 4.0 the cursor is placed in the first field ("Min") and no
line is highlighted. It is possible to navigate between all fields but
only the "Current" field is editable. After hitting return or <TAB> +
"OK" the file "output" contains three lines with the values of all
fields. This behavior is not in line with the manpage and is an error.

The manpage does not state whether navigation on non-editable fields are
possible or not but I think that it's an usability error. The manpage
section for the --form option is identical for Debian 3.1 and 4.0.

One of the errors mentioned above could be a re-occurrence of
#333506 wrong cursor placement on startup of "--form"

This bug could potentially be critical as dialog is often used as
the UI for debconf.

Here are the manpage section for dialog' --form option:

--form text height width formheight [ label y x item y x flen ilen ] ...
       The form dialog displays a form consisting of labels and fields,
       which are positioned on a scrollable window by coordinates given
       in the script.  The field length flen and input-length ilen tell
       how  long the field can be.  The former defines the length shown
       for a selected field, while the latter defines  the  permissible
       length of the data entered in the field.

       -  If  flen  is zero, the corresponding field cannot be altered.
          and the contents of the field determine the displayed-length.

       -  If  flen  is  negative,  the  corresponding  field  cannot be
          altered, and the negated value of flen is used  as  the  dis-
          played-length.

       -  If ilen is zero, it is set to flen.

       Use  up/down  arrows  (or  control/N, control/P) to move between
       fields.  Use tab to move between windows.

       On exit, the contents of the form-fields are written to dialog's
       output,  each  field  separated  by a newline.  The text used to
       fill non-editable fields (flen is zero or negative) is not writ-
       ten out.

Regards

Peter M.


-- System Information:
Debian Release: 4.0
 APT prefers testing
 APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dialog depends on:
ii  debianutils                  2.17        Miscellaneous utilities specific t
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libncursesw5                 5.5-5       Shared libraries for terminal hand

dialog recommends no packages.

-- no debconf information



Reply sent to Santiago Vila <sanvila@unex.es>:
You have marked Bug as forwarded. Full text and rfc822 format available.

Message #8 received at 404045-forwarded@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@unex.es>
To: Thomas Dickey <dickey@invisible-island.net>
Cc: 404045-forwarded@bugs.debian.org, "Peter M." <peter.mdk@gmail.com>
Subject: Bug#404045: dialog: Form error (fwd)
Date: Thu, 21 Dec 2006 12:32:05 +0100 (CET)
Hello.

Received this from the debian bts (and I assume you too).

For reference, the version of dialog in Debian 3.1 was 1.0-20050306-1.

---------- Forwarded message ----------
From: Peter M. <peter.mdk@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Date: Thu, 21 Dec 2006 11:52:59 +0100
Subject: Bug#404045: dialog: Form error

Package: dialog
Version: 1.0-20060221-1
Severity: important

The following script behaves differently on Debian 3.1 and Debian 4.0
in regards to navigation and more importantly the output.

----------------------------------
#!/bin/sh

DIALOG=/usr/bin/dialog

$DIALOG \
 --backtitle "Configuration" \
 --form "Enter Value" \
  0 0 0 \
  "Min"     1 1   0 1 20  0 0 \
  "Max"     2 1 100 2 20  0 0 \
  "Current" 3 1  25 3 20 12 0 \
  2>output
----------------------------------

The purpose of the script is to show a "Min" and a "Max" value and then let
the user enter a value in the "Current" field. As the field length of
"Min" and "Max" is 0 the field is non editable.

On Debian 3.1 the "Current" field is highlighted and the cursor is
also placed there. After hitting return or <TAB> + "OK" the file
"output" contains only the value entered for "Current". This behavior is
in line with the manpage.

On Debian 4.0 the cursor is placed in the first field ("Min") and no
line is highlighted. It is possible to navigate between all fields but
only the "Current" field is editable. After hitting return or <TAB> +
"OK" the file "output" contains three lines with the values of all
fields. This behavior is not in line with the manpage and is an error.

The manpage does not state whether navigation on non-editable fields are
possible or not but I think that it's an usability error. The manpage
section for the --form option is identical for Debian 3.1 and 4.0.

One of the errors mentioned above could be a re-occurrence of
#333506 wrong cursor placement on startup of "--form"

This bug could potentially be critical as dialog is often used as
the UI for debconf.

Here are the manpage section for dialog' --form option:

--form text height width formheight [ label y x item y x flen ilen ] ...
       The form dialog displays a form consisting of labels and fields,
       which are positioned on a scrollable window by coordinates given
       in the script.  The field length flen and input-length ilen tell
       how  long the field can be.  The former defines the length shown
       for a selected field, while the latter defines  the  permissible
       length of the data entered in the field.

       -  If  flen  is zero, the corresponding field cannot be altered.
          and the contents of the field determine the displayed-length.

       -  If  flen  is  negative,  the  corresponding  field  cannot be
          altered, and the negated value of flen is used  as  the  dis-
          played-length.

       -  If ilen is zero, it is set to flen.

       Use  up/down  arrows  (or  control/N, control/P) to move between
       fields.  Use tab to move between windows.

       On exit, the contents of the form-fields are written to dialog's
       output,  each  field  separated  by a newline.  The text used to
       fill non-editable fields (flen is zero or negative) is not writ-
       ten out.

Regards

Peter M.


-- System Information:
Debian Release: 4.0
 APT prefers testing
 APT policy: (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.19
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages dialog depends on:
ii  debianutils                  2.17        Miscellaneous utilities specific t
ii  libc6                        2.3.6.ds1-8 GNU C Library: Shared libraries
ii  libncursesw5                 5.5-5       Shared libraries for terminal hand

dialog recommends no packages.

-- no debconf information



Message #9 received at 404045-forwarded@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: Santiago Vila <sanvila@unex.es>
Cc: Thomas Dickey <dickey@invisible-island.net>, 404045-forwarded@bugs.debian.org, "Peter M." <peter.mdk@gmail.com>
Subject: Re: Bug#404045: dialog: Form error (fwd)
Date: Thu, 21 Dec 2006 06:59:57 -0500 (EST)
On Thu, 21 Dec 2006, Santiago Vila wrote:

> Hello.
>
> Received this from the debian bts (and I assume you too).

I hadn't seen it yet (thanks)

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net



Information forwarded to debian-bugs-dist@lists.debian.org, Santiago Vila <sanvila@debian.org>:
Bug#404045; Package dialog. Full text and rfc822 format available.

Acknowledgement sent to dickey@his.com:
Extra info received and forwarded to list. Copy sent to Santiago Vila <sanvila@debian.org>. Full text and rfc822 format available.

Message #14 received at 404045@bugs.debian.org (full text, mbox):

From: Thomas Dickey <dickey@his.com>
To: 404045@bugs.debian.org
Subject: re: #404045 dialog: Form error
Date: Sun, 31 Dec 2006 09:04:39 -0500
[Message part 1 (text/plain, inline)]
Looking at my change history, it seems that was just being too tidy on
a change.  Here's a fix (will be in the next snapshot):

--- formbox.c   2006/12/27 00:50:24     1.53
+++ formbox.c   2006/12/27 01:04:00     1.54
@@ -1,5 +1,5 @@
 /*
- *  $Id: formbox.c,v 1.52 2006/01/27 01:29:50 tom Exp $
+ *  $Id: formbox.c,v 1.53 2006/12/27 00:50:24 tom Exp $
  *
  *  formbox.c -- implements the form (i.e, some pairs label/editbox)
  *
@@ -779,8 +779,6 @@
        listitems[i].text_flen = atoi(ItemTextFLen(i));
        listitems[i].text_ilen = atoi(ItemTextILen(i));
        listitems[i].help = (dialog_vars.item_help) ? ItemHelp(i) : "";
-
-       listitems[i].text_flen = real_length(&listitems[i]);
     }
                  
     result = dlg_form(title,


-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net
[signature.asc (application/pgp-signature, inline)]

Reply sent to Santiago Vila <sanvila@debian.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "Peter M." <peter.mdk@gmail.com>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #19 received at 404045-close@bugs.debian.org (full text, mbox):

From: Santiago Vila <sanvila@debian.org>
To: 404045-close@bugs.debian.org
Subject: Bug#404045: fixed in dialog 1.0-20060221-2
Date: Mon, 01 Jan 2007 19:02:02 +0000
Source: dialog
Source-Version: 1.0-20060221-2

We believe that the bug you reported is fixed in the latest version of
dialog, which is due to be installed in the Debian FTP archive:

dialog_1.0-20060221-2.diff.gz
  to pool/main/d/dialog/dialog_1.0-20060221-2.diff.gz
dialog_1.0-20060221-2.dsc
  to pool/main/d/dialog/dialog_1.0-20060221-2.dsc
dialog_1.0-20060221-2_powerpc.deb
  to pool/main/d/dialog/dialog_1.0-20060221-2_powerpc.deb



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 404045@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Santiago Vila <sanvila@debian.org> (supplier of updated dialog package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Mon,  1 Jan 2007 19:25:16 +0100
Source: dialog
Binary: dialog
Architecture: source powerpc
Version: 1.0-20060221-2
Distribution: unstable
Urgency: medium
Maintainer: Santiago Vila <sanvila@debian.org>
Changed-By: Santiago Vila <sanvila@debian.org>
Description: 
 dialog     - Displays user-friendly dialog boxes from shell scripts
Closes: 404045
Changes: 
 dialog (1.0-20060221-2) unstable; urgency=medium
 .
   * Fixed regression in form box. Patch by the author. Closes: #404045.
Files: 
 a41fb42e29042bbec883bad52cbde6b6 593 misc optional dialog_1.0-20060221-2.dsc
 9b241a013f9bfe3657210ea5393bf342 8860 misc optional dialog_1.0-20060221-2.diff.gz
 683a6e1e32df615453bd048c08bb738a 232034 misc optional dialog_1.0-20060221-2_powerpc.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFmVLLd9Uuvj7yPNYRAnduAKCVsjJ+u+TrfTgaQzxbn/N4M/WODQCdEtwZ
x3Wi0SRdig2RVMzszAEmoMA=
=uFxT
-----END PGP SIGNATURE-----




Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 25 Jun 2007 11:12:07 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Apr 16 19:34:10 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.