Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 442224 - savedconfig.eclass: only show elog messages on first install
Summary: savedconfig.eclass: only show elog messages on first install
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-07 17:51 UTC by Jeroen Roovers (RETIRED)
Modified: 2013-12-03 19:36 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2012-11-07 17:51:27 UTC
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.20
diff -u -B -r1.20 savedconfig.eclass
--- savedconfig.eclass  4 Jan 2012 08:23:51 -0000       1.20
+++ savedconfig.eclass  7 Nov 2012 17:50:41 -0000
@@ -46,14 +46,16 @@
                treecopy "$@" "${ED}/${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 "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 '[${CTARGET}|${CHOST}|""]/${CATEGORY}/[${PF}|${P}|${PN}]'
+       if ! [[ "${REPLACING_VERSIONS}" ]]; then
+               elog "Your configuration for ${CATEGORY}/${PF} has been saved in "
+               elog "/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 '[${CTARGET}|${CHOST}|""]/${CATEGORY}/[${PF}|${P}|${PN}]'
+       fi
 }
 
 # @FUNCTION: restore_config
Comment 1 Markos Chandras (RETIRED) gentoo-dev 2013-09-14 10:27:39 UTC
IIRC REPLACING_VERSIONS is an EAPI4 thing so we can't safely use it in the eclass
Comment 2 SpanKY gentoo-dev 2013-12-02 21:07:28 UTC
(In reply to Jeroen Roovers from comment #0)
> +       if ! [[ "${REPLACING_VERSIONS}" ]]; then

we don't like that form.  use [[ -z ${REPLACING_VERSIONS} ]] instead.

(In reply to Markos Chandras from comment #1)

the var will also be empty on older EAPI's, so it won't induce any regressions, just make things better for newer EAPI's.  i'm not 100% sure we even want to hide it though ... the path changes over time, although once a user reads it, i think it's reasonable to assume people can extrapolate the updates ...

we could also add a `use savedconfig` check ... presumably if the user has enabled the USE flag, they know how it works and don't need to be informed.
Comment 3 SpanKY gentoo-dev 2013-12-03 19:36:21 UTC
actually, how about a completely different idea.  we delete the elog messages altogether and update the savedconfig USE flag description to tell people to read `man savedconfig.eclass` for details on how it works.