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

Bug#270969: marked as done ([patch] Improved progress bar information)



Your message dated Sun, 12 Sep 2004 17:47:02 -0400
with message-id <E1C6cBa-0004R4-00@newraff.debian.org>
and subject line Bug#270969: fixed in base-installer 1.06
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; 10 Sep 2004 09:56:23 +0000
>From aragorn@tiscali.nl Fri Sep 10 02:56:23 2004
Return-path: <aragorn@tiscali.nl>
Received: from (elrond.fjphome.nl) [195.240.184.66] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1C5i8l-0000K0-00; Fri, 10 Sep 2004 02:56:23 -0700
Received: from strider.fjphome.nl ([10.19.66.86] ident=fjp)
	by elrond.fjphome.nl with esmtp (Exim 3.35 #1 (Debian))
	id 1C5i8F-000560-00
	for <submit@bugs.debian.org>; Fri, 10 Sep 2004 11:55:51 +0200
From: Frans Pop <aragorn@tiscali.nl>
To: submit@bugs.debian.org
Subject: [patch] Improved progress bar information
Date: Fri, 10 Sep 2004 11:55:51 +0200
User-Agent: KMail/1.6.2
MIME-Version: 1.0
Content-Disposition: inline
Content-Type: Multipart/Mixed;
  boundary="Boundary-00=_noXQBlvKUt2vVfP"
Message-Id: <[🔎] 200409101155.51411.aragorn@tiscali.nl>
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 


--Boundary-00=_noXQBlvKUt2vVfP
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: base-installer
Version: 1.05
Severity: wishlist

The attached patch improves the information provided by d-i during 
base-installation:
- During both kernel installation and installation of extra packages,
  the package being installed is shown and the progress bar is advanced
  after each package.
- For the kernel the advancement of the progress bar is rough; for extra
  packages it is based on the number of packages to be installed.
- Increased the relative duration for installation of kernel and
  extra packages based on timings from a i386 netboot installation.


I have considered the following alternatives for the template changes.

ALTERNATIVE 1
  Installing extra packages...
  .
  Getting and installing ${SUBST0}
ALTERNATIVE 2
  Installing extra packages...\n
  Getting and installing ${SUBST0}
ALTERNATIVE 3
  Installing extra packages - getting and installing ${SUBST0}...

I'm not sure if alternative 2 is valid.
In the end I chose alternative 3 because that keeps everything on one line so 
the progress bar will 'jump around' less as extra lines are added/deleted.
(Alternative 1 would have meant slightly less work for translators.)
The proposed description for 'install_kernel_package_long' is too long for one 
line, so may need rethinking (or could be dropped altogether using 
'install_kernel_package' instead).


I have tested the formula used to advance the progress bar during an actual 
installation (and it works beautifully).
I have _not_ tested the new templates.

--Boundary-00=_noXQBlvKUt2vVfP
Content-Type: text/x-diff;
  charset="us-ascii";
  name="base-installer.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="base-installer.patch"

diff -u ./base-installer.templates new/base-installer.templates
--- ./base-installer.templates	2004-08-23 18:04:45.000000000 +0200
+++ new/base-installer.templates	2004-09-10 11:21:36.000000000 +0200
@@ -223,6 +223,10 @@
 Type: text
 _Description: Installing extra packages...
 
+Template: base-installer/section/install_extra_package
+Type: text
+_Description: Installing extra packages - getting and installing ${SUBST0}...
+
 Template: base-installer/section/create_devices
 Type: text
 _Description: Creating device files...
@@ -235,6 +239,14 @@
 Type: text
 _Description: Installing the kernel...
 
+Template: base-installer/section/install_kernel_package
+Type: text
+_Description: Installing the kernel - getting and installing ${SUBST0}...
+
+Template: base-installer/section/install_kernel_package_long
+Type: text
+_Description: Installing the kernel - getting and installing ${SUBST0}... (this may take a long time)
+
 Template: base-installer/section/install_pcmcia_modules
 Type: text
 _Description: Installing the PCMCIA modules
diff -u ./postinst new/postinst
--- ./postinst	2004-09-09 20:17:10.000000000 +0200
+++ new/postinst	2004-09-10 11:19:46.000000000 +0200
@@ -670,6 +670,8 @@
 
 	if [ yes = "$do_initrd" ] ; then
 		info "Installing initrd-tools."
+		db_subst "base-installer/section/install_kernel_package" SUBST0 "initrd-tools"
+		db_progress INFO "base-installer/section/install_kernel_package"
 		# Make sure initrd-tools is installed before we change its
 		# configuration
 		if ! apt-install initrd-tools 2>> $LOGFILE ; then
@@ -696,11 +698,17 @@
 		info "Not installing initrd-tools."
 	fi
 
+	# Advance progress bar to 15% of allocated space for install_kernel
+	WRK_POS=$((POS + step * 15 / 100))
+	db_progress SET $WRK_POS
+
 	# Installing mkvmlinuz on the powerpc subarches that need it.
 	if [ "$ARCH" = "powerpc" -a "$(uname -r | cut -d . -f 1,2)" = "2.6" ]; then
 		case "$SUBARCH" in
 			prep | chrp | chrp_pegasos)
 				info "Installing mkvmlinuz."
+				db_subst "base-installer/section/install_kernel_package" SUBST0 "mkvmlinuz"
+				db_progress INFO "base-installer/section/install_kernel_package"
 				apt-install mkvmlinuz 2>> $LOGFILE || true
 				cat >> /target/etc/kernel-img.conf <<EOF
 postinst_hook = /usr/sbin/mkvmlinuz
@@ -709,9 +717,19 @@
 		esac
 	fi
 
+	# Advance progress bar to 30% of allocated space for install_kernel
+	WRK_POS=$((POS + step * 30 / 100))
+	db_progress SET $WRK_POS
+
 	info "Installing kernel '$KERNEL'."
+	db_subst "base-installer/section/install_kernel_package_long" SUBST0 "$KERNEL"
+	db_progress INFO "base-installer/section/install_kernel_package_long"
 	apt-install "$KERNEL" 2>> $LOGFILE || kernel_install_failed=$?
 
+	# Advance progress bar to 90% of allocated space for install_kernel
+	WRK_POS=$((POS + step * 90 / 100))
+	db_progress SET $WRK_POS
+
 	# /proc/filesystems will accomodate this past the second bootup.
 	if [ "$do_initrd" = yes ]; then
 		sed -e 's/^ROOT=.*/ROOT=probe/' $mkinitrdconf > $mkinitrdconf.new && mv $mkinitrdconf.new $mkinitrdconf
@@ -747,12 +765,21 @@
 	
 	if [ -f /var/lib/apt-install/queue ] ; then
 		# We need to install these one by one in case one fails.
+		NR_PKG=`cat /var/lib/apt-install/queue | wc -w`
+		CURR_PKG=0
 		for PKG in `cat /var/lib/apt-install/queue`; do
+			db_subst "base-installer/section/install_extra_package" SUBST0 "$PKG"
+			db_progress INFO "base-installer/section/install_extra_package"
+
 			if apt-install $PKG >> $LOGFILE 2>&1 ; then
 				info "Installed $PKG successfully into /target/"
 			else
 				warning "Failed to install $PKG into /target/: $?"
 			fi
+
+			# Advance progress bar within space allocated for install_extra
+			WRK_POS=$((POS + step * ++CURR_PKG / NR_PKG))
+			db_progress SET $WRK_POS
 		done
 	fi
 }
@@ -776,7 +803,7 @@
 waypoint 3	apt_update
 waypoint 2	create_devices
 waypoint 1	pick_kernel
-waypoint 10	install_kernel
+waypoint 35	install_kernel
 case "$ARCH" in
 	i386*)
 		if [ -e /proc/bus/pccard/drivers ]; then
@@ -784,7 +811,7 @@
 		fi
 	;;
 esac
-waypoint 5	install_extra
+waypoint 15	install_extra
 waypoint 0	cleanup
 
 db_progress START 0 $NUM_STEPS base-installer/progress/installing-debian

--Boundary-00=_noXQBlvKUt2vVfP--

---------------------------------------
Received: (at 270969-close) by bugs.debian.org; 12 Sep 2004 21:54:06 +0000
>From katie@ftp-master.debian.org Sun Sep 12 14:54:06 2004
Return-path: <katie@ftp-master.debian.org>
Received: from newraff.debian.org [208.185.25.31] (mail)
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1C6cIQ-00027a-00; Sun, 12 Sep 2004 14:54:06 -0700
Received: from katie by newraff.debian.org with local (Exim 3.35 1 (Debian))
	id 1C6cBa-0004R4-00; Sun, 12 Sep 2004 17:47:02 -0400
From: Joey Hess <joeyh@debian.org>
To: 270969-close@bugs.debian.org
X-Katie: $Revision: 1.51 $
Subject: Bug#270969: fixed in base-installer 1.06
Message-Id: <E1C6cBa-0004R4-00@newraff.debian.org>
Sender: Archive Administrator <katie@ftp-master.debian.org>
Date: Sun, 12 Sep 2004 17:47:02 -0400
Delivered-To: 270969-close@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-6.0 required=4.0 tests=BAYES_00,HAS_BUG_NUMBER 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Source: base-installer
Source-Version: 1.06

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

base-installer_1.06.dsc
  to pool/main/b/base-installer/base-installer_1.06.dsc
base-installer_1.06.tar.gz
  to pool/main/b/base-installer/base-installer_1.06.tar.gz
base-installer_1.06_i386.udeb
  to pool/main/b/base-installer/base-installer_1.06_i386.udeb



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 270969@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Joey Hess <joeyh@debian.org> (supplier of updated base-installer 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: Sun, 12 Sep 2004 17:27:32 -0400
Source: base-installer
Binary: base-installer
Architecture: source i386
Version: 1.06
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Joey Hess <joeyh@debian.org>
Description: 
 base-installer - Install the base system (udeb)
Closes: 270969
Changes: 
 base-installer (1.06) unstable; urgency=low
 .
   * Joey Hess
     - Fix progress bar takedown if backing up from the kernel selection
       question.
     - Patch from Frans Pop to improve progress bar information when installing
       kernel and extra packages. Closes: #270969
   * Sven Luther
     - Moved powerpc kernels to 2.6.8/2.4.27.
   * Colin Watson
     - Add guard against overflow of progress bar sections.
   * Updated translations:
     - German (de.po) by Dennis Stampfer
     - Greek, Modern (1453-) (el.po) by Greek Translation Team
     - Spanish (Castilian) (es.po) by Javier Fernandez-Sanguino Peña
     - French (fr.po) by French Team
     - Portuguese (pt.po) by Miguel Figueiredo
Files: 
 f01976ca30af5bd8aa63870aee479cd2 746 debian-installer required base-installer_1.06.dsc
 8846517c1024a33de1d6569a90cd6011 98849 debian-installer required base-installer_1.06.tar.gz
 9c7e2afa18820577271a7d1b354ef0a0 72586 debian-installer required base-installer_1.06_i386.udeb
package-type: udeb

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

iD8DBQFBRL/P2tp5zXiKP0wRArBzAKDNXip8mUxB407I+mVij2v1vKGO8wCgrFZp
BBnIq6hQzFsbuZMNuuoyMFc=
=ju9s
-----END PGP SIGNATURE-----



Reply to: