XPost: linux.debian.bugs.dist
From: pascal@plouf.fr.eu.org
On 20/08/2025 at 20:05, Holger Wansing wrote:
> Pascal Hambourg wrote (Wed, 20 Aug 2025 15:30:45
+0200):
>>
>> I do not expect other changes in this area any time soon so my comment
>> is probably coming too late, but IMO a better design would have been to
>> define the message string advertising the supported and default units in
>> partman-base templates, and insert it with db_subst in message strings
>> of other partman-* packages which need to display them.
>
> Since we need to make changes to the templates, we can also make other
> changings on the design as well, if we agree that it's worth it.
This is the point: if there is no future change (add new supported
units, change the default unit or add a new package or dialog which uses
size input), then I am not sure it is worth it.
> If I look at the current situation:
> We have partman-partitioning with its strings mentioning "New partition
> size", and we have partman-lvm with strings like "Logical volume size".
> To form *ONE* message string which can be used for both packages, we would
> need a cover term, which works for both, partitions and logical volumes.
> But I think that would be difficult, or if we find one, it is not easily
> understandable to the user?
This is not what I had i mind. The strings are too different.
> So I guess we need to keep these two sorts of strings separately (with
> improvements on several strings), but having all strings together in one
> package?
> Is this, what you think of?
No. My idea is to split the descriptions in two parts:
- a specific part defined in the package templates
- a common part describing the units defined in partman-base templates
and use debconf substitution feature.
For exemple, partman-base common part could be:
Template: partman-base/size_units
Type: text
# :sl3:
_Description: You can use the following formats: 10KB (Kilobytes), 10KiB
(Kibibytes), 10MB (Megabytes), 10MiB (Mebibytes), 10GB (Gigabytes),
10GiB (Gibibytes), 10TB (Terabytes), 10TiB (Tebibytes), 10PB
(Petabytes), 10PiB (Pebibytes), 10EB (Exabytes), 10EiB (Exbibytes). The
default unit is GB.
partman-lvm specific part could be:
Template: partman-lvm/lvcreate_size
Type: string
# :sl3:
_Description: Logical volume size:
Please enter the size of the new logical volume. ${UNITS_DESC}
partman-lvm script would insert the common description in its specific
description:
db_metaget partman-base/size_units description
db_subst partman-lvm/lvcreate_size UNITS_DESC "$RET"
partman-partitioning specific part could be:
Template: partman-partitioning/new_size
Type: string
Default: some number
# :sl2:
_Description: New partition size:
The minimum size for this partition is ${MINSIZE} (or ${PERCENT}) and
its maximum size is ${MAXSIZE}.
.
Hint: "max" can be used as a shortcut to specify the maximum size, or
enter a percentage (e.g. "20%") to use that percentage of the maximum
size. ${UNITS_DESC}
Template: partman-partitioning/new_partition_size
Type: string
Default: some number
# :sl2:
_Description: New partition size:
The maximum size for this partition is ${MAXSIZE}.
.
Hint: "max" can be used as a shortcut to specify the maximum size, or
enter a percentage (e.g. "20%") to use that percentage of the maximum
size. ${UNITS_DESC}
partman-partitioning scripts would insert the common description in its
specific descriptions:
db_metaget partman-base/size_units description
db_subst partman-partitioning/new_size UNITS_DESC "$RET"
db_subst partman-partitioning/new_partition_size UNITS_DESC "$RET"
> I cannot completely overlook, if there are any drawbacks with this BTW,
> being the reason why it was made the way as it is now.
>
> One point would be, that the preseed files which work for the users for
many
> many years, do no longer work then (regarding partitioning) ...
I do not see any reason why such change would break preseed. It would
only affect the way messages are displayed.
--- SoupGate-Win32 v1.05
* Origin: you cannot sedate... all the things you hate (1:229/2)
|