--- a/eclass/savedconfig.eclass 2012-01-04 09:23:51.000000000 +0100 +++ b/eclass/savedconfig.eclass 2013-01-24 15:57:22.108896199 +0100 @@ -34,20 +34,21 @@ # Be lazy in our EAPI compat : ${ED:=${D}} - local dest="/etc/portage/savedconfig/${CATEGORY}" + local dest="${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}" + addwrite ${dest} if [[ $# -eq 1 && -f $1 ]] ; then # Just one file, so have the ${PF} be that config file - dodir "${dest}" - cp "$@" "${ED}/${dest}/${PF}" || die "failed to save $*" + mkdir -p "${dest}" + cp "$@" "${dest}/${PF}" || die "failed to save $*" else # A dir, or multiple files, so have the ${PF} be a dir # with all the saved stuff below it - dodir "${dest}/${PF}" - treecopy "$@" "${ED}/${dest}/${PF}" || die "failed to save $*" + mkdir -p "${dest}/${PF}" + treecopy "$@" "${dest}/${PF}" || die "failed to save $*" fi elog "Your configuration for ${CATEGORY}/${PF} has been saved in " - elog "/etc/portage/savedconfig/${CATEGORY}/${PF} for your editing pleasure." + elog "${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PF} for your editing pleasure." elog "You can edit these files by hand and remerge this package with" elog "USE=savedconfig to customise the configuration." elog "You can rename this file/directory to one of the following for"