[pacman-dev] [PATCH] makepkg: use builtin globbing to print files in package

Luke Shumaker lukeshu at lukeshu.com
Tue Aug 21 15:41:18 UTC 2018


On Tue, 21 Aug 2018 10:15:12 -0400,
Eli Schwartz wrote:
> diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
> index ae1ef01b..1325b019 100644
> --- a/scripts/makepkg.sh.in
> +++ b/scripts/makepkg.sh.in
> @@ -711,10 +711,14 @@ write_buildinfo() {
>  # database files are placed at the beginning of the package regardless of
>  # sorting
>  list_package_files() {
> -	(find . -path './.*' \! -name '.'; find . \! -path './.*' \! -name '.' | LC_ALL=C sort) |
> -	sed -e 's|^\./||' | tr '\n' '\0'
> +	(
> +		export LC_COLLATE=C
> +		shopt -s dotglob globstar
> +		printf '%s\0' **
> +	)

Since globbing is done in the same process, it should be sufficient to
set LC_COLLATE; no need to export it.

-- 
Happy hacking,
~ Luke Shumaker


More information about the pacman-dev mailing list