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

Re: partman review



Joey Hess wrote:
> Now that I've straightened out my initrd, I've managed to create this
> partman patch. This modifies the main screen with a simpler, cleaner look
> as I described earlier, including removing the menu items for commit and
> abort. I've also made some similar changes to the active_partition screen.
> 
> Since I am new to partman, and am not sure if it's really ok to remove
> the commit and abort menu items, I will hold off on applying this patch
> until Anton has a chance to comment on it.

An updated version of this patch. It adds a confirmaton question before
formatting the disk. Also makes partman the default partitioner.

-- 
see shy jo
Index: definitions.sh
===================================================================
RCS file: /cvsroot/d-i/debian-installer/partman/partman/definitions.sh,v
retrieving revision 1.3
diff -u -r1.3 definitions.sh
--- definitions.sh	24 Feb 2004 18:15:45 -0000	1.3
+++ definitions.sh	29 Feb 2004 00:54:33 -0000
@@ -103,7 +103,7 @@
     local IFS
     for dev in $DEVICES/*; do
 	[ -d $dev ] || continue
-	printf "%s//\t------- %s\n" $dev "$(device_name $dev)" # GETTEXT?
+	printf "%s//\t%s\n" $dev "$(device_name $dev)" # GETTEXT?
 	cd $dev
 
 	open_dialog PARTITIONS
@@ -115,7 +115,7 @@
 	while { read num id size type fs path name; [ "$id" ]; }; do
 	    part=${dev}/$id
 	    [ -f $part/view ] || continue
-	    printf "%s//%s\t%s\n" "$dev" "$id" $(cat $part/view)
+	    printf "%s//%s\t$NBSP       %s\n" "$dev" "$id" $(cat $part/view)
 	done
 	restore_ifs
     done
@@ -461,7 +461,7 @@
 
 device_name () {
     cd $1
-    printf "%s - %s (%s)" "$(humandev $(cat device))" "$(cat model)" "$(longint2human $(cat size))"
+    printf "%s - %s %s" "$(humandev $(cat device))" "$(longint2human $(cat size))" "$(cat model)"
 }
 
 # Local Variables:
Index: partman
===================================================================
RCS file: /cvsroot/d-i/debian-installer/partman/partman/partman,v
retrieving revision 1.2
diff -u -r1.2 partman
--- partman	16 Feb 2004 09:46:26 -0000	1.2
+++ partman	29 Feb 2004 00:54:34 -0000
@@ -45,6 +45,14 @@
 	abort 1
     fi
     
+    db_reset partman/confirm
+    db_input critical partman/confirm
+    db_go || true
+    db_get partman/confirm
+    if [ "$RET" = false ]; then
+	    abort 10 # back up to main menu
+    fi
+    
     for s in /lib/partman/commit.d/*; do
 	if [ -x $s ]; then
 	    $s || continue 2
@@ -66,4 +74,3 @@
 
     break
 done    
-
Index: active_partition/_numbers
===================================================================
RCS file: /cvsroot/d-i/debian-installer/partman/partman/active_partition/_numbers,v
retrieving revision 1.2
diff -u -r1.2 _numbers
--- active_partition/_numbers	24 Feb 2004 18:21:11 -0000	1.2
+++ active_partition/_numbers	29 Feb 2004 00:54:34 -0000
@@ -1,3 +1,3 @@
-75 finish
-80 hrule
+75 divider
+80 finish
 98 chs
Index: active_partition/divider/choices
===================================================================
RCS file: active_partition/divider/choices
diff -N active_partition/divider/choices
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ active_partition/divider/choices	29 Feb 2004 00:54:34 -0000
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Not just a blank line because debconf would select that as the default
+printf "divider\t%s\n" " "
Index: active_partition/divider/do_option
===================================================================
RCS file: active_partition/divider/do_option
diff -N active_partition/divider/do_option
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ active_partition/divider/do_option	29 Feb 2004 00:54:34 -0000
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+
Index: active_partition/hrule/choices
===================================================================
RCS file: active_partition/hrule/choices
diff -N active_partition/hrule/choices
--- active_partition/hrule/choices	24 Feb 2004 18:15:45 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-printf "hrule\t%s\n" "---------------------------------------------"
Index: active_partition/hrule/do_option
===================================================================
RCS file: active_partition/hrule/do_option
diff -N active_partition/hrule/do_option
--- active_partition/hrule/do_option	24 Feb 2004 18:15:45 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-
Index: choose_partition/_numbers
===================================================================
RCS file: /cvsroot/d-i/debian-installer/partman/partman/choose_partition/_numbers,v
retrieving revision 1.2
diff -u -r1.2 _numbers
--- choose_partition/_numbers	24 Feb 2004 18:21:11 -0000	1.2
+++ choose_partition/_numbers	29 Feb 2004 00:54:34 -0000
@@ -1,6 +1,4 @@
 40 partition_tree
-50 hrule
+50 divider
 60 finish
 70 undo
-75 commit
-80 abort
Index: choose_partition/abort/choices
===================================================================
RCS file: choose_partition/abort/choices
diff -N choose_partition/abort/choices
--- choose_partition/abort/choices	7 Jan 2004 19:50:35 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,7 +0,0 @@
-#!/bin/sh
-
-. /usr/share/debconf/confmodule
-
-
-db_metaget partman/text/abort_the_partitioning description
-printf "abort\t$RET"
Index: choose_partition/abort/do_option
===================================================================
RCS file: choose_partition/abort/do_option
diff -N choose_partition/abort/do_option
--- choose_partition/abort/do_option	7 Jan 2004 19:50:35 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-exit 255
Index: choose_partition/commit/choices
===================================================================
RCS file: choose_partition/commit/choices
diff -N choose_partition/commit/choices
--- choose_partition/commit/choices	7 Jan 2004 19:50:35 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-. /usr/share/debconf/confmodule
-
-
-db_metaget partman/text/commit_the_partitioning description
-printf "commit\t$RET"
-
Index: choose_partition/commit/do_option
===================================================================
RCS file: choose_partition/commit/do_option
diff -N choose_partition/commit/do_option
--- choose_partition/commit/do_option	7 Jan 2004 19:50:35 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-#!/bin/sh
-
-for s in /lib/partman/commit.d/*; do
-    if [ -x $s ]; then
-	$s || break
-    fi
-done
-
-for s in /lib/partman/init.d/*; do
-    if [ -x $s ]; then
-	$s || exit 1
-    fi
-done
-
Index: choose_partition/divider/choices
===================================================================
RCS file: choose_partition/divider/choices
diff -N choose_partition/divider/choices
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ choose_partition/divider/choices	29 Feb 2004 00:54:34 -0000
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+# Not just a blank line because debconf would select that as the default
+printf "divider\t%s\n" " "
Index: choose_partition/divider/do_option
===================================================================
RCS file: choose_partition/divider/do_option
diff -N choose_partition/divider/do_option
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ choose_partition/divider/do_option	29 Feb 2004 00:54:34 -0000
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+
Index: choose_partition/hrule/choices
===================================================================
RCS file: choose_partition/hrule/choices
diff -N choose_partition/hrule/choices
--- choose_partition/hrule/choices	7 Jan 2004 19:50:35 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-printf "hrule\t%s\n" "---------------------------------------------"
Index: choose_partition/hrule/do_option
===================================================================
RCS file: choose_partition/hrule/do_option
diff -N choose_partition/hrule/do_option
--- choose_partition/hrule/do_option	7 Jan 2004 19:50:35 -0000	1.1
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-
Index: debian/changelog
===================================================================
RCS file: /cvsroot/d-i/debian-installer/partman/partman/debian/changelog,v
retrieving revision 1.93
diff -u -r1.93 changelog
--- debian/changelog	28 Feb 2004 14:01:07 -0000	1.93
+++ debian/changelog	29 Feb 2004 00:54:35 -0000
@@ -3,7 +3,17 @@
   * Anton Zinoviev
     - new release
   * Joey Hess
-    - shortened the title to work around a bug in cdebconf
+    - reformatted the main screen
+    - minor reformatting of the partition edit screen
+    - rename hrule to divider
+    - removed not very useful/redundant commit and abort choices from
+      choose_partition
+    - added a confirmation message on partman exit to make sure the user does
+      not accidentially destroy his data
+    - shorten title to work around cdebconf bug
+    - change device_name to put the drive size before the device name
+    - change menu item number to 42 so it's the default partitioner 
+      (should this only be on i386?)
   * Christian Perrier
     - Corrected typo in templates and unfuzzy translations
   * Translations :
Index: debian/control
===================================================================
RCS file: /cvsroot/d-i/debian-installer/partman/partman/debian/control,v
retrieving revision 1.2
diff -u -r1.2 control
--- debian/control	14 Feb 2004 19:34:27 -0000	1.2
+++ debian/control	29 Feb 2004 00:54:36 -0000
@@ -10,7 +10,7 @@
 Architecture: any
 Depends: libc-udeb, hw-detect-full, libparted1.6-udeb, partman-partitioning, partman-target, libdebian-installer4-udeb
 Provides: made-filesystems, mounted-partitions, partitioned-harddrives
-XB-Installer-Menu-Item: 48
+XB-Installer-Menu-Item: 42
 Description: Partition the storage devices (partman)
  Partman lets the user to partition disks, create filesystems, assign
  mount points and others.  Almost all functionality of partman is
Index: debian/templates
===================================================================
RCS file: /cvsroot/d-i/debian-installer/partman/partman/debian/templates,v
retrieving revision 1.9
diff -u -r1.9 templates
--- debian/templates	27 Feb 2004 19:58:38 -0000	1.9
+++ debian/templates	29 Feb 2004 00:54:36 -0000
@@ -12,7 +12,21 @@
 Template: partman/choose_partition
 Type: select
 Choices: ${CHOICES}
-_Description: Partition, free space or device to be modified:
+_Description: Partition table overview:
+ This is an overview of your currently configured partitions and mount
+ points. Select a partition or device to modify its settings, or select
+ free space to add a new partition.
+
+Template: partman/confirm
+Type: boolean
+Default: false
+# Translators, note that this is identical to partconf/confirm from the
+# partconf package.
+_Description: Ready to create file systems and mount partitions?
+ File systems will be created and partitions mounted.
+ .
+ WARNING: This will destroy all data on the partitions you have assigned
+ file systems to.
 
 Template: partman/storage_device
 Type: select
@@ -27,7 +41,7 @@
 Template: partman/active_partition
 Type: select
 Choices: ${CHOICES}
-_Description: Settings of the partition:
+_Description: Partition settings:
 
 Template: partman/show_partition_chs
 Type: note
@@ -55,23 +69,15 @@
 
 Template: partman/text/finished_with_partition
 Type: text
-_Description: Choose this if you are satisfied with the above settings
-
-Template: partman/text/abort_the_partitioning
-Type: text
-_Description: Abort the partitioning (do not write the changes)
-
-Template: partman/text/commit_the_partitioning
-Type: text
-_Description: Commit the partitioning to the storage devices
+_Description: Finished setting up partition
 
 Template: partman/text/end_the_partitioning
 Type: text
-_Description: End the partitioning and continue the installation
+_Description: Finish partitioning and write changes to disk
 
 Template: partman/text/undo_everything
 Type: text
-_Description: Undo all actions
+_Description: Undo changes to partitions
 
 Template: partman/text/show_chs_free
 Type: text
@@ -131,4 +137,3 @@
 Type: text
 # Main menu entry
 _Description: Partition disks (partman)
-

Attachment: signature.asc
Description: Digital signature


Reply to: