Sort packages.