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

2019-10-27 Thread Allan McRae
On 27/10/19 10:26 pm, la.l...@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

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

2019-10-27 Thread la . luge
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 Date: Sun, 27 Oct 2019 12:08:36 +0100 Subj

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

2019-10-27 Thread la . luge
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

[pacman-dev] [PATCH] makepkg: do not count hard links multiple times when calculating pkg size

2019-10-27 Thread Eli Schwartz
Exclude files with hardlinks when cat'ing all the files, and do a second run to look at each file with hardlinks, keep track of the ones we've already operated on, and only cat each inode once. Then use "wc -c" to get the size of all (deduplicated) files the same way we were already doing. Origina

[pacman-dev] [PATCH v3 0/1] Correct package size calculation in makepkg

2019-10-27 Thread Ronan Pigott
From: Ronan Pigott V3 addresses eschwartz comment that leading trailing whitespace are not handled correctly. With these changes it is no longer necessary to modify INODECMD and other files that use it, so those changes have been removed and another patch can address them if necessary. Filenames

[pacman-dev] [PATCH v3 1/1] makepkg: do not count hard linked file sizes multiple times

2019-10-27 Thread Ronan Pigott
From: Ronan Pigott Signed-off-by: Ronan Pigott --- scripts/Makefile.am | 1 + scripts/libmakepkg/util/dirsize.sh.in | 45 +++ scripts/libmakepkg/util/meson.build | 1 + scripts/makepkg.sh.in | 2 +- 4 files changed, 48 insertions(+)

[pacman-dev] [PATCH] makepkg: protect against unexpected whitespace in filenames

2019-10-27 Thread Eli Schwartz
zipman: read -r protects against those evil manpages whose filenames contain backslash escapes, (muahahaha?) IFS= read protects against filenames with: - leading whitespace (but no one is actually stupid enough to configure their MAN_DIRS=() in makepkg.conf with such silly directories, *right*

Re: [pacman-dev] [PATCH 1/2] makepkg: use null-delimited file lists when tracking inodes

2019-10-27 Thread Ronan Pigott
On Sun Oct 27, 2019 at 2:42 AM Eli Schwartz wrote: > You mention: > > > To make supporting whitespace in filenames easier, I changed INODECMD > > to output only the inode and instead rely on find's -print0 to > > reliably > > parse complete filenames. This fixes some errors for files that begin >