daca2: tried to improve getpackages to be more robust