summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-08-05 20:04:58 +0000
committerMike Frysinger <vapier@gentoo.org>2006-08-05 20:04:58 +0000
commit0c16dd183ad54c9643d5a61b73ab327cd89d70f6 (patch)
tree03b646e8a795769b6f7c105868d1dab1d228fbdf /sys-apps/busybox
parentAdding perl dep; fixed DEPEND (diff)
downloadgentoo-2-0c16dd183ad54c9643d5a61b73ab327cd89d70f6.tar.gz
gentoo-2-0c16dd183ad54c9643d5a61b73ab327cd89d70f6.tar.bz2
gentoo-2-0c16dd183ad54c9643d5a61b73ab327cd89d70f6.zip
improve savedconfig location #141640
Diffstat (limited to 'sys-apps/busybox')
-rw-r--r--sys-apps/busybox/busybox-1.1.3.ebuild27
-rw-r--r--sys-apps/busybox/busybox-1.2.0.ebuild24
2 files changed, 29 insertions, 22 deletions
diff --git a/sys-apps/busybox/busybox-1.1.3.ebuild b/sys-apps/busybox/busybox-1.1.3.ebuild
index d85be3df2dde..545282638a9b 100644
--- a/sys-apps/busybox/busybox-1.1.3.ebuild
+++ b/sys-apps/busybox/busybox-1.1.3.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.1.3.ebuild,v 1.12 2006/07/15 02:51:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.1.3.ebuild,v 1.13 2006/08/05 20:04:58 vapier Exp $
inherit eutils flag-o-matic
@@ -67,19 +67,24 @@ src_unpack() {
# [package].config
if use savedconfig ; then
+ local conf root
[[ -r .config ]] && rm .config
- for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do
- configfile=${ROOT}/etc/${PN}/${CHOST}/${conf}.config
- [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config
- if [[ -r ${configfile} ]] ; then
- cp ${configfile} ${S}/.config
- break
- fi
+ for conf in {${PF},${P},${PN}}{,-${CHOST}} ; do
+ for root in "${ROOT}" / ; do
+ configfile=${root}etc/portage/savedconfig/${conf}.config
+ if [[ -r ${configfile} ]] ; then
+ cp ${configfile} "${S}"/.config
+ break
+ fi
+ done
done
if [[ -r ${S}/.config ]] ; then
einfo "Found your ${configfile} and using it."
yes "" | make oldconfig > /dev/null
return 0
+ else
+ einfo "Could not locate user configfile, going with default"
+ yes "" | make oldconfig > /dev/null
fi
fi
if use netboot ; then
@@ -217,10 +222,10 @@ src_install() {
fi
if use savedconfig ; then
- einfo "Saving this build config to /etc/${PN}/${CHOST}/${PN}-${PV}-${PR}.config"
+ einfo "Saving this build config to /etc/portage/savedconfig/${PVR}.config"
einfo "Read this ebuild for more info on how to take advantage of this option"
- insinto /etc/${PN}/${CHOST}/
- newins "${S}"/.config ${PN}-${PV}-${PR}.config
+ insinto /etc/portage/savedconfig
+ newins "${S}"/.config ${PVR}.config
fi
}
diff --git a/sys-apps/busybox/busybox-1.2.0.ebuild b/sys-apps/busybox/busybox-1.2.0.ebuild
index d2cd657b0d23..a25bab7ab5f0 100644
--- a/sys-apps/busybox/busybox-1.2.0.ebuild
+++ b/sys-apps/busybox/busybox-1.2.0.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.2.0.ebuild,v 1.4 2006/07/15 02:51:34 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/busybox/busybox-1.2.0.ebuild,v 1.5 2006/08/05 20:04:58 vapier Exp $
inherit eutils flag-o-matic
@@ -67,14 +67,16 @@ src_unpack() {
# [package].config
if use savedconfig ; then
+ local conf root
[[ -r .config ]] && rm .config
- for conf in ${PN}-${PV}-${PR} ${PN}-${PV} ${PN}; do
- configfile=${ROOT}/etc/${PN}/${CHOST}/${conf}.config
- [[ -r ${configfile} ]] || configfile=/etc/${PN}/${CHOST}/${conf}.config
- if [[ -r ${configfile} ]] ; then
- cp ${configfile} ${S}/.config
- break
- fi
+ for conf in {${PF},${P},${PN}}{,-${CHOST}} ; do
+ for root in "${ROOT}" / ; do
+ configfile=${root}etc/portage/savedconfig/${conf}.config
+ if [[ -r ${configfile} ]] ; then
+ cp ${configfile} "${S}"/.config
+ break
+ fi
+ done
done
if [[ -r ${S}/.config ]] ; then
einfo "Found your ${configfile} and using it."
@@ -217,10 +219,10 @@ src_install() {
fi
if use savedconfig ; then
- einfo "Saving this build config to /etc/${PN}/${CHOST}/${PN}-${PV}-${PR}.config"
+ einfo "Saving this build config to /etc/portage/savedconfig/${PVR}.config"
einfo "Read this ebuild for more info on how to take advantage of this option"
- insinto /etc/${PN}/${CHOST}/
- newins "${S}"/.config ${PN}-${PV}-${PR}.config
+ insinto /etc/portage/savedconfig
+ newins "${S}"/.config ${PVR}.config
fi
}