Guillem Jover <guil...@debian.org> writes:

> How about the attached patch, based on the text in deb-substvars(5)?

This looks great, thank you.  Seconded.

> From 024d94daeb0ab0e7c447868a1b8f9ff953850404 Mon Sep 17 00:00:00 2001
> From: Guillem Jover <guil...@debian.org>
> Date: Tue, 12 Sep 2023 22:47:27 +0200
> Subject: [PATCH] Update Installed-Size algorithm used by dpkg since 1.18.0

> The previous algorithm relied entirely on du(1) computing the used
> size, but depended on the filesystem in use on the build system.

> The new algorithm used by dpkg since 1.18.0 (implemented in
> commit 9ed7d4d47b73ffe67e1f7d31f899a1dfd43d490b), guarantees a
> constant and reproducible size regardless of the build system
> filesystem being used. Although it is still an approximation of
> the actual size that the package will use on the installed system.

> Closes: #793499
> ---
>  policy/ch-controlfields.rst | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

> diff --git a/policy/ch-controlfields.rst b/policy/ch-controlfields.rst
> index 45776ea..2871658 100644
> --- a/policy/ch-controlfields.rst
> +++ b/policy/ch-controlfields.rst
> @@ -939,8 +939,9 @@ space required to install the named package. Actual 
> installed size may
>  vary based on block size, file system properties, or actions taken by
>  package maintainer scripts.
>  
> -The disk space is given as the integer value of the estimated installed
> -size in bytes, divided by 1024 and rounded up.
> +The disk space is given as the accumulated size of each regular file and
> +symlink rounded to 1 KiB used units, and a baseline of 1 KiB for any other
> +filesystem object type.
>  
>  .. _s-f-Files:

-- 
Russ Allbery (r...@debian.org)              <https://www.eyrie.org/~eagle/>

Reply via email to