#!/usr/bin/env bash # Simple workaround for paludis to make it work with # funtoo portage tree with modular package.mask # Should reside in /usr/share/paludis/hooks/auto/ hook_auto_names() { echo sync_all_pre sync_all_post } hook_run_sync_all_pre() { source ${PALUDIS_ECHO_FUNCTIONS_DIR:-${PALUDIS_EBUILD_DIR}}/echo_functions.bash einfo "Restoring modular package.mask..." cd "${ROOT}"/usr/portage/profiles/ git checkout . } hook_run_sync_all_post() { source ${PALUDIS_ECHO_FUNCTIONS_DIR:-${PALUDIS_EBUILD_DIR}}/echo_functions.bash profiles_dir="${ROOT}"/usr/portage/profiles/ einfo "Merging together modular package.mask files..." cd "${ROOT}"/usr/portage/profiles/ cat package.mask/* > package.mask.funtoo einfo "Switching to PMS-compliant package.mask..." rm -rf package.mask/ mv package.mask.funtoo package.mask }