[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#230598: prebaseconfig: Should show progress info while running scripts



Package:  prebaseconfig
Version:  0.50
Severity: minor
Tags:     d-i

At the moment, prebaseconfig execute the script fragments in complete
silence.  If this take some time, the user experience a empty blue
screen in this period.  This is confusing and annoying.  I suggest
adding a progress bar to prebaseconfig.

I started coding, and believe the implementation is complete, but I
haven't been able to find time to test it.  Because of this, I post
the patch into BTS, and hope someone else can find time to test the
patch.  If it work, the bug should be tagged 'patch', and the patch
commited to CVS.

Index: debian/changelog
===================================================================
RCS file: /cvsroot/d-i/debian-installer/tools/prebaseconfig/debian/changelog,v
retrieving revision 1.190
diff -u -3 -p -u -r1.190 changelog
--- debian/changelog	29 Jan 2004 15:26:24 -0000	1.190
+++ debian/changelog	1 Feb 2004 09:18:32 -0000
@@ -12,6 +12,8 @@ prebaseconfig (0.51) UNRELEASED; urgency
     - Update Swedish translation sv.po
   * Jordi Mallach
     - Update Catalan translation (ca.po).
+  * Petter Reinholdtsen
+    - Show progress info when executing the prebaseconfig parts.
 
  -- Joey Hess <joeyh@debian.org>  Sun, 11 Jan 2004 17:53:30 -0500
 
Index: debian/postinst
===================================================================
RCS file: /cvsroot/d-i/debian-installer/tools/prebaseconfig/debian/postinst,v
retrieving revision 1.32
diff -u -3 -p -u -r1.32 postinst
--- debian/postinst	7 Nov 2003 15:20:09 -0000	1.32
+++ debian/postinst	1 Feb 2004 09:18:32 -0000
@@ -1,5 +1,7 @@
 #! /bin/sh
 
+. /usr/share/debconf/confmodule
+
 set -e
 
 log() {
@@ -10,8 +12,16 @@ log() {
 # parts will unmount /target/
 run_parts() {
     partsdir="$1"
+    scriptcount=`ls "$partsdir"/* | wc -l`
+
+    db_progress START 0 $scriptcount prebaseconfig/runparts-progress/title
+
     tmpfile=/tmp/prebaseconfig.stderr.log
     for script in "$partsdir"/*; do
+
+	db_subst prebaseconfig/runparts-progress/step SCRIPT "$script"
+	db_progress INFO prebaseconfig/runparts-progress/step
+
         if [ -x "$script" ] ; then
             log "info: Running $script"
             if "$script" 2> $tmpfile ; then
@@ -26,7 +36,10 @@ run_parts() {
         else
             log "error: Unable to execute $script"
         fi
+
+	db_progress STEP 1
     done
+    db_progress STOP
 }
 
 run_parts /usr/lib/prebaseconfig.d
Index: debian/templates
===================================================================
RCS file: /cvsroot/d-i/debian-installer/tools/prebaseconfig/debian/templates,v
retrieving revision 1.9
diff -u -3 -p -u -r1.9 templates
--- debian/templates	17 Nov 2003 04:22:37 -0000	1.9
+++ debian/templates	1 Feb 2004 09:18:32 -0000
@@ -16,9 +16,17 @@ _Description: System reboot
  .
  Please take care of all that before you continue.
 
-Template: prebaseconfig/progress/title
+Template: prebaseconfig/reboot-progress/title
 Type: text
 _Description: Rebooting the system
+
+Template: prebaseconfig/runparts-progress/title
+Type: text
+_Description: Finishing up the first part of the installer
+
+Template: prebaseconfig/runparts-progress/step
+Type: text
+_Description: Running script ${SCRIPT}
 
 Template: debian-installer/prebaseconfig/title
 Type: text
Index: prebaseconfig.d/99reboot
===================================================================
RCS file: /cvsroot/d-i/debian-installer/tools/prebaseconfig/prebaseconfig.d/99reboot,v
retrieving revision 1.8
diff -u -3 -p -u -r1.8 99reboot
--- prebaseconfig.d/99reboot	21 Dec 2003 16:17:35 -0000	1.8
+++ prebaseconfig.d/99reboot	1 Feb 2004 09:18:32 -0000
@@ -20,9 +20,14 @@ db_capb
 
 # The progress bar is a hack to make sure the previous dialog screen
 # is removed while the system reboots.
-db_progress START 0 1 prebaseconfig/progress/title
+db_progress START 0 2 prebaseconfig/reboot-progress/title
+
+db_progress INFO prebaseconfig/rebot-progress/title
+db_progress STEP 1
 
 /sbin/reboot
 
+db_progress INFO prebaseconfig/rebot-progress/title
 db_progress STEP 1
+
 db_progress STOP



Reply to: