Closed issue by gt7-void on void-packages repository https://github.com/void-linux/void-packages/issues/29965 Description: The way new entries are added to `common/shlibs` (generally at the end) often results in merge conflicts (e.g. all PR for new packages that are open at a given time are incompatible since they all append at the same position). It occurs to me that a way to minimize those conflicts would be to have `common/shlibs` be sorted by soname. In this way it becomes very unlikely that two commits conflict (they will only if they are lexicographically next to each other). In addition, this would help to be explicit about repeated sonames and remove unnecessary duplicates. This may be a little bit painful at the time the list is sorted, but then it's just a matter to keep it sorted (maybe some hook can check and complain about unsorted entries?). The same applies to `common/options.description`, although that file is not updated so often, OTOH it's almost sorted (only 6 entries out of order). A possible sort order would be to use: ``` $ sort common/shlibs -sk1,1 ``` and ``` $ sort common/options.description -sk1,1 -t= ``` To see the kinds of soname repetitions: ``` $ sort common/shlibs -sk1,1 | awk '$1=="#" { next } $1==k&&first{print first; first="";d++} $1==k{print;x++} $1!=k{k=$1;first=$0;t++} END{print t, d, x}' ... 3866 61 92 ``` I.e. out of 3866 different sonames, there are 61 repeated (61+92 times in total).