Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 686348 - savedconfig.eclass: save_config() should re-use configuration file scheme used by restore_config()
Summary: savedconfig.eclass: save_config() should re-use configuration file scheme use...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All All
: Normal normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 686350 686296
  Show dependency tree
 
Reported: 2019-05-19 23:39 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2021-11-19 08:42 UTC (History)
2 users (show)

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


Attachments
Patch (savedconfig.eclass.patch,3.85 KB, patch)
2019-05-19 23:50 UTC, Arfrever Frehtes Taifersar Arahesis
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arfrever Frehtes Taifersar Arahesis 2019-05-19 23:39:49 UTC
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.
Comment 1 Arfrever Frehtes Taifersar Arahesis 2019-05-19 23:50:44 UTC
Created attachment 577332 [details, diff]
Patch
Comment 2 Thomas Deutschmann (RETIRED) gentoo-dev 2019-08-03 13:30:51 UTC
Thanks, posted for review https://archives.gentoo.org/gentoo-dev/message/4071540c948529c73df1cb327a34cae2
Comment 3 Larry the Git Cow gentoo-dev 2019-08-08 19:47:50 UTC
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(-)
Comment 4 Larry the Git Cow gentoo-dev 2021-11-05 19:17:16 UTC
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(-)
Comment 5 sg313 2021-11-19 08:42:35 UTC
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.