Created attachment 100474 [details] Alphabetical sort of --list-all output For the same reason as Bug #79666 (but not caught by a test-case), the order of packages displayed the --list-all mode is non-deterministic. The attached patch makes it alphabetical.
As in bug79666, wouldn't it be more deterministic to use strcmp?
Commit 715cc306b0e4add06523b8fcce49867da469a728 demonstrates the oddity of unsorted output. Given ghash's hashing method and how few items there are, it doesn't fail. But the success technically does appear to require that the hash-order is deterministic. And the expected results--packages ordered as: sub1 sub2 broken from --list-all demonstrates that how it is unfriendly to humans trying to read the list to find packages in it by eye.
Created attachment 136212 [details] [review] Alphabetical sort of --list-all output Updated to patch against 0.29.2 and with g_strcmp0 as in 818aeace3b08d731d104d5ef9b1d5e3c34dd4192 (the committed seeming resolution of Bug #79666). Updated test-case, and with more uniform coding style.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pkg-config/pkg-config/issues/21.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.