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

Bug#913431: Debian Installer Bullseye RC 2 release



  Hi,

Le 23/03/2023 à 10:06, Emanuele Rocca a écrit :
Hi Vincent,

On 2021-06-20 10:54, Vincent Danjean wrote:
Would someone give a feedback to the (old) patch proposed
in #913431 in order to be able to also use power-of-two units
in the Debian Installer?

It took a while, sorry about that. :)

There is (now) a function in partman-base called valid_human [1] which
checks if the partition size specified by the user is valid. Probably
when you first wrote the patch this wasn't the case.

That function needs to be modified as well to accept GiB and friends.

  This would be very easy (just add a 'i?' when it can be added).
Before rewriting the patch, I would like to be sure there is no
big flaw. In particular, to handle power-of-two units, I'm using
the 'expr' command, as bash arithmetic uses only limited integers
whereas expr uses gmp:
$ echo $((40 * 1000000000 * 1000000000 * 1000 + 1))
7458848197692096513
$ expr 40 '*' 1000000000 '*' 1000000000 '*' 1000 + 1
40000000000000000000001

Can you confirm me that using 'expr' in the installer context is ok?

  Regards
    Vincent

[1] https://salsa.debian.org/installer-team/partman-base/-/blob/master/lib/base.sh#L373


Reply to: