[pacman-dev] [MAKEPKG][PATCH] makepkg-do-not-count-hard-links-multiple-times

Allan McRae allan at archlinux.org
Sun Oct 27 12:33:52 UTC 2019


On 27/10/19 10:26 pm, la.luge at free.fr wrote:
> Uses stat -c '%i %s' and sort -u to count hardlink one time.
> Gives same result than cat | wc -c without harlinks and good result with hardlinks.
> Doesn't use filenames
> 
> 
>>From cf4ef0333ccc6f080882ee9f3c27049be41bce67 Mon Sep 17 00:00:00 2001
> From: nenesse <la.luge at free.fr>
> Date: Sun, 27 Oct 2019 12:08:36 +0100
> Subject: [PATCH] makepkg-do-not-count-hard-links-multiple-times. uses stat -c
>  '%i %s' and sort -u to count hardlink one time. Gives same result than cat |
>  wc -c without harlinks and good result with hardlinks. Doesn't use filenames
> To: mailto:pacman-dev at archlinux.org
> 
> ---
>  configure.ac                          |  6 ++---
>  scripts/libmakepkg/util/dirsize.sh.in | 35 +++++++++++++++++++++++++++
>  scripts/makepkg.sh.in                 |  2 +-
>  3 files changed, 39 insertions(+), 4 deletions(-)
>  create mode 100644 scripts/libmakepkg/util/dirsize.sh.in
> 
> diff --git a/configure.ac b/configure.ac
> index d68b3591..5d8f8747 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -370,18 +370,18 @@ GCC_VISIBILITY_CC
>  
>  # Host-dependant definitions
>  DEFAULT_SEDINPLACEFLAGS=" --follow-symlinks -i"
> -INODECMD="stat -c '%i %n'"
> +INODECMD="stat -c '%i %s'"

So...  I'm assuming you did not look at where else INODECMD is used in
the code base?


More information about the pacman-dev mailing list