[pacman-dev] [PATCH] makepkg: use builtin globbing to print files in package
eschwartz at archlinux.org
Tue Aug 21 16:31:36 UTC 2018
On 8/21/18 11:53 AM, Andrew Gregory wrote:
> On 08/21/18 at 10:15am, Eli Schwartz wrote:
>> - dotfiles can be automatically printed *and the C locale sorts them first*
>> with a single ** glob
> The glob will sort dotfiles before alphanumeric names, but there are several
> characters that will still sort before a period.
Eh. In the wise words of dreisner (when I asked if I should amend it to
yes technically if someone were to create a root directory starting with
! " # $ & % ' ( ) * + , - it would sort before the dotfiles
the day someone does that, i'll perfect my implementation of stabbing
people over standard tcp/ip connections.
I rather agree, since none of those filenames are remotely sane, at
least not as direct children of / -- which is why this matters, since
our sorting goal is IIRC just to ensure our metadata dotfiles are the
most efficient files to extract. If that fails... oh well, some crazy
person's package will have somewhat less efficiently extracted metadata.
Although, this could be fixed I guess with:
printf '%s\0' .!(|.); printf '%s\0' !(.*) */** | sort -uz
Bug Wrangler and Trusted User
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 833 bytes
Desc: OpenPGP digital signature
More information about the pacman-dev