Correctly sort dependencies suing new pkg tool