* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2008-03-20 16:23 Torsten Veller (tove)
0 siblings, 0 replies; 12+ messages in thread
From: Torsten Veller (tove) @ 2008-03-20 16:23 UTC (permalink / raw
To: gentoo-commits
tove 08/03/20 16:23:43
Modified: savedconfig.eclass
Log:
Fixed typo: s/saveconfig/savedconfig/
Revision Changes Path
1.9 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?r1=1.8&r2=1.9
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- savedconfig.eclass 25 Aug 2007 19:23:16 -0000 1.8
+++ savedconfig.eclass 20 Mar 2008 16:23:42 -0000 1.9
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.8 2007/08/25 19:23:16 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.9 2008/03/20 16:23:42 tove Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -114,7 +114,7 @@
elif [[ -a {found} ]]; then
die "do not know how to handle non-file/directory ${found}"
else
- eerror "No saved config to restore - please remove USE=saveconfig or"
+ 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"
fi
--
gentoo-commits@lists.gentoo.org mailing list
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2009-04-11 15:19 Mike Frysinger (vapier)
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger (vapier) @ 2009-04-11 15:19 UTC (permalink / raw
To: gentoo-commits
vapier 09/04/11 15:19:50
Modified: savedconfig.eclass
Log:
allow src_prepare to use restore_config #265745 by Michał Górny
Revision Changes Path
1.10 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?r1=1.9&r2=1.10
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- savedconfig.eclass 20 Mar 2008 16:23:42 -0000 1.9
+++ savedconfig.eclass 11 Apr 2009 15:19:50 -0000 1.10
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.9 2008/03/20 16:23:42 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.10 2009/04/11 15:19:50 vapier Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -80,9 +80,9 @@
use savedconfig || return
case ${EBUILD_PHASE} in
- unpack|compile)
+ unpack|compile|prepare)
;;
- *) die "Bad package! restore_config only for use in src_unpack or src_compile functions!"
+ *) die "Bad package! restore_config only for use in src_{unpack,compile,prepare} functions!"
;;
esac
local found;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2009-10-30 0:05 Mike Frysinger (vapier)
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger (vapier) @ 2009-10-30 0:05 UTC (permalink / raw
To: gentoo-commits
vapier 09/10/30 00:05:25
Modified: savedconfig.eclass
Log:
declare some vars local and check the path is readable #289168
Revision Changes Path
1.11 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?r1=1.10&r2=1.11
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- savedconfig.eclass 11 Apr 2009 15:19:50 -0000 1.10
+++ savedconfig.eclass 30 Oct 2009 00:05:25 -0000 1.11
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.10 2009/04/11 15:19:50 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.11 2009/10/30 00:05:25 vapier Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -85,7 +85,7 @@
*) die "Bad package! restore_config only for use in src_{unpack,compile,prepare} functions!"
;;
esac
- local found;
+ local found check configfile
local base=${PORTAGE_CONFIGROOT}/etc/portage/savedconfig
for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do
configfile=${base}/${CTARGET}/${check}
@@ -107,13 +107,18 @@
fi
elif [[ -d ${found} ]]; then
elog "Building using saved config directory ${found}"
- dest=${PWD}
+ local dest=${PWD}
pushd "${found}" > /dev/null
treecopy . "${dest}" || die "Failed to restore ${found} to $1"
popd > /dev/null
elif [[ -a {found} ]]; then
die "do not know how to handle non-file/directory ${found}"
else
+ # maybe the user is screwing around with perms they shouldnt #289168
+ if [[ -r ${base} ]] ; then
+ 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"
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2009-10-30 16:46 Mike Frysinger (vapier)
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger (vapier) @ 2009-10-30 16:46 UTC (permalink / raw
To: gentoo-commits
vapier 09/10/30 16:46:41
Modified: savedconfig.eclass
Log:
invert read logic pointed out by Arfrever Frehtes Taifersar Arahesis #289168#4
Revision Changes Path
1.12 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.12&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.12&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?r1=1.11&r2=1.12
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- savedconfig.eclass 30 Oct 2009 00:05:25 -0000 1.11
+++ savedconfig.eclass 30 Oct 2009 16:46:41 -0000 1.12
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.11 2009/10/30 00:05:25 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.12 2009/10/30 16:46:41 vapier Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -115,7 +115,7 @@
die "do not know how to handle non-file/directory ${found}"
else
# maybe the user is screwing around with perms they shouldnt #289168
- if [[ -r ${base} ]] ; then
+ if [[ ! -r ${base} ]] ; then
eerror "Unable to read ${base} -- perms are screwed ?"
die "fix your system"
fi
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2010-03-08 4:32 Jeroen Roovers (jer)
0 siblings, 0 replies; 12+ messages in thread
From: Jeroen Roovers (jer) @ 2010-03-08 4:32 UTC (permalink / raw
To: gentoo-commits
jer 10/03/08 04:32:00
Modified: savedconfig.eclass
Log:
Do not die on first emerge with USE=savedconfig. Be nice in eerror and die messages thanks to Pawel Hajdan, Jr.
Revision Changes Path
1.13 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.13&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?rev=1.13&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/savedconfig.eclass?r1=1.12&r2=1.13
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- savedconfig.eclass 30 Oct 2009 16:46:41 -0000 1.12
+++ savedconfig.eclass 8 Mar 2010 04:31:59 -0000 1.13
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.12 2009/10/30 16:46:41 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.13 2010/03/08 04:31:59 jer Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -111,16 +111,14 @@
pushd "${found}" > /dev/null
treecopy . "${dest}" || die "Failed to restore ${found} to $1"
popd > /dev/null
- elif [[ -a {found} ]]; then
- die "do not know how to handle non-file/directory ${found}"
else
# maybe the user is screwing around with perms they shouldnt #289168
if [[ ! -r ${base} ]] ; then
- eerror "Unable to read ${base} -- perms are screwed ?"
- die "fix your system"
+ eerror "Unable to read ${base} -- please check its permissions."
+ die "Reading config files failed"
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"
+ ewarn "No saved config to restore - please remove USE=savedconfig or"
+ ewarn "provide a configuration file in ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}"
+ ewarn "Your config file(s) will not be used this time"
fi
}
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2010-10-05 19:51 Mike Frysinger (vapier)
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger (vapier) @ 2010-10-05 19:51 UTC (permalink / raw
To: gentoo-commits
vapier 10/10/05 19:51:05
Modified: savedconfig.eclass
Log:
allow restore_config in src_configure
Revision Changes Path
1.14 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.14&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.14&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?r1=1.13&r2=1.14
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- savedconfig.eclass 8 Mar 2010 04:31:59 -0000 1.13
+++ savedconfig.eclass 5 Oct 2010 19:51:05 -0000 1.14
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.13 2010/03/08 04:31:59 jer Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.14 2010/10/05 19:51:05 vapier Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -80,10 +80,8 @@
use savedconfig || return
case ${EBUILD_PHASE} in
- unpack|compile|prepare)
- ;;
- *) die "Bad package! restore_config only for use in src_{unpack,compile,prepare} functions!"
- ;;
+ unpack|compile|configure|prepare) ;;
+ *) die "Bad package! restore_config only for use in src_{unpack,compile,configure,prepare} functions!" ;;
esac
local found check configfile
local base=${PORTAGE_CONFIGROOT}/etc/portage/savedconfig
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2011-07-26 17:35 Zac Medico (zmedico)
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico (zmedico) @ 2011-07-26 17:35 UTC (permalink / raw
To: gentoo-commits
zmedico 11/07/26 17:35:12
Modified: savedconfig.eclass
Log:
Add EAPI 3 prefix compatibility.
Revision Changes Path
1.15 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.15&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.15&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?r1=1.14&r2=1.15
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- savedconfig.eclass 5 Oct 2010 19:51:05 -0000 1.14
+++ savedconfig.eclass 26 Jul 2011 17:35:12 -0000 1.15
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.14 2010/10/05 19:51:05 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.15 2011/07/26 17:35:12 zmedico Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -29,16 +29,17 @@
if [[ ${EBUILD_PHASE} != "install" ]]; then
die "Bad package! save_config only for use in src_install functions!"
fi
+ [[ -z "${ED}" ]] && ED=${D}
case $# in
0) die "Tell me what to save"
;;
1) if [[ -f "$1" ]]; then
dodir /etc/portage/savedconfig/${CATEGORY}
- cp "$1" "${D}"/etc/portage/savedconfig/${CATEGORY}/${PF} \
+ cp "$1" "${ED}"/etc/portage/savedconfig/${CATEGORY}/${PF} \
|| die "Failed to save $1"
else
dodir /etc/portage/savedconfig/${CATEGORY}/${PF}
- treecopy "$1" "${D}"/etc/portage/savedconfig/${CATEGORY}/${PF} \
+ treecopy "$1" "${ED}"/etc/portage/savedconfig/${CATEGORY}/${PF} \
|| die "Failed to save $1"
fi
;;
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2012-01-04 6:19 Mike Frysinger (vapier)
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-04 6:19 UTC (permalink / raw
To: gentoo-commits
vapier 12/01/04 06:19:09
Modified: savedconfig.eclass
Log:
collapse duplicate branches in save_config code paths to keep things simple
Revision Changes Path
1.17 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?r1=1.16&r2=1.17
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- savedconfig.eclass 27 Dec 2011 17:55:12 -0000 1.16
+++ savedconfig.eclass 4 Jan 2012 06:19:09 -0000 1.17
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.16 2011/12/27 17:55:12 fauli Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.17 2012/01/04 06:19:09 vapier Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -29,25 +29,23 @@
if [[ ${EBUILD_PHASE} != "install" ]]; then
die "Bad package! save_config only for use in src_install functions!"
fi
- [[ -z "${ED}" ]] && ED=${D}
- case $# in
- 0) die "Tell me what to save"
- ;;
- 1) if [[ -f "$1" ]]; then
- dodir /etc/portage/savedconfig/${CATEGORY}
- cp "$1" "${ED}"/etc/portage/savedconfig/${CATEGORY}/${PF} \
- || die "Failed to save $1"
- else
- dodir /etc/portage/savedconfig/${CATEGORY}/${PF}
- treecopy "$1" "${ED}"/etc/portage/savedconfig/${CATEGORY}/${PF} \
- || die "Failed to save $1"
- fi
- ;;
- *)
- dodir "${PORTAGE_CONFIGROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF}
- treecopy $* "${D}/${PORTAGE_CONFIGROOT}"/etc/portage/savedconfig/${CATEGORY}/${PF} \
- || die "Failed to save $1"
- esac
+ [[ $# -eq 0 ]] && die "Usage: save_config <files>"
+
+ # Be lazy in our EAPI compat
+ : ${ED:-${D}}
+
+ local dest="/etc/portage/savedconfig/${CATEGORY}"
+ if [[ $# -eq 1 && -f $1 ]] ; then
+ # Just one file, so have the ${PF} be that config file
+ dodir "${dest}"
+ cp "$@" "${ED}/${dest}/${PF}" || die "failed to save $*"
+ else
+ # A dir, or multiple files, so have the ${PF} be a dir
+ # with all the saved stuff below it
+ dodir "${dest}/${PF}"
+ 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"
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2012-01-04 6:22 Mike Frysinger (vapier)
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-04 6:22 UTC (permalink / raw
To: gentoo-commits
vapier 12/01/04 06:22:12
Modified: savedconfig.eclass
Log:
check EBUILD_PHASE all the time in restore_config to catch mis-use even when USE=-savedconfig
Revision Changes Path
1.18 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.18&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.18&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?r1=1.17&r2=1.18
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -r1.17 -r1.18
--- savedconfig.eclass 4 Jan 2012 06:19:09 -0000 1.17
+++ savedconfig.eclass 4 Jan 2012 06:22:12 -0000 1.18
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.17 2012/01/04 06:19:09 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.18 2012/01/04 06:22:12 vapier Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -76,12 +76,13 @@
# ${PORTAGE_CONFIGROOT}/etc/portage/savedconfig/${CATEGORY}/${PN}
# @CODE
restore_config() {
- use savedconfig || return
-
case ${EBUILD_PHASE} in
unpack|compile|configure|prepare) ;;
*) die "Bad package! restore_config only for use in src_{unpack,compile,configure,prepare} functions!" ;;
esac
+
+ use savedconfig || return
+
local found check configfile
local base=${PORTAGE_CONFIGROOT}/etc/portage/savedconfig
for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2012-01-04 7:45 Mike Frysinger (vapier)
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-04 7:45 UTC (permalink / raw
To: gentoo-commits
vapier 12/01/04 07:45:16
Modified: savedconfig.eclass
Log:
fix thinko in $ED setup in save_config
Revision Changes Path
1.19 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?r1=1.18&r2=1.19
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- savedconfig.eclass 4 Jan 2012 06:22:12 -0000 1.18
+++ savedconfig.eclass 4 Jan 2012 07:45:16 -0000 1.19
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.18 2012/01/04 06:22:12 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.19 2012/01/04 07:45:16 vapier Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -32,7 +32,7 @@
[[ $# -eq 0 ]] && die "Usage: save_config <files>"
# Be lazy in our EAPI compat
- : ${ED:-${D}}
+ : ${ED:=${D}}
local dest="/etc/portage/savedconfig/${CATEGORY}"
if [[ $# -eq 1 && -f $1 ]] ; then
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2012-01-04 8:23 Mike Frysinger (vapier)
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger (vapier) @ 2012-01-04 8:23 UTC (permalink / raw
To: gentoo-commits
vapier 12/01/04 08:23:51
Modified: savedconfig.eclass
Log:
force mtime changes on config files so they get left behind when USE=savedconfig is active; see #396169 for the full story
Revision Changes Path
1.20 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.20&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.20&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?r1=1.19&r2=1.20
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- savedconfig.eclass 4 Jan 2012 07:45:16 -0000 1.19
+++ savedconfig.eclass 4 Jan 2012 08:23:51 -0000 1.20
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.19 2012/01/04 07:45:16 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.20 2012/01/04 08:23:51 vapier Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -120,3 +120,20 @@
ewarn "Your config file(s) will not be used this time"
fi
}
+
+savedconfig_pkg_postinst() {
+ # If the user has USE=savedconfig, then chances are they
+ # are modifying these files, so keep them around. #396169
+ # This might lead to cruft build up, but the alternatives
+ # are worse :/.
+
+ if use savedconfig ; then
+ # Be lazy in our EAPI compat
+ : ${EROOT:=${ROOT}}
+
+ find "${EROOT}/etc/portage/savedconfig/${CATEGORY}/${PF}" \
+ -exec touch {} + 2>/dev/null
+ fi
+}
+
+EXPORT_FUNCTIONS pkg_postinst
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass
@ 2013-01-28 20:11 Mike Frysinger (vapier)
0 siblings, 0 replies; 12+ messages in thread
From: Mike Frysinger (vapier) @ 2013-01-28 20:11 UTC (permalink / raw
To: gentoo-commits
vapier 13/01/28 20:11:14
Modified: savedconfig.eclass
Log:
add high level over view of how to use this eclass for users
Revision Changes Path
1.21 eclass/savedconfig.eclass
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.21&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?rev=1.21&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/savedconfig.eclass?r1=1.20&r2=1.21
Index: savedconfig.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- savedconfig.eclass 4 Jan 2012 08:23:51 -0000 1.20
+++ savedconfig.eclass 28 Jan 2013 20:11:14 -0000 1.21
@@ -1,6 +1,6 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.20 2012/01/04 08:23:51 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.21 2013/01/28 20:11:14 vapier Exp $
# @ECLASS: savedconfig.eclass
# @MAINTAINER:
@@ -13,6 +13,22 @@
# of saving and restoring the configuration files was developed
# so users can modify these config files and the ebuild will take it
# into account as needed.
+#
+# @ROFF .nr step 1 1
+# Typically you can create your own configuration files quickly by
+# doing:
+# @ROFF .IP \n[step] 3
+# Build the package with FEATURES=noclean USE=savedconfig.
+# @ROFF .IP \n+[step]
+# Go into the build dir and edit the relevant configuration system
+# (e.g. `make menuconfig` or `nano config-header.h`). You can look
+# at the files in /etc/portage/savedconfig/ to see what files get
+# loaded/restored.
+# @ROFF .IP \n+[step]
+# Copy the modified configuration files out of the workdir and to
+# the paths in /etc/portage/savedconfig/.
+# @ROFF .IP \n+[step]
+# Emerge the package with just USE=savedconfig to get the custom build.
inherit portability
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-01-28 20:11 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-04 6:22 [gentoo-commits] gentoo-x86 commit in eclass: savedconfig.eclass Mike Frysinger (vapier)
-- strict thread matches above, loose matches on Subject: below --
2013-01-28 20:11 Mike Frysinger (vapier)
2012-01-04 8:23 Mike Frysinger (vapier)
2012-01-04 7:45 Mike Frysinger (vapier)
2012-01-04 6:19 Mike Frysinger (vapier)
2011-07-26 17:35 Zac Medico (zmedico)
2010-10-05 19:51 Mike Frysinger (vapier)
2010-03-08 4:32 Jeroen Roovers (jer)
2009-10-30 16:46 Mike Frysinger (vapier)
2009-10-30 0:05 Mike Frysinger (vapier)
2009-04-11 15:19 Mike Frysinger (vapier)
2008-03-20 16:23 Torsten Veller (tove)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox