Bug#408641: Please default to the one-and-only disk; already displayed for confirmation in the next question

February 05th, 2011 - 06:10 pm ET by Josh Triplett | Report spam
Package: partman-auto
Severity: normal

tags 408641 - wontfix
thanks

If the user has only one disk, and chooses to do guided partitioning,
then they have to choose which of their one disk they want to partition.
The very next question (for the partitioning scheme) then confirms this
by saying "Selected for partitioning:" followed by the exact name asked
for in the previous question. The following question then confirms the
generated partitioning scheme (and displays the exact disk name again),
and the question after that confirms one more time that the user wants
to write the changes to the disk. Thus, I think it seems entirely safe
to default to the one-and-only disk if no other disk exists, given that
the user will still get multiple chances to review and confirm their
choice.

- Josh Triplett

Debian Release: 6.0
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.37-trunk-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Replies

#1 Joey Hess
February 06th, 2011 - 01:10 pm ET | Report spam



Josh Triplett wrote:
If the user has only one disk, and chooses to do guided partitioning,
then they have to choose which of their one disk they want to partition.
The very next question (for the partitioning scheme) then confirms this
by saying "Selected for partitioning:" followed by the exact name asked
for in the previous question. The following question then confirms the
generated partitioning scheme (and displays the exact disk name again),
and the question after that confirms one more time that the user wants
to write the changes to the disk. Thus, I think it seems entirely safe
to default to the one-and-only disk if no other disk exists, given that
the user will still get multiple chances to review and confirm their
choice.



FWIW, I tend to agree with this reasoning. It think it's likely that the
current situation is a historical accident. It may be a vestigial organ
from the time when partman did not include RAID and LVM setup, or from
before udev and /sys were used to determine human readable device names.

Patch attached (untested) & committed to people/joey branch.

see shy jo


commit 28874286bb690e8a3d48954c60031623acbbfb8a
Author: Joey Hess
Date: Sun Feb 6 14:04:10 2011 -0400

bypass select_disk prompt when there is only one disk

diff --git a/lib/auto-shared.sh b/lib/auto-shared.sh
index 3d9e66a..b3fc054 100644
a/lib/auto-shared.sh
+++ b/lib/auto-shared.sh
@@ -236,6 +236,12 @@ select_auto_disk() {

DEVS=$(get_auto_disks)
[ -n "$DEVS" ] || return 1
+ if ! echo "$DEVS" | grep -q '[[:space:]]'; then
+ # only one choice
+ db_set partman-auto/select_disk "$DEVS"
+ echo "$DEVS"
+ return 0
+ fi
debconf_select critical partman-auto/select_disk "$DEVS" "" || return 1
echo "$RET"
return 0







To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact

Similar topics