/[gentoo-x86]/eclass/savedconfig.eclass
Gentoo

Diff of /eclass/savedconfig.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.13 Revision 1.14
1# Copyright 1999-2007 Gentoo Foundation 1# Copyright 1999-2007 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.13 2010/03/08 04:31:59 jer Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/savedconfig.eclass,v 1.14 2010/10/05 19:51:05 vapier Exp $
4 4
5# @ECLASS: savedconfig.eclass 5# @ECLASS: savedconfig.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# base-system@gentoo.org 7# base-system@gentoo.org
8# @BLURB: common API for saving/restoring complex configuration files 8# @BLURB: common API for saving/restoring complex configuration files
78# @CODE 78# @CODE
79restore_config() { 79restore_config() {
80 use savedconfig || return 80 use savedconfig || return
81 81
82 case ${EBUILD_PHASE} in 82 case ${EBUILD_PHASE} in
83 unpack|compile|prepare) 83 unpack|compile|configure|prepare) ;;
84 ;;
85 *) die "Bad package! restore_config only for use in src_{unpack,compile,prepare} functions!" 84 *) die "Bad package! restore_config only for use in src_{unpack,compile,configure,prepare} functions!" ;;
86 ;;
87 esac 85 esac
88 local found check configfile 86 local found check configfile
89 local base=${PORTAGE_CONFIGROOT}/etc/portage/savedconfig 87 local base=${PORTAGE_CONFIGROOT}/etc/portage/savedconfig
90 for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do 88 for check in {${CATEGORY}/${PF},${CATEGORY}/${P},${CATEGORY}/${PN}}; do
91 configfile=${base}/${CTARGET}/${check} 89 configfile=${base}/${CTARGET}/${check}

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.20