Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 367325 - savedconfig.eclass: save path issues when using custom PORTAGE_CONFIGROOT
Summary: savedconfig.eclass: save path issues when using custom PORTAGE_CONFIGROOT
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-15 07:33 UTC by DaboD
Modified: 2013-12-03 19:26 UTC (History)
0 users

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


Attachments
This patch let savedconfig check only directories relative to ${ROOT} (savedconfig-inconsist-dir.patch,3.35 KB, patch)
2011-05-15 07:44 UTC, DaboD
Details | Diff
savedconfig.patch (savedconfig.patch,1.31 KB, patch)
2013-01-24 16:21 UTC, Krzysztof Nowicki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description DaboD 2011-05-15 07:33:07 UTC
In savedconfig.eclass, save_config() save user specified config at
"${D}"/etc/portage/savedconfig/${CATEGORY}/${PF}
or
"${D}/${PORTAGE_CONFIGROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF}
and echo saved config in
/etc/portage/savedconfig/${CATEGORY}/${PF}

Where ${D} will merge to ${ROOT} and ${PORTAGE_CONFIGROOT} may not a sub-directory of ${ROOT}.

In restore_config(), it always find config in
${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/...





Reproducible: Always



Expected Results:  
save_config() and restore_config() should always find config relative to ${ROOT}, because it is where packages actually installed in.
Comment 1 DaboD 2011-05-15 07:44:54 UTC
Created attachment 273241 [details, diff]
This patch let savedconfig check only directories relative to ${ROOT}
Comment 2 SpanKY gentoo-dev 2011-05-17 18:11:33 UTC
Comment on attachment 273241 [details, diff]
This patch let savedconfig check only directories relative to ${ROOT}

ROOT isnt valid in src_*
Comment 3 Krzysztof Nowicki 2013-01-24 16:21:26 UTC
Created attachment 336730 [details, diff]
savedconfig.patch

IMHO the config files should be saved and retrieved from a directory relative to PORTAGE_CONFIGROOT. The reason for that is because they're kept inside /etc/portage, which is relative to the PORTAGE_CONFIGROOT path.

Please find attached a patch that implements this.
Comment 4 SpanKY gentoo-dev 2013-04-27 09:07:48 UTC
Comment on attachment 336730 [details, diff]
savedconfig.patch

(In reply to comment #3)

sorry, but this isn't really working for me either.  packages should not be writing outside of $D.
Comment 5 SpanKY gentoo-dev 2013-12-03 19:26:55 UTC
i think the right thing might be to ignore PORTAGE_CONFIGROOT when saving.  it sucks, but there isn't a good alternative.