[pacman-dev] pacman sorting incompatible with 'sort' command

Andrew Gregory andrew.gregory.8 at gmail.com
Fri May 5 12:49:29 UTC 2017


On 05/05/17 at 09:19am, Adesh Kumar wrote:
> pacman internal sorting on package names differ from the one implemented in linux 'sort' command.
> 
> pacman treats '-' (hyphen) differently.
> 
> 
> Testcase:
> 
> 1. Install i3 group. It will install i3-wm, i3lock and i3status
> 
> 2. Check the following commands:
> 
>   --($:~)-- pacman -Qeq | grep i3
>   i3-wm
>   i3lock
>   i3status
> 
> 
>   --($:~)-- pacman -Qeq | grep i3 | sort
>   i3lock
>   i3status
>   i3-wm
> 
>   --($:~)-- pacman -Qeq | grep i3 | sort -c
>   sort: -:2: disorder: i3lock

pacman sorts according to the C locale.  Why does this matter though?
I don't believe we make any promises about query output order at all,
let alone that it will match `sort`.

apg


More information about the pacman-dev mailing list