This algorithm works for all packages currently usable on xbps. Previous code didn't take into account the correct order between indirect and direct deps. --HG-- extra : convert_revision : c49a20ce300e6e9dfa565325b40745b5a78b78ed