epm-filelist: allow list of foreign packages
introduce get_package_type and use it
rewrite epm_requires and epm_provides