restore_config() supports several configuration file name schemes: ${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} save_config() saves configuration into ${ED}/etc/portage/savedconfig/${CATEGORY}/${PF} by default. If user has switched to another configuration file name scheme, then it is reasonable to re-use configuration file name scheme chosen by user. Default behavior remains unchanged.
Created attachment 577332 [details, diff] Patch
Thanks, posted for review https://archives.gentoo.org/gentoo-dev/message/4071540c948529c73df1cb327a34cae2
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a0c35ad8ee8f8f89ba6044dd5b44e9479c6a1775 commit a0c35ad8ee8f8f89ba6044dd5b44e9479c6a1775 Author: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> AuthorDate: 2019-08-03 11:41:09 +0000 Commit: Thomas Deutschmann <whissi@gentoo.org> CommitDate: 2019-08-08 19:47:41 +0000 savedconfig.eclass: Re-use configuration file scheme Make save_config() re-use configuration file scheme used by restore_config(). Fixes: https://bugs.gentoo.org/686348 Signed-off-by: Arfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org> Signed-off-by: Thomas Deutschmann <whissi@gentoo.org> eclass/savedconfig.eclass | 40 +++++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 13 deletions(-)
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb71dfec11e09ae40ae90f27305948097b6591a2 commit eb71dfec11e09ae40ae90f27305948097b6591a2 Author: Mike Gilbert <floppym@gentoo.org> AuthorDate: 2021-10-31 19:16:06 +0000 Commit: Mike Gilbert <floppym@gentoo.org> CommitDate: 2021-11-05 19:17:13 +0000 savedconfig.eclass: do not re-use config file scheme This causes file collisions when save_config is used in a multi-slotted package and the config file is named ${PN}. Reverts: a0c35ad8ee8f8f89ba6044dd5b44e9479c6a1775 Bug: https://bugs.gentoo.org/686348 Closes: https://bugs.gentoo.org/818904 Signed-off-by: Mike Gilbert <floppym@gentoo.org> eclass/savedconfig.eclass | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-)
Could it be that the last commit https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eb71dfec11e09ae40ae90f27305948097b6591a2 caused a bug where the savedconfig of the previously emerge package version is not correctly applied on updates, e.g. when updating from gentoo-kernel-5.15.2 to gentoo-kernel-5.15.3 the savedconfig from 5.15.2 is not applied to 5.15.3? This might also be related to https://bugs.gentoo.org/824594.