packages_installed: use run environments and provide a test mode