sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
[SM-Commit] GIT changes to master grimoire by David Brown (af6679ab7264ee09c22dcec26acd2f1b863823d2)
- From: David Brown <scm AT mail.sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: [SM-Commit] GIT changes to master grimoire by David Brown (af6679ab7264ee09c22dcec26acd2f1b863823d2)
- Date: Sat, 2 Sep 2006 17:03:28 -0500
GIT changes to master grimoire by David Brown <dmlb2000 AT gmail.com>:
kernels/linux/HISTORY | 4
kernels/linux/PRE_BUILD | 282
++++++++++++++++++++++++------------------------
2 files changed, 148 insertions(+), 138 deletions(-)
New commits:
commit 5b64210e4fcef3b9538dec0b5e6521a9c8c4e9e2
Author: David Brown <dmlb2000 AT gmail.com>
Commit: David Brown <dmlb2000 AT gmail.com>
linux cleaned up PRE_BUILD and added a sanity check to make sure bug
#8129 does not happen again
diff --git a/kernels/linux/HISTORY b/kernels/linux/HISTORY
index 230cfbb..4b60ef6 100644
--- a/kernels/linux/HISTORY
+++ b/kernels/linux/HISTORY
@@ -1,3 +1,7 @@
+2006-09-02 David Brown <dmlb2000 AT gmail.com>
+ * PRE_BUILD: some spell linting and added sanity check so bug #8192
+ should never happen again
+
2006-09-01 David Brown <dmlb2000 AT gmail.com>
* latest.defaults: updated latest to 2.6.18-rc5-mm1
* info/patches/mm_patches/2.6.18-rc5-mm1: added
diff --git a/kernels/linux/PRE_BUILD b/kernels/linux/PRE_BUILD
index b87d714..400e6b1 100755
--- a/kernels/linux/PRE_BUILD
+++ b/kernels/linux/PRE_BUILD
@@ -1,159 +1,165 @@
-linux_new_uncompress()
+function linux_new_uncompress()
{
- if [ "`file $1 | grep gzip`" != "" ]
- then
- gunzip $1
- elif [ "`file $1 | grep bzip`" != "" ]
- then
- bunzip2 $1
- elif [ "`file $1 | grep diff`" != "" ] ||
- [ "`file $1 | grep ASCII`" != "" ] ||
- [ "`file $1 | grep text`" != "" ]
- then
- message "${MESSAGE_COLOR}$1 doesn't need
uncompressing${DEFAULT_COLOR}"
- else
- message "${PROBLEM_COLOR}$1 has some unknown/unimplemented
compression type${DEFAULT_COLOR}"
- return 1
- fi
+ if [[ $(file $1 | grep gzip) != "" ]]
+ then
+ gunzip $1
+ elif [[ $(file $1 | grep bzip) != "" ]]
+ then
+ bunzip2 $1
+ elif [[ $(file $1 | grep diff) != "" ]] ||
+ [[ $(file $1 | grep ASCII) != "" ]] ||
+ [[ $(file $1 | grep text) != "" ]]
+ then
+ message "${MESSAGE_COLOR}$1 doesn't need uncompressing${DEFAULT_COLOR}"
+ else
+ message "${PROBLEM_COLOR}$1 has some unknown/unimplemented compression
type${DEFAULT_COLOR}"
+ return 1
+ fi
}
# message for little output to the user
case "$KMODE" in
- "oldktree")
- if [[ -d ${LINUX_SOURCE_DIRECTORY} ]]
- then
- message "${MESSAGE_COLOR}Okay
${LINUX_SOURCE_DIRECTORY} does exist${DEFAULT_COLOR}"
- else
- message "${PROBLEM_COLOR}Ah,
${LINUX_SOURCE_DIRECTORY} doesn't exist\nGoing to newktree
mode${DEFAULT_COLOR}" &&
- KMODE="newktree"
- fi
- ;;
- "newktree")
- message "${MESSAGE_COLOR}Using ${LINUX_SOURCE_DIRECTORY} for
new build${DEFAULT_COLOR}"
- ;;
- "expert")
- LINUX_SOURCE_DIRECTORY=$old_src_tree
- if [[ -d ${LINUX_SOURCE_DIRECTORY} ]]
- then
- message "${MESSAGE_COLOR}Using
${LINUX_SOURCE_DIRECTORY} for expert build${DEFAULT_COLOR}"
- else
- message "${PROBLEM_COLOR}Ah ${LINUX_SOURCE_DIRECTORY}
doesn't exist exiting${DEFAULT_COLOR}"
- return 1
- fi
- ;;
- *)
- message "${PROBLEM_COLOR}Ah ${KMODE} isn't set properly going
to newktree${DEFAULT_COLOR}"
- KMODE="newktree"
- ;;
+ oldktree)
+ if [[ -d ${LINUX_SOURCE_DIRECTORY} ]]
+ then
+ message "${MESSAGE_COLOR}Okay ${LINUX_SOURCE_DIRECTORY} does
exist${DEFAULT_COLOR}"
+ else
+ message "${PROBLEM_COLOR}Ah, ${LINUX_SOURCE_DIRECTORY} doesn't
exist\nGoing to newktree mode${DEFAULT_COLOR}" &&
+ KMODE="newktree"
+ fi
+ ;;
+ newktree)
+ message "${MESSAGE_COLOR}Using ${LINUX_SOURCE_DIRECTORY} for new
build${DEFAULT_COLOR}"
+ ;;
+ expert)
+ LINUX_SOURCE_DIRECTORY=$old_src_tree
+ if [[ -d ${LINUX_SOURCE_DIRECTORY} ]]
+ then
+ message "${MESSAGE_COLOR}Using ${LINUX_SOURCE_DIRECTORY} for expert
build${DEFAULT_COLOR}"
+ else
+ message "${PROBLEM_COLOR}Ah ${LINUX_SOURCE_DIRECTORY} doesn't exist
exiting${DEFAULT_COLOR}"
+ return 1
+ fi
+ ;;
+ *)
+ message "${PROBLEM_COLOR}Ah ${KMODE} isn't set properly going to
newktree${DEFAULT_COLOR}"
+ KMODE="newktree"
+ ;;
esac
# do the creation of tree if needed
case "${KMODE}" in
- "newktree")
- mk_source_dir $LINUX_SOURCE_DIRECTORY &&
- cd $LINUX_SOURCE_DIRECTORY &&
- unpack_file '' || return 1
- mv ./*/* ./*/.[a-z]* ./ &&
- . ${SPELL_DIRECTORY}/latest.defaults &&
- local count=3
- local source="SOURCE${count}"
- local source_check="PATCH[${count}]"
- while [[ ! -z "${!source_check}" ]]
- do
- pval=1 &&
- patch="PATCH[${count}]"
- tmp=$(find ${SPELL_DIRECTORY} -name ${!patch} | head
-n 1) &&
- . ${tmp} &&
- cd ${LINUX_SOURCE_DIRECTORY} &&
- if [[ ! -z "$source" ]]
- then
- unpack_file "$count" || return 1
- cp -v ${SOURCE_CACHE}/${source} ./ &&
- linux_new_uncompress ./${source} &&
- message "${MESSAGE_COLOR}Patching
${!patch}${DEFAULT_COLOR}" &&
- patch -p${pval} <${!patch}
- rc=$?
- if [[ $rc != 0 ]]
- then
- message "${PROBLEM_COLOR}Bah, patch
${!patch} failed${DEFAULT_COLOR}" &&
- return 1
- fi
- fi
- (( count++ ))
- source="SOURCE${count}"
- source_check="PATCH[${count}]"
- done &&
- chmod og-w -R $LINUX_SOURCE_DIRECTORY &&
- make mrproper
- ;;
- "oldktree")
- message "${MESSAGE_COLOR}mode is oldktree${DEFAULT_COLOR}" &&
- cd $LINUX_SOURCE_DIRECTORY
- ;;
- "expert")
- message "${MESSAGE_COLOR}mode is expert${DEFAULT_COLOR}" &&
- cd $LINUX_SOURCE_DIRECTORY
- ;;
- *)
- message "${PROBLEM_COLOR}I don't know what $mode
is${DEFAULT_COLOR}" &&
- return 1
- ;;
+ newktree)
+ mk_source_dir $LINUX_SOURCE_DIRECTORY &&
+ cd $LINUX_SOURCE_DIRECTORY &&
+ unpack_file '' || return 1
+ mv ./*/* ./*/.[a-z]* ./ &&
+ . ${SPELL_DIRECTORY}/latest.defaults &&
+ local count=3
+ local source="SOURCE${count}"
+ local source_check="PATCH[${count}]"
+ while [[ ! -z "${!source_check}" ]]
+ do
+ pval=1 &&
+ patch="PATCH[${count}]"
+ tmp=$(find ${SPELL_DIRECTORY} -name ${!patch} | head -n 1) &&
+ . ${tmp} &&
+ cd ${LINUX_SOURCE_DIRECTORY} &&
+ if [[ ! -z "$source" ]]
+ then
+ unpack_file "$count" || return 1
+ cp -v ${SOURCE_CACHE}/${source} ./ &&
+ linux_new_uncompress ./${source} &&
+ message "${MESSAGE_COLOR}Patching ${!patch}${DEFAULT_COLOR}" &&
+ patch -p${pval} <${!patch}
+ rc=$?
+ if [[ $rc != 0 ]]
+ then
+ message "${PROBLEM_COLOR}Bah, patch ${!patch}
failed${DEFAULT_COLOR}" &&
+ return 1
+ fi
+ fi
+ (( count++ ))
+ source="SOURCE${count}"
+ source_check="PATCH[${count}]"
+ done &&
+ chmod og-w -R $LINUX_SOURCE_DIRECTORY &&
+ make mrproper
+ ;;
+ oldktree)
+ message "${MESSAGE_COLOR}mode is oldktree${DEFAULT_COLOR}" &&
+ cd $LINUX_SOURCE_DIRECTORY
+ ;;
+ expert)
+ message "${MESSAGE_COLOR}mode is expert${DEFAULT_COLOR}" &&
+ cd $LINUX_SOURCE_DIRECTORY
+ ;;
+ *)
+ message "${PROBLEM_COLOR}I don't know what $mode is${DEFAULT_COLOR}" &&
+ return 1
+ ;;
esac &&
if [[ "$TXTMESSAGE" != "" ]]
then
- message $TXTMESSAGE &&
- sleep 5
+ message $TXTMESSAGE &&
+ sleep 5
fi &&
-
if [[ "$CONFIG_RESTORE" != "" ]]
then
-
- case "${CONFIG_RESTORE}" in
- "/proc/config.gz")
- if [ -f ${CONFIG_RESTORE} ]
- then
- zcat /proc/config.gz > .config
- fi
- ;;
- *)
- if [ -f ${CONFIG_RESTORE} ]
- then
- cp -v ${CONFIG_RESTORE} .config
- fi
- ;;
- esac
+ case "${CONFIG_RESTORE}" in
+ /proc/config.gz)
+ if [[ -f ${CONFIG_RESTORE} ]]
+ then
+ zcat /proc/config.gz > .config
+ fi
+ ;;
+ *)
+ if [[ -f ${CONFIG_RESTORE} ]]
+ then
+ cp -v ${CONFIG_RESTORE} .config
+ fi
+ ;;
+ esac
fi &&
if [[ "$KLINUX_RECONFIGURE" == "true" ]] || [[ "$CONFIG_KERNEL" == "y" ]]
then
- case "$MAKEMODE" in
- menuconfig)
- MENUCONFIG_EXIT="n" &&
- while [[ "$MENUCONFIG_EXIT" == "n" ]]
- do
- make $MAKEMODE &&
- if query "Do you really want to exit
menuconfig?" y
- then
- MENUCONFIG_EXIT="y"
- else
- MENUCONFIG_EXIT="n"
- fi
- done
- ;;
- smgl-update-defaults)
- yes '' | make oldconfig
- ;;
- *)
- make $MAKEMODE
- esac
+ case "$MAKEMODE" in
+ menuconfig)
+ MENUCONFIG_EXIT="n" &&
+ while [[ "$MENUCONFIG_EXIT" == "n" ]]
+ do
+ make $MAKEMODE &&
+ if query "Do you really want to exit menuconfig?" y
+ then
+ MENUCONFIG_EXIT="y"
+ else
+ MENUCONFIG_EXIT="n"
+ fi
+ done
+ ;;
+ smgl-update-defaults)
+ yes '' | make oldconfig
+ ;;
+ *)
+ make $MAKEMODE
+ ;;
+ esac
else
- case "$MAKEMODE" in
- defconfig|allyesconfig|allnoconfig|allmodconfig|randconfig)
- make $MAKEMODE
- ;;
- *)
- # run oldconfig just to make sure it's got a correct
config
- yes '' | make oldconfig
- ;;
- esac
+ case "$MAKEMODE" in
+ defconfig|allyesconfig|allnoconfig|allmodconfig|randconfig)
+ make $MAKEMODE
+ ;;
+ *)
+ # run oldconfig just to make sure it's got a correct config
+ yes '' | make oldconfig
+ ;;
+ esac
+fi &&
+# check to make sure .config exists
+if [[ ! -f ./.config ]]
+then
+ message "${PROBLEM_COLOR}Ah!!! no config file this should
happen!!!${DEFAULT_COLOR}"
+ message "${PROBLEM_COLOR}Try running cast -r $SPELL${DEFAULT_COLOR}"
+ return 1
fi
- [SM-Commit] GIT changes to master grimoire by David Brown (af6679ab7264ee09c22dcec26acd2f1b863823d2), David Brown, 09/02/2006
Archive powered by MHonArc 2.6.24.