Your message dated Wed, 15 Oct 2003 03:25:28 +0200
with message-id <[EMAIL PROTECTED]>
and subject line Closing #211063
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 15 Sep 2003 16:14:16 +0000
>From [EMAIL PROTECTED] Mon Sep 15 11:14:14 2003
Return-path: <[EMAIL PROTECTED]>
Received: from dessverre.samfundet.no [129.241.93.53] 
        by master.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 19yvzR-0000e4-00; Mon, 15 Sep 2003 11:14:13 -0500
Received: from sesse by dessverre.samfundet.no with local (Exim 3.36 #1 (Debian))
        id 19yvzE-0001N6-00; Mon, 15 Sep 2003 18:14:00 +0200
Content-Type: multipart/mixed; boundary="===============1864829871=="
MIME-Version: 1.0
From: "Steinar H. Gunderson" <[EMAIL PROTECTED]>
To: Debian Bug Tracking System <[EMAIL PROTECTED]>
Subject: autopartkit: should not re-ask for confirmation
X-Mailer: reportbug 2.28
Date: Mon, 15 Sep 2003 18:14:00 +0200
Message-Id: <[EMAIL PROTECTED]>
Sender: "Steinar H. Gunderson" <[EMAIL PROTECTED]>
Delivered-To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=-11.3 required=4.0
        tests=HAS_PACKAGE,PATCH_UNIFIED_DIFF
        autolearn=ham version=2.53-bugs.debian.org_2003_9_14
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_9_14 
(1.174.2.15-2003-03-30-exp)

This is a multi-part MIME message sent by reportbug.

--===============1864829871==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: autopartkit
Version: 0.57 (not installed)
Severity: wishlist
Tags: patch d-i

Before asking autopartkit/confirm (the message that asks the user to
confirm the deletion of everything on all hard drives), autopartkit
fsets autopartkit/confirm's "seen" attribute to false, which prevents
(among others) fully automated installation.

The included (untested) patch makes autopartkit heed the "seen"
attribute, but sets it back to false if the user answered no or exited,
since the user usually would go back and correct something, and then
answer yes the second time.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux dessverre 2.4.20-k7 #1 Tue Jan 14 00:29:06 EST 2003 i686
Locale: LANG=C, LC_CTYPE=en_US.ISO8859-1


--===============1864829871==
Content-Type: text/x-c; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
        
filename="/root/debian-installer/tools/autopartkit/autopartkit-confirm-onlyonce.patch"

? autopartkit-confirm-onlyonce.patch
Index: autopartkit.c
===================================================================
RCS file: /cvs/debian-boot/debian-installer/tools/autopartkit/autopartkit.c,v
retrieving revision 1.63
diff -u -r1.63 autopartkit.c
--- autopartkit.c       16 Aug 2003 22:57:46 -0000      1.63
+++ autopartkit.c       15 Sep 2003 16:10:49 -0000
@@ -205,19 +205,6 @@
     client->command(client, "TITLE", new_title, NULL);
 }
 
-static int mydebconf_bool(char *priority, char *template)
-{
-    const char *value;
-
-    value = mydebconf_input(priority, template);
-    if (strstr(value, "true"))
-       return 1;
-    if (strstr(value, "false"))
-       return 0;
-    mydebconf_debug("unknown bool value", value);
-    return 0;
-}
-
 void autopartkit_log(const int level, const char * format, ...)
 {
     int LOGLIMIT = 1;
@@ -228,18 +215,23 @@
     vsyslog(LOG_DEBUG, format, ap);
     va_end(ap);
 }
+
+/* note: only fsets seen=true if the user answered yes */
 static void autopartkit_confirm(void)
 {
-    static int confirm = 0;
-    if (confirm)
-       return;
-    if (mydebconf_bool("critical", "autopartkit/confirm"))
-    {
-       confirm = 1;
-       return;
-    } else {
-       exit(EXIT_FAILURE);
-    }
+    client->command (client, "INPUT", "critical", "autopartkit/confirm", NULL);
+    client->command (client, "GO", NULL);
+    client->command (client, "GET", "autopartkit/confirm", NULL);
+
+    if (strstr(client->value, "true"))
+        return;
+
+    client->command (client, "FSET", "autopartkit/confirm", "seen", "false", NULL);
+    
+    if (strstr(client->value, "false"))
+        exit(EXIT_FAILURE);
+    mydebconf_debug("unknown bool value", client->value);
+    exit(EXIT_FAILURE);
 }
 
 static void disable_kmsg(int disable)

--===============1864829871==--

---------------------------------------
Received: (at 211063-done) by bugs.debian.org; 15 Oct 2003 01:25:39 +0000
>From [EMAIL PROTECTED] Tue Oct 14 20:25:30 2003
Return-path: <[EMAIL PROTECTED]>
Received: from trofast.sesse.net [129.241.93.32] 
        by master.debian.org with esmtp (Exim 3.35 1 (Debian))
        id 1A9aPq-0003YG-00; Tue, 14 Oct 2003 20:25:30 -0500
Received: from root by trofast.sesse.net with local (Exim 3.36 #1 (Debian))
        id 1A9aPp-0008KG-00
        for <[EMAIL PROTECTED]>; Wed, 15 Oct 2003 03:25:29 +0200
Date: Wed, 15 Oct 2003 03:25:28 +0200
From: "Steinar H. Gunderson" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Closing #211063
Message-ID: <[EMAIL PROTECTED]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
X-Operating-System: Linux 2.4.22 on a i686
X-Swatch-Date: @141
X-Seconds-To-TG03: -15704644
User-Agent: Mutt/1.5.4i
Delivered-To: [EMAIL PROTECTED]
X-Spam-Status: No, hits=2.8 required=4.0
        tests=BAYES_99,SUBJ_HAS_UNIQ_ID
        version=2.53-bugs.debian.org_2003_10_13
X-Spam-Level: **
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_10_13 
(1.174.2.15-2003-03-30-exp)

With the latest cdebconf changes (pending upload), autopartkit works sanely
for me with both debconf preseeding and manual operation (including running
it multiple times). Closing this bug. (I thought I had already, but OK... :-)
)

/* Steinar */
-- 
Homepage: http://www.sesse.net/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to