summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJohn Mylchreest <johnm@gentoo.org>2005-03-08 21:41:31 +0000
committerJohn Mylchreest <johnm@gentoo.org>2005-03-08 21:41:31 +0000
commitbabdfbe2e7d719ebc3d1b1cfbbc290aab4716034 (patch)
tree3e40bcf69ab01f3799427d4bfcf7fb44d9641d4b /eclass
parentinitial commit (Manifest recommit) (diff)
downloadgentoo-2-babdfbe2e7d719ebc3d1b1cfbbc290aab4716034.tar.gz
gentoo-2-babdfbe2e7d719ebc3d1b1cfbbc290aab4716034.tar.bz2
gentoo-2-babdfbe2e7d719ebc3d1b1cfbbc290aab4716034.zip
Changing array substitutions to _ not -, this prevents the cosmetic bad substitution errors
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kernel-2.eclass18
-rw-r--r--eclass/linux-mod.eclass12
2 files changed, 20 insertions, 10 deletions
diff --git a/eclass/kernel-2.eclass b/eclass/kernel-2.eclass
index 76ec7a8b85fa..66d803245b1a 100644
--- a/eclass/kernel-2.eclass
+++ b/eclass/kernel-2.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.107 2005/03/06 11:28:39 johnm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kernel-2.eclass,v 1.108 2005/03/08 21:40:45 johnm Exp $
# Description: kernel.eclass rewrite for a clean base regarding the 2.6
# series of kernel with back-compatibility for 2.4
@@ -34,8 +34,8 @@
# K_EXTRAEWARN - same as K_EXTRAEINFO except ewarn's instead of einfo's
# K_SYMLINK - if this is set, then forcably create symlink anyway
#
-# K_DEFCONFIG - Allow specifying a different defconfig target. If length zero,
-# defaults to "defconfig".
+# K_DEFCONFIG - Allow specifying a different defconfig target.
+# If length zero, defaults to "defconfig".
# H_SUPPORTEDARCH - this should be a space separated list of ARCH's which
# can be supported by the headers ebuild
@@ -430,7 +430,7 @@ setup_headers() {
# unipatch
#==============================================================
unipatch() {
- local i x extention PIPE_CMD UNIPATCH_DROP KPATCH_DIR PATCH_DEPTH ELINE
+ local i x y z extention PIPE_CMD UNIPATCH_DROP KPATCH_DIR PATCH_DEPTH ELINE
local STRICT_COUNT PATCH_LEVEL myLC_ALL
# set to a standard locale to ensure sorts are ordered properly.
@@ -466,6 +466,11 @@ unipatch() {
if [ -n "${UNIPATCH_STRICTORDER}" ]; then
STRICT_COUNT=$((${STRICT_COUNT} + 1))
+ for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
+ do z="${z}0";
+ done
+ STRICT_COUNT="${z}${STRICT_COUNT}"
+
mkdir -p ${KPATCH_DIR}/${STRICT_COUNT}/
${PIPE_CMD} ${i/:*/} -C ${KPATCH_DIR}/${STRICT_COUNT}/ 1>/dev/null
else
@@ -509,6 +514,11 @@ unipatch() {
if [ -n "${UNIPATCH_STRICTORDER}" ]; then
STRICT_COUNT=$((${STRICT_COUNT} + 1))
+ for((y=0; y<$((6 - ${#STRICT_COUNT})); y++));
+ do z="${z}0";
+ done
+ STRICT_COUNT="${z}${STRICT_COUNT}"
+
mkdir -p ${KPATCH_DIR}/${STRICT_COUNT}/
$(${PIPE_CMD} ${i} > ${KPATCH_DIR}/${STRICT_COUNT}/${x}.patch${PATCH_LEVEL})
else
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass
index ecaa0089c3d3..6d996414712c 100644
--- a/eclass/linux-mod.eclass
+++ b/eclass/linux-mod.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.29 2005/02/06 20:36:42 genstef Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/linux-mod.eclass,v 1.30 2005/03/08 21:41:31 johnm Exp $
# Description: This eclass is used to interface with linux-info in such a way
# to provide the functionality required and initial functions
@@ -134,8 +134,8 @@ update_depmod() {
}
update_modules() {
- if [ -x /sbin/modules-update ] && \
- grep -v -e "^#" -e "^$" ${D}/etc/modules.d/* >/dev/null 2>&1; then
+ if [ -x /sbin/modules-update -a \
+ -n "$(grep -v -e "^#" -e "^$" ${D}/etc/modules.d/*)" ] ; then
ebegin "Updating modules.conf"
/sbin/modules-update
eend $?
@@ -169,9 +169,9 @@ generate_modulesd() {
module_docs="$(eval echo \${MODULESD_${currm}_DOCS})"
module_enabled="$(eval echo \${MODULESD_${currm}_ENABLED})"
- module_aliases="$(eval echo \${#MODULESD_${currm}_ALIASES[*]})"
- module_additions="$(eval echo \${#MODULESD_${currm}_ADDITIONS[*]})"
- module_examples="$(eval echo \${#MODULESD_${currm}_EXAMPLES[*]})"
+ module_aliases="$(eval echo \${#MODULESD_${currm/-/_}_ALIASES[*]})"
+ module_additions="$(eval echo \${#MODULESD_${currm/-/_}_ADDITIONS[*]})"
+ module_examples="$(eval echo \${#MODULESD_${currm/-/_}_EXAMPLES[*]})"
[[ ${module_aliases} -eq 0 ]] && unset module_aliases
[[ ${module_additions} -eq 0 ]] && unset module_additions