Change getPackages method to support multiple entries.

This will make it more efficient as it allows converting multiple entries to packages simultaneously.