diff --git a/eclass/savedconfig.eclass b/eclass/savedconfig.eclass index 0271104..4b046a0 100644 --- a/eclass/savedconfig.eclass +++ b/eclass/savedconfig.eclass @@ -43,17 +43,17 @@ save_config() { fi ;; *) - dodir "${PORTAGE_CONFIGROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF} - treecopy $* "${D}/${PORTAGE_CONFIGROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF} \ + dodir /etc/portage/savedconfig/${CATEGORY}/${PF} + treecopy $* "${D}"/etc/portage/savedconfig/${CATEGORY}/${PF} \ || die "Failed to save $1" esac elog "Your configuration for ${CATEGORY}/${PF} has been saved in " - elog "/etc/portage/savedconfig/${CATEGORY}/${PF} for your editing pleasure." + elog "${ROOT}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" elog "its configuration to apply to multiple versions:" - elog '${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/' + elog '${ROOT}/etc/portage/savedconfig/' elog '[${CTARGET}|${CHOST}|""]/${CATEGORY}/[${PF}|${P}|${PN}]' } @@ -66,15 +66,15 @@ save_config() { # # Config files can be laid out as: # @CODE -# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CTARGET}/${CATEGORY}/${PF} -# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CHOST}/${CATEGORY}/${PF} -# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PF} -# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CTARGET}/${CATEGORY}/${P} -# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CHOST}/${CATEGORY}/${P} -# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${P} -# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CTARGET}/${CATEGORY}/${PN} -# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CHOST}/${CATEGORY}/${PN} -# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN} +# ${ROOT}/etc/portage/savedconfig/${CTARGET}/${CATEGORY}/${PF} +# ${ROOT}/etc/portage/savedconfig/${CHOST}/${CATEGORY}/${PF} +# ${ROOT}/etc/portage/savedconfig/${CATEGORY}/${PF} +# ${ROOT}/etc/portage/savedconfig/${CTARGET}/${CATEGORY}/${P} +# ${ROOT}/etc/portage/savedconfig/${CHOST}/${CATEGORY}/${P} +# ${ROOT}/etc/portage/savedconfig/${CATEGORY}/${P} +# ${ROOT}/etc/portage/savedconfig/${CTARGET}/${CATEGORY}/${PN} +# ${ROOT}/etc/portage/savedconfig/${CHOST}/${CATEGORY}/${PN} +# ${ROOT}/etc/portage/savedconfig/${CATEGORY}/${PN} # @CODE restore_config() { use savedconfig || return @@ -84,7 +84,7 @@ restore_config() { *) die "Bad package! restore_config only for use in src_{unpack,compile,configure,prepare} functions!" ;; esac local found check configfile - local base=${PORTAGE_CONFIGROOT}/etc/portage/savedconfig + local base=${ROOT}etc/portage/savedconfig for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do configfile=${base}/${CTARGET}/${check} [[ -r ${configfile} ]] || configfile=${base}/${CHOST}/${check} @@ -116,7 +116,7 @@ restore_config() { die "Reading config files failed" fi ewarn "No saved config to restore - please remove USE=savedconfig or" - ewarn "provide a configuration file in ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}" + ewarn "provide a configuration file in ${ROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}" ewarn "Your config file(s) will not be used this time" fi }