--- Begin Message ---
Package: partman-auto
Version: 54
Severity: normal
Tags: patch
Currently partman repeats the menu choices once for each disk. With the
addition of more methods (partman-auto-crypto, partman-auto-raid) this
becomes unmanageable.
I've attached the first stab at reorganising the partman-auto menu into
a two level menu per the discussions on debian-boot.
The first patch shows the changes that I've done to partman-auto and the
second patch shows what changes would be necessary to partman-auto-lvm
(similar changes would be needed for partman-auto-crypto and
partman-auto-raid should it get UI support).
Regards,
David
Index: debian/partman-auto.templates
===================================================================
--- debian/partman-auto.templates (revision 40144)
+++ debian/partman-auto.templates (working copy)
@@ -27,6 +27,11 @@
use the guided partitioning tool, you will still have a chance later to
review and customise the results.
+Template: partman-auto/method
+Type: string
+# Only used for preseeding.
+Description: autopartitioning method to use
+
Template: partman-auto/disk
Type: string
# Only used for preseeding.
@@ -35,7 +40,7 @@
Template: partman-auto/automatically_partition
Type: select
Choices: ${CHOICES}
-_Description: Disk space to partition:
+_Description: Select the partitioning method to use:
Template: partman-auto/choose_recipe
Type: select
@@ -69,20 +74,27 @@
Template: partman-auto/text/use_biggest_free
Type: text
# TRANSLATORS: This is a menu entry. Keep in under 55 columns/characters
-_Description: Use the largest continuous free space
+_Description: Automatically partition the largest continuous free space
-Template: partman-auto/text/use_device
+Template: partman-auto/text/use_some_device
Type: text
# TRANSLATORS: This is a menu entry. Keep in under 55 columns/characters
-# The string replacing ${DEVICE} may be very long, so make your translation
-# as short as possible and keep the variable AT THE END
-# for example "Erase entire disk: IDE0 master - Maxtor 46L489"
-_Description: Erase entire disk: ${DEVICE}
+_Description: Automatically partition a disk
+Template: partman-auto/use_device
+Type: select
+Choices: ${CHOICES}
+_Description: Select the disk to automatically partition
+
+Template: partman-auto/use_devices
+Type: multiselect
+Choices: ${CHOICES}
+_Description: Select the disk(s) to automatically partition
+
Template: partman-auto/text/custom_partitioning
Type: text
# TRANSLATORS: This is a menu entry. Keep in under 55 columns/characters
-_Description: Manually edit partition table
+_Description: Manually edit partition tables
Template: partman-auto/text/auto_free_space
Type: text
Index: init.d/initial_auto
===================================================================
--- init.d/initial_auto (revision 40144)
+++ init.d/initial_auto (working copy)
@@ -33,28 +33,68 @@
[ -d /var/lib/partman ] || mkdir /var/lib/partman
touch /var/lib/partman/initial_auto
-# See if any disks to autopartition (either classic or LVM) have been set
+# See if any autopartition method has been set
+method=""
+if db_get_partman-auto/method && [ -n "$RET" ]; then
+ method="$RET"
+fi
+
+# See if any autopartition disks have been set
+disks=""
if db_get partman-auto/disk && [ -n "$RET" ]; then
disks="$RET"
- for disk in $disks
- do
- id=$(dev_to_partman "$disk") || true
- if [ -n "$id" ]; then
- autopartition "$id"
- fi
- done
- exit 0
-elif search-path autopartition-lvm && \
- db_get partman-auto-lvm/disk && [ -n "$RET" ]; then
- disk="$RET"
- id=$(dev_to_partman "$disk") || true
- if [ -n "$id" ]; then
- autopartition-lvm "$id"
- exit 0
- fi
fi
+# If both are set, let's try to do a completely automatic partitioning
+if [ -n "$method" -a -n "$disks" ]; then
+ # The code for the methods could be merged, but in the future non-regular
+ # methods may support multiple disks
+ case "$method" in
+ regular)
+ for disk in $disks; do
+ id=$(dev_to_partman "$disk") || true
+ if [ -n "$id" ]; then
+ autopartition "$id"
+ exit 0
+ fi
+ done
+ exit 1
+ ;;
+ lvm)
+ search-path autopartition-lvm || exit 1
+ for disk in $disks; do
+ id=$(dev_to_partman "$disk") || true
+ if [ -n "$id" ]; then
+ autopartition-lvm "$id"
+ exit 0
+ fi
+ done
+ exit 1
+ ;;
+ crypto)
+ search-path autopartition-crypto || exit 1
+ for disk in $disks; do
+ id=$(dev_to_partman "$disk") || true
+ if [ -n "$id" ]; then
+ autopartition-crypto "$id"
+ exit 0
+ fi
+ done
+ exit 1
+ ;;
+ *)
+ # Unsupported method
+ exit 1
+ ;;
+ esac
+fi
+
+# Lets do a manual selection of autopartitioning methods instead
echo "partman-auto/init_automatically_partition" > /lib/partman/automatically_partition/question
-ask_user /lib/partman/automatically_partition
-code=$?
+code=255 # 255 signals a retry
+while [ $code = 255 ]; do
+ ask_user /lib/partman/automatically_partition
+ code=$?
+done
+
echo "partman-auto/automatically_partition" > /lib/partman/automatically_partition/question
Index: auto-shared.sh
===================================================================
--- auto-shared.sh (revision 40144)
+++ auto-shared.sh (working copy)
@@ -181,3 +181,34 @@
setup_partition $id $*
free_space=$(partition_after $id)'
}
+
+get_auto_disks() {
+ DEVS=""
+
+ for dev in $DEVICES/*; do
+ [ -d "$dev" ] || continue
+
+ ldev=$(device_name $dev)
+ ldev=$(printf "$dev\t$ldev")
+ DEVS="$DEVS
+$ldev"
+ done
+
+ if [ -z "$DEVS" ]; then
+ return 1
+ fi
+ return 0
+}
+
+select_auto_disk() {
+ get_auto_disks || return 1
+ debconf_select critical partman-auto/use_device "$DEVS" "" || return 1
+ return 0
+}
+
+select_auto_disks() {
+ get_auto_disks || return 1
+ debconf_select critical partman-auto/use_devices "$DEVS" "" || return 1
+ return 0
+}
+
Index: automatically_partition/some_device/do_option
===================================================================
--- automatically_partition/some_device/do_option (revision 40144)
+++ automatically_partition/some_device/do_option (working copy)
@@ -1,5 +1,8 @@
#!/bin/sh
-dev=$1
+. /lib/partman/definitions.sh
+. /lib/partman/auto-shared.sh
-autopartition $dev
+select_auto_disk || exit 255
+
+autopartition $RET
Index: automatically_partition/some_device/choices
===================================================================
--- automatically_partition/some_device/choices (revision 40144)
+++ automatically_partition/some_device/choices (working copy)
@@ -2,14 +2,5 @@
. /lib/partman/definitions.sh
-mypart=''
-mysize=0
-
-for dev in $DEVICES/*; do
- [ -d "$dev" ] || continue
- db_subst partman-auto/text/use_device DEVICE $(device_name $dev)
- db_metaget partman-auto/text/use_device description
- printf "$dev\t$RET\n"
-done
-
-
+db_metaget partman-auto/text/use_some_device description
+printf "some_device\t$RET\n"
Index: automatically_partition/_numbers
===================================================================
--- automatically_partition/_numbers (revision 40144)
+++ automatically_partition/_numbers (working copy)
@@ -1,3 +1,3 @@
+10 custom
20 biggest_free
50 some_device
-80 custom
Index: choose_partition/auto/do_option
===================================================================
--- choose_partition/auto/do_option (revision 40144)
+++ choose_partition/auto/do_option (working copy)
@@ -2,5 +2,8 @@
. /lib/partman/definitions.sh
-ask_user /lib/partman/automatically_partition || true
-
+code=255
+while [ $code = 255 ]; do
+ ask_user /lib/partman/automatically_partition
+done
+exit $code
Index: automatically_partition/some_device_lvm/do_option
===================================================================
--- automatically_partition/some_device_lvm/do_option (revision 40144)
+++ automatically_partition/some_device_lvm/do_option (working copy)
@@ -1,5 +1,8 @@
#!/bin/sh
-dev=$1
+. /lib/partman/definitions.sh
+. /lib/partman/auto-shared.sh
-autopartition-lvm $dev
+select_auto_disk || exit 255
+
+autopartition-lvm $RET
Index: automatically_partition/some_device_lvm/choices
===================================================================
--- automatically_partition/some_device_lvm/choices (revision 40144)
+++ automatically_partition/some_device_lvm/choices (working copy)
@@ -9,12 +9,5 @@
exit 0
fi
-mypart=''
-mysize=0
-
-for dev in $DEVICES/*; do
- [ -d "$dev" ] || continue
- db_subst partman-auto-lvm/text/use_device DEVICE $(device_name $dev)
- db_metaget partman-auto-lvm/text/use_device description
- printf "$dev\t$RET\n"
-done
+db_metaget partman-auto-lvm/text/use_some_device_lvm description
+printf "some_device_lvm\t$RET\n"
Index: debian/partman-auto-lvm.templates
===================================================================
--- debian/partman-auto-lvm.templates (revision 40144)
+++ debian/partman-auto-lvm.templates (working copy)
@@ -1,10 +1,7 @@
-Template: partman-auto-lvm/text/use_device
+Template: partman-auto-lvm/text/use_some_device_lvm
Type: text
# TRANSLATORS: This is a menu entry. Keep in under 55 columns/characters
-# The string replacing ${DEVICE} may be very long, so make your translation
-# as short as possible and keep the variable AT THE END
-# for example "Erase entire disk and use LVM: IDE0 master - Maxtor 46L489"
-_Description: Erase entire disk and use LVM: ${DEVICE}
+_Description: Automatically partition a disk using LVM
Template: partman-auto-lvm/new_vg_name
Type: string
@@ -17,11 +14,6 @@
The selected volume group name is already in use. Please choose
another name.
-Template: partman-auto-lvm/disk
-Type: string
-# Only used for preseeding.
-Description: device to partition, in either devfs or non format
-
Template: partman-auto-lvm/unusable_recipe
Type: error
_Description: Failed to partition the selected disk
--- End Message ---
--- Begin Message ---
Source: partman-auto
Source-Version: 55
We believe that the bug you reported is fixed in the latest version of
partman-auto, which is due to be installed in the Debian FTP archive:
partman-auto_55.dsc
to pool/main/p/partman-auto/partman-auto_55.dsc
partman-auto_55.tar.gz
to pool/main/p/partman-auto/partman-auto_55.tar.gz
partman-auto_55_i386.udeb
to pool/main/p/partman-auto/partman-auto_55_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 384527@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 partman-auto 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: Thu, 31 Aug 2006 17:21:00 -0400
Source: partman-auto
Binary: partman-auto
Architecture: source i386
Version: 55
Distribution: unstable
Urgency: low
Maintainer: Debian Install System Team <debian-boot@lists.debian.org>
Changed-By: Joey Hess <joeyh@debian.org>
Description:
partman-auto - Automatically partition storage devices (partman) (udeb)
Closes: 255024 375257 375491 381693 382315 384527
Changes:
partman-auto (55) unstable; urgency=low
.
[ Simon Huggins ]
* Add support for autopartitioning multiple disks.
* Move initial_auto to priority 96 for partman-auto-raid to squeeze in
afterwards.
.
[ Martin Michlmayr ]
* Create recipes for arm/iop32x (separate /boot partition, as needed by
the GLAN Tank).
.
[ David Härdeman ]
* Mark swap partitions as lvmok in recipies which support lvm per
discussion in debian-boot (http://lists.debian.org/debian-
boot/2006/08/msg00862.html)
* Add a function to remove LVM configs from a disk which is about to
be wiped. Closes: #375491, #381693, #382315.
* Do not suggest part'ing RAID/LVM volumes. Closes: #255024, #375257
* Implement two-level menu split. Closes: #384527
.
[ Updated translations ]
* Catalan (ca.po) by Jordi Mallach
* Czech (cs.po) by Miroslav Kure
* Danish (da.po) by Claus Hindsgaul
* German (de.po) by Jens Seidel
* Greek, Modern (1453-) (el.po) by quad-nrg.net
* Esperanto (eo.po) by Serge Leblanc
* Spanish (es.po) by Javier Fernández-Sanguino Peña
* Estonian (et.po) by Siim Põder
* Basque (eu.po) by Piarres Beobide
* Finnish (fi.po) by Tapio Lehtonen
* French (fr.po) by Christian Perrier
* Galician (gl.po) by Jacobo Tarrio
* Gujarati (gu.po) by Kartik Mistry
* Hebrew (he.po) by Lior Kaplan
* Hungarian (hu.po) by SZERVÃ?C Attila
* Indonesian (id.po) by Arief S Fitrianto
* Icelandic (is.po) by David Steinn Geirsson
* Italian (it.po) by Giuseppe Sacco
* Japanese (ja.po) by Kenshi Muto
* Khmer (km.po) by Khoem Sokhem
* Korean (ko.po) by Sunjae park
* Lithuanian (lt.po) by KÄ?stutis BiliÅ«nas
* Macedonian (mk.po) by Georgi Stanojevski
* Norwegian Bokmål (nb.po) by Bjørn Steensrud
* Dutch (nl.po) by Bart Cornelis
* Panjabi (pa.po) by A S Alam
* Polish (pl.po) by Bartosz Fenski
* Portuguese (pt.po) by Miguel Figueiredo
* Portuguese (Brazil) (pt_BR.po) by André LuÃs Lopes
* Romanian (ro.po) by Eddy PetriÅ?or
* Russian (ru.po) by Yuri Kozlov
* Northern Sami (se.po) by Børre Gaup
* Slovak (sk.po) by Peter Mann
* Swedish (sv.po) by Daniel Nylander
* Thai (th.po) by Theppitak Karoonboonyanan
* Tagalog (tl.po) by Eric Pareja
* Turkish (tr.po) by Recai OktaÅ?
* Ukrainian (uk.po) by Eugeniy Meshcheryakov
* Vietnamese (vi.po) by Clytie Siddall
* Wolof (wo.po) by Mouhamadou Mamoune Mbacke
* Simplified Chinese (zh_CN.po) by Carlos Z.F. Liu
* Traditional Chinese (zh_TW.po) by Tetralet
Files:
c731fba2790784b54d928dae3c637289 627 debian-installer standard partman-auto_55.dsc
8a13c562ea3562124dfbef5fc4eb8004 88122 debian-installer standard partman-auto_55.tar.gz
fc30a5425b73606b4a263627b8817477 51366 debian-installer standard partman-auto_55_i386.udeb
Package-Type: udeb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (GNU/Linux)
iD8DBQFE91Rc2tp5zXiKP0wRAvqAAKDP4Y4sYmPkqIHeEY73ifkH9/5YmwCfSvOk
V5Efi+bFPcfFPgRwVLKBAjk=
=bjNY
-----END PGP SIGNATURE-----
--- End Message ---