Patrick,
if i see correctly, this is not a problem of the "current implementation", but the interface was designed that way. The documentation speaks clearly about a singular package_id, and there are at least 8 places in the sources of the packages in the oacs-5-8 tree, where a variable package_id (singular) is assigned and where the code assumes at most one value.
So, this change is not a simple fix (i.e. for the oacs-5-8 branch), but a function extension, that should be probably tipped, and should go into head. Most probably the best way for such a feature integration is to
- create a new function returning potentially a list of package_ids,
- mark the existing function as deprecated
- use the plural version in the packages where the old one was used so far and add some sane semantics for multiple results.