Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 292728 - savedconfig.eclass should not die if it can't restore a config file on first install
Summary: savedconfig.eclass should not die if it can't restore a config file on first ...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: High normal
Assignee: Gentoo's Team for Core System packages
URL: http://archives.gentoo.org/gentoo-dev...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-10 22:21 UTC by Jeroen Roovers (RETIRED)
Modified: 2013-12-03 19:31 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 2009-11-10 22:21:25 UTC
Yes, I am well aware of bug #167899 and it seems nothing has changed, whereas a simple change or two would probably fix the issue and make USE=savedconfig a lot more intuitive to use. Currently you either need to know a package internally to extract the config file and store it beforehand, edit it and then call `USE=savedconfig emerge <pkg>', or you emerge it once with USE=-savedconfig, then once more to get the edited config in. A simple change makes sure that 1) the build doesn't needlessly die, and that 2) the USE flag needs can be set once, and for all.

If I first choose to use USE=savedconfig, then I expect the package to merge even if a stored config isn't found, for the simple reason that the config you provide should replace a config in the package's build system. As far as I can tell, all savedconfig.eclass users work that way and only die() in savedconfig prevents this from working more intuitively.

Index: profiles/use.desc
===================================================================
RCS file: /var/cvsroot/gentoo-x86/profiles/use.desc,v
retrieving revision 1.427
diff -u -B -r1.427 use.desc
--- profiles/use.desc   17 Oct 2009 07:42:08 -0000      1.427
+++ profiles/use.desc   10 Nov 2009 22:16:26 -0000
@@ -306,7 +306,7 @@
 samba - Adds support for SAMBA (Windows File and Printer sharing)
 sapdb - Adds support for SAP DB
 sasl - Adds support for the Simple Authentication and Security Layer
-savedconfig - Use this to restore your config from /etc/portage/savedconfig ${CATEGORY}/${PN}. Make sure your USE flags allow for appropriate dependencies
+savedconfig - Save and/or restore your config from /etc/portage/savedconfig/${CATEGORY}/${PN}. Make sure your USE flags allow for appropriate dependencies
 scanner - Adds support for scanner hardware (e.g. build the sane frontend in kdegraphics)
 sdl - Adds support for Simple Direct Layer (media library)
 seamonkey - Adds support for the Seamonkey web-browser
Index: eclass/savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.12
diff -u -B -r1.12 savedconfig.eclass
--- eclass/savedconfig.eclass   30 Oct 2009 16:46:41 -0000      1.12
+++ eclass/savedconfig.eclass   10 Nov 2009 22:16:26 -0000
@@ -119,8 +119,9 @@
                        eerror "Unable to read ${base} -- perms are screwed ?"
                        die "fix your system"
                fi
-               eerror "No saved config to restore - please remove USE=savedconfig or"
-               eerror "provide a configuration file in ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}"
-               die "config file needed when USE=savedconfig is specified"
+               elog "No saved config to restore was found. The file will be saved at"
+               elog "the end of this build and restored during the next run."
+               elog "After this build, you can prepare this file for the next build:"
+               elog "${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}"
        fi
 }
Comment 1 SpanKY gentoo-dev 2013-12-03 19:31:35 UTC
i think we would gate it on a has_version check -- if the package isn't installed yet, we won't die, but otherwise we will.  always not dying isn't acceptable (per bug 167899 you referenced).