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

Bug#911036: Acknowledgement (partman-lvm: Volume group name "■" has invalid characters, and cannot removed)



Control: reopen -1

Hi Hideki,

I'm afraid your fix in choose_partition/lvm/do_option is broken. It's
causing problems for other people trying to use LVM in d-i. See
#922100, which I've just confirmed locally.

Code:

--- a/choose_partition/lvm/do_option
+++ b/choose_partition/lvm/do_option
@@ -471,7 +471,9 @@ do_lv_delete() {
                db_subst partman-lvm/text/lvdelete_invg VG "$vg"
                db_metaget partman-lvm/text/lvdelete_invg description
                lv_get_info "$vg" "$lv"
-               output=$(printf "%-30s (%sMB - %s)" "$lv" "$SIZE" "$RET")
+               # In non-latin locale environment, $RET contains extra characters
+               # clean it as valid ascii characters name
+               output=$(printf "%-30s (%sMB - %s)" "$lv" "$SIZE" "$(echo $RET | sed -e 's/^VG//' -e 's/[^-+_\.[:alnum:]]//g')")
                lvs="${lvs:+$lvs, }$output"
        done

In my test VM, I've added debug to see what $RET is before the sed
acts on it. I'm seeing that $RET is "in VG debian-vg", and after your
sed code it's "inVGdebian-vg". Maybe it should look something more
like:

  "$(echo $RET | sed -e 's/^.*VG//' -e 's/[^-+_\.[:alnum:]]//g')"

?? Please test this some more and see if you can fix it?

On Tue, Oct 16, 2018 at 12:38:30PM +0900, Hideki Yamane wrote:
>Hi,
>
> Here's a step to reproduce this bug
>-----------------------------------------------------------------------
>1. boot from d-i media and start installer
>2. create encrypted LVM volume
>3. select "go back" and "Change language" to "Japanese" 
>   (or other multi-byte locale)
>4. select "論理ボリュームマネージャーの設定 (Configure the Logical Volume Manager)"
>    -> "論理ボリュームの削除 (Delete logical volue)" and any volume
>5. Got error
>6. select "戻る (go back) and "言語の選択/Change language" to "English"
>7. select "Configure the Logical Volume Manager"
>   -> "Delete logical volume" and any volume
>8. you can delete it without error!
>
>
>-- 
>Hideki Yamane <henrich@iijmio-mail.jp>
>
>
-- 
Steve McIntyre, Cambridge, UK.                                steve@einval.com
"Arguing that you don't care about the right to privacy because you have
 nothing to hide is no different than saying you don't care about free
 speech because you have nothing to say."
   -- Edward Snowden


Reply to: