pkgdb: make sure packages are listed in alphabetical order