[pacman-dev,0/2] Correct package size calculation in makepkg

Message ID 20191027031134.479556-1-rpigott@berkeley.edu
Headers show


Ronan Pigott Oct. 27, 2019, 3:11 a.m. UTC
From: Ronan Pigott <rpigott@berkeley.edu>

This patchset is a fix for FS#64252 and is mostly the result of some
discussion there. The goal is to fix the double counting of hard linked
files and also to correct some errors counting the size of certain file
names that coincide with valid cat flag options.

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
or end in whitespace. It was noted in discussion that -print0 is not
POSIX, but it seems portable regardless. Note it is possible to get a
null-delimited list of file names in pure bash using a combination of
bash's printf and globbing, if it is necessary.

Ronan Pigott (2):
  makepkg: use null-delimited file lists when tracking inodes
  makepkg: do not count hard linked file sizes multiple times

 configure.ac                         |  6 +++---
 meson.build                          |  6 +++---
 scripts/libmakepkg/tidy/zipman.sh.in |  9 +++++----
 scripts/makepkg.sh.in                | 10 +++++++++-
 4 files changed, 20 insertions(+), 11 deletions(-)