[kernel] r4864 - in people/horms/test_kernel_build: . etc lib

Simon Horman horms at costa.debian.org
Tue Nov 22 01:10:03 UTC 2005


Author: horms
Date: Tue Nov 22 01:10:02 2005
New Revision: 4864

Added:
   people/horms/test_kernel_build/lib/libtkb.source.generic
      - copied, changed from r4768, people/horms/test_kernel_build/lib/libtkb.source
   people/horms/test_kernel_build/lib/libtkb.unified
      - copied, changed from r4768, people/horms/test_kernel_build/lib/libtkb.source
   people/horms/test_kernel_build/test_kernel_build.image
      - copied, changed from r4768, people/horms/test_kernel_build/test_kernel_build.i386
Removed:
   people/horms/test_kernel_build/etc/test_kernel_build.conf.post
Modified:
   people/horms/test_kernel_build/etc/test_kernel_build.conf
   people/horms/test_kernel_build/etc/test_kernel_build.conf.i386
   people/horms/test_kernel_build/etc/test_kernel_build.conf.powerpc
   people/horms/test_kernel_build/etc/test_kernel_build.conf.source
   people/horms/test_kernel_build/etc/test_kernel_build.conf.unified
   people/horms/test_kernel_build/lib/libtkb.bin.generic
   people/horms/test_kernel_build/lib/libtkb.framework
   people/horms/test_kernel_build/lib/libtkb.generic
   people/horms/test_kernel_build/lib/libtkb.i386
   people/horms/test_kernel_build/lib/libtkb.powerpc
   people/horms/test_kernel_build/lib/libtkb.source
   people/horms/test_kernel_build/test_kernel_build.i386
   people/horms/test_kernel_build/test_kernel_build.old
   people/horms/test_kernel_build/test_kernel_build.powerpc
   people/horms/test_kernel_build/test_kernel_build.source
   people/horms/test_kernel_build/test_kernel_build.unified
Log:
Restructuring

Modified: people/horms/test_kernel_build/etc/test_kernel_build.conf
==============================================================================
--- people/horms/test_kernel_build/etc/test_kernel_build.conf	(original)
+++ people/horms/test_kernel_build/etc/test_kernel_build.conf	Tue Nov 22 01:10:02 2005
@@ -10,7 +10,7 @@
 umask 022
 
 #Time this
-START=$(date --rfc)
+START=$(date --rfc-2822)
 
 ## Make options
 unset MAKE
@@ -42,8 +42,11 @@
 SVN_SUBDIR_2_6=""
 BUILD_BASE="${HOME}/tmp/debian-kernel-test"
 UPLOAD_BASE="${HOME}/public_html/linux/packages/testing"
-UPLOAD_URL_BASE="http://debian.vergenet.net/testing"
+#UPLOAD_URL_BASE="http://debian.vergenet.net/testing"
+UPLOAD_URL_BASE="file:///home/horms/public_html/linux/packages/testing/"
 
 DEBBUILDOPTS_BASE="-rfakeroot -us -uc"
 
+ARCH="$(dpkg --print-architecture)"
+
 fi # TKB_CONF

Modified: people/horms/test_kernel_build/etc/test_kernel_build.conf.i386
==============================================================================
--- people/horms/test_kernel_build/etc/test_kernel_build.conf.i386	(original)
+++ people/horms/test_kernel_build/etc/test_kernel_build.conf.i386	Tue Nov 22 01:10:02 2005
@@ -6,29 +6,10 @@
 if [ "$TKB_CONF_I386" != "YES" ]; then
 TKB_CONF_I386="YES"
 
-. "$TKB_ETC_DIR/test_kernel_build.conf.post"
+. "$TKB_ETC_DIR/test_kernel_build.conf"
 
 BUILD_TYPE="i386"
-KERNEL_ARCH="i386"
 KERNEL_PKG_NAME="kernel-image"
-
-B_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/$KERNEL_ARCH"
-B_DST_BASE="$BUILD_BASE"
-
-B_SRC_DIR="$B_SRC_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH-$VERSION"
-B_DST_DIR="$B_DST_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
-B_PKG_DIR="$B_DST_DIR/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH-$VERSION"
-B_UPLOAD_DIR="$UPLOAD_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
-B_UPLOAD_URL="$UPLOAD_URL_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
-B_TMP_DIR="$B_DST_DIR/tmp"
-B_OLD_DIR="$B_DST_DIR/old"
-B_LOG_DIR="$B_DST_DIR/log"
-B_LOG="$B_LOG_DIR/$KERNEL_PKG_NAME-$STAMP.log"
-
-## Override Make options
-#export DISTCC_HOSTS='172.16.2.44 172.17.91.14 172.17.60.194 172.17.90.1
-#172.17.91.3 172.17.91.4'
-#export MAKE="make CC=\"ccache distcc gcc\""
-#export CONCURRENCY_LEVEL=16
+KERNEL_SPKG_NAME="kernel-source"
 
 fi # TKB_CONF_I386

Modified: people/horms/test_kernel_build/etc/test_kernel_build.conf.powerpc
==============================================================================
--- people/horms/test_kernel_build/etc/test_kernel_build.conf.powerpc	(original)
+++ people/horms/test_kernel_build/etc/test_kernel_build.conf.powerpc	Tue Nov 22 01:10:02 2005
@@ -6,27 +6,10 @@
 if [ "$TKB_CONF_PPC" != "YES" ]; then
 TKB_CONF_PPC="YES"
 
-. "$TKB_ETC_DIR/test_kernel_build.conf.post"
+. "$TKB_ETC_DIR/test_kernel_build.conf"
 
 BUILD_TYPE="powerpc"
-KERNEL_ARCH="powerpc"
 KERNEL_PKG_NAME="kernel-patch"
-
-B_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/$KERNEL_ARCH"
-B_DST_BASE="$BUILD_BASE"
-
-if [ -d "$B_SRC_BASE/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION" ]; then
-        B_SRC_DIR="$B_SRC_BASE/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION"
-else
-	B_SRC_DIR="$B_SRC_BASE/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION-$VERSION"
-fi
-B_DST_DIR="$B_DST_BASE/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION"
-B_TMP_DIR="$B_DST_DIR/tmp"
-B_PKG_DIR="$B_DST_DIR/$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION-$VERSION"
-B_UPLOAD_DIR="$UPLOAD_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
-B_UPLOAD_URL="$UPLOAD_URL_BASE/$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
-B_OLD_DIR="$B_DST_DIR/old"
-B_LOG_DIR="$B_DST_DIR/log"
-B_LOG="$B_LOG_DIR/$KERNEL_PKG_NAME-$STAMP.log"
+KERNEL_SPKG_NAME="kernel-source"
 
 fi # TKB_CONF_PPC

Modified: people/horms/test_kernel_build/etc/test_kernel_build.conf.source
==============================================================================
--- people/horms/test_kernel_build/etc/test_kernel_build.conf.source	(original)
+++ people/horms/test_kernel_build/etc/test_kernel_build.conf.source	Tue Nov 22 01:10:02 2005
@@ -6,20 +6,9 @@
 if [ "$TKB_CONF_SOURCE" != "YES" ]; then
 TKB_CONF_SOURCE="YES"
 
-. "$TKB_ETC_DIR/test_kernel_build.conf.post"
+. "$TKB_ETC_DIR/test_kernel_build.conf"
 
 BUILD_TYPE="source"
-
-S_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/source"
-S_DST_BASE="$BUILD_BASE"
-
-S_SRC_DIR="$S_SRC_BASE/kernel-source-$VERSION-$VERSION"
-S_DST_DIR="$S_DST_BASE/kernel-source-$VERSION"
-S_PKG_DIR="$S_DST_DIR/kernel-source-$VERSION-$VERSION"
-S_UPLOAD_DIR="$UPLOAD_BASE/kernel-source-$VERSION"
-S_UPLOAD_URL="$UPLOAD_URL_BASE/kernel-source-$VERSION"
-S_TMP_DIR="$S_DST_DIR/tmp"
-S_LOG_DIR="$S_DST_DIR/log"
-S_LOG="$S_LOG_DIR/kernel-source-$STAMP.log"
+KERNEL_SPKG_NAME="kernel-source"
 
 fi # TKB_CONF_SOURCE

Modified: people/horms/test_kernel_build/etc/test_kernel_build.conf.unified
==============================================================================
--- people/horms/test_kernel_build/etc/test_kernel_build.conf.unified	(original)
+++ people/horms/test_kernel_build/etc/test_kernel_build.conf.unified	Tue Nov 22 01:10:02 2005
@@ -6,20 +6,9 @@
 if [ "$TKB_CONF_UNIFIED" != "YES" ]; then
 TKB_CONF_UNIFIED="YES"
 
-. "$TKB_ETC_DIR/test_kernel_build.conf.post"
+. "$TKB_ETC_DIR/test_kernel_build.conf"
 
 BUILD_TYPE="unified"
-
-S_SRC_BASE="$SVN_BASE/$SVN_SUBDIR"
-S_DST_BASE="$BUILD_BASE"
-
-S_SRC_DIR="$S_SRC_BASE/linux-2.6"
-S_DST_DIR="$S_DST_BASE/linux-2.6-$BRANCH"
-#S_PKG_DIR="$S_DST_DIR/linux-2.6-$VERSION"
-S_UPLOAD_DIR="$UPLOAD_BASE/linux-2.6"
-S_UPLOAD_URL="$UPLOAD_URL_BASE/linux-2.6"
-S_TMP_DIR="$S_DST_DIR/tmp"
-S_LOG_DIR="$S_DST_DIR/log"
-S_LOG="$S_LOG_DIR/linux-2.6-$STAMP.log"
+KERNEL_SPKG_NAME="linux-2.6"
 
 fi # TKB_CONF_UNIFIED

Modified: people/horms/test_kernel_build/lib/libtkb.bin.generic
==============================================================================
--- people/horms/test_kernel_build/lib/libtkb.bin.generic	(original)
+++ people/horms/test_kernel_build/lib/libtkb.bin.generic	Tue Nov 22 01:10:02 2005
@@ -8,17 +8,51 @@
 
 . "$TKB_LIB_DIR/libtkb.generic"
 
+declare B_SRC_BASE B_DST_BASE B_DST_DIR B_PKG_DIR 
+declare B_TMP_DIR B_OLD_DIR B_LOG_DIR B_LOG
+declare S_DOWNLOAD_URL
+
+setup_bin_generic_pre ()
+{
+	setup_generic_pre $@
+
+	STATUS=0
+	for i in lynx; do
+		if ! which $i >& /dev/null; then
+			echo "Error: $i is not installed" 1>&2
+			STATUS=1
+		fi
+	done
+	if [ $STATUS != 0 ]; then
+		exit 1
+	fi
+
+	B_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/$ARCH"
+	B_DST_BASE="$BUILD_BASE"
+	B_DST_DIR="$B_DST_BASE/$KERNEL_PKG_NAME-$VERSION-$ARCH-$BRANCH"
+	B_PKG_DIR="$B_DST_DIR/$KERNEL_PKG_NAME-$VERSION-$ARCH-$VERSION"
+	B_TMP_DIR="$B_DST_DIR/tmp"
+	B_OLD_DIR="$B_DST_DIR/old"
+	B_LOG_DIR="$B_DST_DIR/log"
+	B_LOG="$B_LOG_DIR/$KERNEL_PKG_NAME-$VERSION-${ARCH}_$B_TAG_VERSION.$ARCH.log"
+
+	S_DOWNLOAD_URL="$UPLOAD_URL_BASE/$KERNEL_SPKG_NAME-${VERSION}_snapshot"
+}
+
 declare TAG_VERSION S_DEB_VERSION S_TAG_VERSION
-post_conf_setup_bin_generic ()
+declare B_UPLOAD_DIR B_UPLOAD_URL
+setup_bin_generic_post ()
 {
-	post_conf_setup_generic
+	setup_generic_post "$1"
 
 	# Using apt-get here does not work because it only
 	# prints out URLs of files that need to be downloaded,
 	# so if they are in the apt cache somewhere they
 	# won't show up
 	#N.B: this may not be in debian package order
-	S_TAG_VERSION="$(wget -O - -qnv $S_DOWNDLOAD_URL | sed -ne 's/.*kernel-tree-'${VERSION}'_\([^_]*\).*/\1/ p' | sort -n | tail -1)"
+	S_TAG_VERSION="$(lynx -source $S_DOWNLOAD_URL | \
+		sed -ne 's/.*kernel-tree-'${VERSION}'_\([^_]*\).*/\1/ p' | \
+			sort -n | tail -1)"
 
 	B_UPSTREAM_VERSION=$(upstream_version "$B_SRC_DIR")
 	B_DEB_VERSION=$(deb_version "$B_SRC_DIR")
@@ -34,28 +68,31 @@
 	else
 		B_TAG_VERSION=$(tag_version "$B_SRC_DIR")
 	fi
+	B_UPLOAD_DIR="$UPLOAD_BASE/$KERNEL_PKG_NAME-$VERSION-${ARCH}_$B_TAG_VERSION"
+	B_UPLOAD_URL="$UPLOAD_URL_BASE/$KERNEL_PKG_NAME-$VERSION-${ARCH}_$B_TAG_VERSION"
+
+	options_print_version "$KERNEL_PKG_NAME" "$B_TAG_VERSION" \
+			"$B_UPSTREAM_VERSION" "$TAG_VERSION"
 
 	log "Building as $(whoami)@$(hostname) (this will be included in dmsg)";
 	if [ -n "$RELEASE" ]; then
 		log "Building: release packages, kernel-tree will need to be installed"
-		log "Building: $KERNEL_PKG_NAME-$KERNEL_ARCH $B_DEB_VERSION"
+		log "Building: $KERNEL_PKG_NAME-$ARCH $B_DEB_VERSION"
 	else
 		log "Building: test packages, dependancies will be mangled"
-		log "          Define RELEASE=yes in the environment to build for a release"
-		log "Building: TAG_VERSION=\"$TAG_VERSION\", override in environment"
+		log "          Run with --release to build for a release"
+		log "Building: tag=\"$TAG_VERSION\", override with --tag"
 		log "Building: set to SOURCE to use same version as kernel-source"
 		log "Using: kernel-source $S_TAG_VERSION"
-		log "Building: $KERNEL_PKG_NAME-$KERNEL_ARCH $B_DEB_VERSION -> $B_TAG_VERSION"
+		log "Building: $KERNEL_PKG_NAME-$ARCH $B_DEB_VERSION -> $B_TAG_VERSION"
 	fi
 	log "Building: Base options to dpkg-buildpackage: \"$DEBBUILDOPTS_BASE\""
 	if [ -n "$DEBBUILDOPTS" ]; then
 		log "Building: User supplied options to dpkg-buildpackage: \"$DEBBUILDOPTS\""
-		log "Building: Over-ride DEBBUILDOPTS in envornment to alter"
-	else
-		log "Building: Set DEBBUILDOPTS in envornment to add options"
+		log "Building: Over-ride with --dpkg-buildpkg-opts"
+	else    
+		log "Building: Use --dpkg-buildpkg-opts to add options"
 	fi
-
 }
 
-
 fi # LIBTKB_BIN_GENERIC

Modified: people/horms/test_kernel_build/lib/libtkb.framework
==============================================================================
--- people/horms/test_kernel_build/lib/libtkb.framework	(original)
+++ people/horms/test_kernel_build/lib/libtkb.framework	Tue Nov 22 01:10:02 2005
@@ -6,27 +6,197 @@
 if [ "$LIBTKB_FRAMEWORK" != "YES" ]; then
 LIBTKB_FRAMEWORK="YES"
 
-usage () 
+declare DKT_VERSION="0.0.1"
+
+print_version ()
+{
+	local NAME="$(basename $0)"
+
+	cat << __EOF__
+$NAME version $DKT_VERSION
+Copyright (C) 2004-2005 by Horms http://www.vergenet.net/~horms/
+
+$NAME comes with ABSOLUTELY NO WARRANTY. 
+This is free software, and you are welcome to redistribute it under 
+certain conditions. See the GNU General Public Licence for details.
+__EOF__
+}
+
+version ()
+{
+	print_version
+	exit 0
+}
+
+print_usage () 
 {
 	local NAME="$(basename $0)"
 
-	cat 1>&2 << __EOF__
-Usage: 
- linux-2.6: $NAME BRANCH [START_STAGE] [END_STAGE]
- otherwise: $NAME VERSION BRANCH [START_STAGE] [END_STAGE]
+	echo
+	print_version
+	echo
+	echo "Usage: "
+	if [ "$BUILD_TYPE" = "unified" ]; then
+		echo " $NAME [OPTIONS] BRANCH [START_STAGE] [END_STAGE]"
+	else
+		echo " $NAME [OPTIONS] VERSION BRANCH [START_STAGE] [END_STAGE]"
+	fi
+
+	cat << __EOF__
 
 Where: 
  BRANCH is one of: sarge, stable, sarge-security, stable-security, etch, 
         testing, sid, unstable, experimental
- VERSION is one of: 2.6, 2.6.8, and 2.4.27
-         2.6 is the new single source packaging
-         2.6.8 and 2.4.27 is the old sarge-style packaging
+__EOF__
+	if [ "$BUILD_TYPE" != "unified" ]; then
+  		echo " VERSION is 2.6.8 or 2.4.27"
+	fi
+	cat << __EOF__
  START_STAGE is a number >= 0 (default 0)
  END_STAGE   is a number >= START_STAGE (default 1000)
 
+Options:
+ --print-package-name     Print name of the package being built and exit
+ --print-version          Print the version of the package being built
+                          and exit
+ --print-upstream-version Print the upstream version of the package being built
+                          and exit
+ --print-tag              Print the tag version used for the build and exit
+ --tag STRING             Set the tag version
+ --release                Build a release rather than test packages
+ --dpkg-buildpkg-opts     Additional options to dpkg-buildpkg
+ --help                   Display this text and exit
+ --version                Display the version of $NAME 
+                          and exit
 __EOF__
+}
+
+usage () 
+{
+	STATUS=1
+	if [ $# -gt 1 ]; then
+		STATUS="$1"
+	fi
+
+	if [ "$STATUS" -eq "0" ]; then
+		print_usage
+		exit 0
+	fi
+
+	print_usage 2>&1
+	exit $STATUS
+}
+
+declare OPT_PRINT_VERSION OPT_PRINT_UPSTREAM_VERSION OPT_PRINT_TAG
+declare OPT_PRINT_PACKAGE_NAME OPT_PRINT_N
+declare OPT_TAG OPT_RELEASE OPT_DPKG_BUILDPKG_OPTS
+declare OPT_VERSION OPT_BRANCH OPT_START_STAGE OPT_END_STAGE
 
-	exit 1
+__parse_options ()
+{
+	if [ $? != 0 ]; then
+		usage
+	fi
+	OPT_PRINT_N=0
+	while true; do
+		case "$1" in
+		--print-package-name) 
+			OPT_PRINT_PACKAGE_NAME="YES"
+			OPT_PRINT_N=$(($OPT_PRINT_N + 1))
+			;;
+		--print-package-version) 
+			OPT_PRINT_VERSION="YES"
+			OPT_PRINT_N=$(($OPT_PRINT_N + 1))
+			;;
+		--print-upstream-version) 
+			OPT_PRINT_UPSTRAM_VERSION="YES"
+			OPT_PRINT_N=$(($OPT_PRINT_N + 1))
+			;;
+		--print-tag) 
+			OPT_PRINT_TAG="YES"
+			OPT_PRINT_N=$(($OPT_PRINT_N + 1))
+			;;
+		--tag)
+			shift
+			OPT_TAG=$(eval echo $1)
+			;;
+		--release)
+			OPT_RELEASE="YES"
+			;;
+		--dpkg-buildpkg-opts)
+			shift
+			OPT_DPKG_BUILDPKG_OPTS=$(eval echo $1)
+			;;
+		--help)
+			usage 0
+			;;
+		--version)
+			version
+			;;
+		--)
+			break
+			;;
+		*)
+			echo "Getopt error" 2>&1
+			usage
+			;;
+		esac
+		shift
+	done
+	shift
+
+	if [ $# -lt 2 -o $# -gt 4 ]; then
+		usage
+	fi
+	if [ $# -gt 2 ]; then
+		OPT_START_STAGE=$(eval echo $3)
+	else
+		OPT_START_STAGE=0
+	fi
+	if [ $# -gt 3 ]; then
+		OPT_END_STAGE=$(eval echo $4)
+	else
+		OPT_END_STAGE=1000
+	fi
+	OPT_VERSION=$(eval echo $1)
+	OPT_BRANCH=$(eval echo $2)
+}
+
+parse_options ()
+{
+	if [ $# == 0 ]; then
+		usage 1
+	fi
+	__parse_options $(getopt --long "print-package-version,print-upstream-version,print-tag,print-package-name,tag:,release,dpkg-buildpkg-opts:,help,version" -- "$0" "$@")
+}
+
+__options_print_version ()
+{
+	if [ "$OPT_PRINT_N" -gt 1 ]; then
+		echo "$1: $2"
+	else
+		echo "$2"
+	fi
+}
+
+options_print_version ()
+{
+	if [ "$OPT_PRINT_PACKAGE_NAME" == "YES" ]; then
+		__options_print_version "package-name" "$1"
+	fi
+	if [ "$OPT_PRINT_VERSION" == "YES" ]; then
+		__options_print_version "package-version" "$2"
+	fi
+	if [ "$OPT_PRINT_UPSTRAM_VERSION" == "YES" ]; then
+		__options_print_version "upstream-version" "$3"
+	fi
+	if [ "$OPT_PRINT_TAG" == "YES" ]; then
+		__options_print_version "tag" "$4"
+	fi
+	if [ "$OPT_PRINT_N" -gt 0 ]; then
+		trap - EXIT
+		exit 0
+	fi
 }
 
 deb_version ()
@@ -168,7 +338,7 @@
 	hostname -s
 	echo "Start: $START"
 	echo -n "Finish: "
-	date --rfc
+	date --rfc-2822
 	times
 
 	if [ "$STAGE_STATUS" = failed ]; then
@@ -183,7 +353,7 @@
 	hostname -s
 	echo "Start: $START"
 	echo -n "Finish: "
-	date --rfc
+	date --rfc-2822
 	times
 
 	if [ "$STAGE_STATUS" = failed ]; then

Modified: people/horms/test_kernel_build/lib/libtkb.generic
==============================================================================
--- people/horms/test_kernel_build/lib/libtkb.generic	(original)
+++ people/horms/test_kernel_build/lib/libtkb.generic	Tue Nov 22 01:10:02 2005
@@ -6,36 +6,19 @@
 if [ "$LIBTKB_GENERIC" != "YES" ]; then
 LIBTKB_GENERIC="YES"
 
+. "$TKB_LIB_DIR/libtkb.framework"
+
 declare VERSION BRANCH START_STAGE END_STAGE STAGE MAJOR_MINOR SVN_SUBDIR
-pre_conf_setup_generic ()
+setup_generic_pre ()
 {
-	STATUS=0
-	for i in fakeroot rsync svn wget; do
-		if ! which $i >& /dev/null; then
-			echo "Error: $i is not installed" 1>&2
-			STATUS=1
-		fi
-	done
-	if [ $STATUS != 0 ]; then
-		exit 1
-	fi
-
-	if [ $# -lt 2 -o $# -gt 4 ]; then
-		usage
-	fi
-	VERSION="$1"
-	BRANCH="$2"
-	
-	if [ $# -gt 2 ]; then
-		START_STAGE=$3
-	else
-		START_STAGE=0
-	fi
-	if [ $# -gt 3 ]; then
-		END_STAGE=$4
-	else
-		END_STAGE=1000
-	fi
+	parse_options $@
+	VERSION="$OPT_VERSION"
+	BRANCH="$OPT_BRANCH"
+	START_STAGE="$OPT_START_STAGE"
+	END_STAGE="$OPT_END_STAGE"
+	TAG_VERSION="$OPT_TAG"
+	RELEASE="$OPT_RELEASE"
+	DPKG_BULDPKG_OPTS="$OPT_DPKG_BULDPKG_OPTS"
 	STAGE=0
 
 	case $BRANCH in
@@ -55,7 +38,7 @@
 			SVN_BASE="$SVN_BASE_TRUNK"
 		;;
 		*)
-			echo "Unknown Branch" 1>&2
+			echo "Unknown Branch: \"$BRANCH\"" 1>&2
 			usage
 		;;
 	esac
@@ -74,21 +57,35 @@
 			SVN_SUBDIR="$SVN_SUBDIR_2_4"
 		;;
 		*)
-			echo "Unknown Version" 1>&2
+			echo "Unknown Version: \"$VERSION\"" 1>&2
 			usage
 		;;
 	esac
+
+
+	STATUS=0
+	for i in fakeroot rsync svn wget; do
+		if ! which $i >& /dev/null; then
+			echo "Error: $i is not installed" 1>&2
+			STATUS=1
+		fi
+	done
+	if [ $STATUS != 0 ]; then
+		exit 1
+	fi
 }
 
-post_conf_setup_generic ()
+setup_generic_post ()
 {
+	local SRC_DIR="$1"
+
 	trap pm_quit EXIT
 	trap pm_quit SIGHUP
 	trap pm_quit SIGTERM
 	trap pm_quit SIGQUIT
 
-	if [ ! -d "$SVN_BASE/$SVN_SUBDIR" ]; then
-		echo "Error: $SVN_BASE/$SVN_SUBDIR does not seem to exist" 1>&2
+	if [ ! -d "$SRC_DIR" ]; then
+		echo "Error: $SRC_DIR does not seem to exist" 1>&2
 		echo "Error: $VERSION $BRANCH does not seem to exist" 1>&2
 		exit 1
 	fi

Modified: people/horms/test_kernel_build/lib/libtkb.i386
==============================================================================
--- people/horms/test_kernel_build/lib/libtkb.i386	(original)
+++ people/horms/test_kernel_build/lib/libtkb.i386	Tue Nov 22 01:10:02 2005
@@ -6,7 +6,14 @@
 if [ "$LIBTKB_BIN_I386" != "YES" ]; then
 LIBTKB_BIN_I386="YES"
 
-. "$TKB_LIB_DIR/libtkb.generic"
 . "$TKB_LIB_DIR/libtkb.bin.generic"
 
+declare B_SRC_DIR
+setup_i386 ()
+{
+	setup_bin_generic_pre $@
+	B_SRC_DIR="$B_SRC_BASE/$KERNEL_PKG_NAME-$VERSION-$ARCH-$VERSION"
+	setup_bin_generic_post "$B_SRC_DIR"
+}
+
 fi # LIBTKB_BIN_I386

Modified: people/horms/test_kernel_build/lib/libtkb.powerpc
==============================================================================
--- people/horms/test_kernel_build/lib/libtkb.powerpc	(original)
+++ people/horms/test_kernel_build/lib/libtkb.powerpc	Tue Nov 22 01:10:02 2005
@@ -6,7 +6,18 @@
 if [ "$LIBTKB_BIN_POWERPC" != "YES" ]; then
 LIBTKB_BIN_POWERPC="YES"
 
-. "$TKB_LIB_DIR/libtkb.generic"
 . "$TKB_LIB_DIR/libtkb.bin.generic"
 
+declare B_SRC_DIR
+setup_powerpc ()
+{
+	setup_bin_generic_pre $@
+	if [ -d "$B_SRC_BASE/$KERNEL_PKG_NAME-$ARCH-$VERSION" ]; then 
+		B_SRC_DIR="$B_SRC_BASE/$KERNEL_PKG_NAME-$ARCH-$VERSION"
+	else
+		B_SRC_DIR="$B_SRC_BASE/$KERNEL_PKG_NAME-$ARCH-$VERSION-$VERSION"
+	fi      
+	setup_bin_generic_post "$B_SRC_DIR"
+}
+
 fi # LIBTKB_BIN_POWERPC

Modified: people/horms/test_kernel_build/lib/libtkb.source
==============================================================================
--- people/horms/test_kernel_build/lib/libtkb.source	(original)
+++ people/horms/test_kernel_build/lib/libtkb.source	Tue Nov 22 01:10:02 2005
@@ -6,42 +6,29 @@
 if [ "$LIBTKB_SOURCE" != "YES" ]; then
 LIBTKB_SOURCE="YES"
 
-. "$TKB_LIB_DIR/libtkb.generic"
+. "$TKB_LIB_DIR/libtkb.source.generic"
 
-declare TAG_VERSION S_DEB_VERSION S_TAG_VERSION
-post_conf_setup_source ()
+
+declare S_SRC_BASE S_DST_BASE S_SRC_DIR S_DST_DIR S_PKG_DIR 
+declare S_UPLOAD_DIR S_UPLOAD_URL S_TMP_DIR S_LOG_DIR S_LOG
+setup_source ()
 {
-	post_conf_setup_generic
+	setup_source_generic_pre $@
+
+	S_SRC_BASE="$SVN_BASE/$SVN_SUBDIR/source"
+	S_DST_BASE="$BUILD_BASE"
 
-	if [ -z "$TAG_VERSION" ]; then
-		if [ -s "$TAG_RELEASE" ]; then
-			TAG_VERSION="${TAG_DATE}00"
-		else
-			TAG_VERSION="${TAG_RELEASE}.${TAG_DATE}00"
-		fi
-	fi
-
-	S_DEB_VERSION=$(deb_version "$S_SRC_DIR")
-	S_TAG_VERSION=$(tag_version "$S_SRC_DIR")
-	S_UPSTREAM_VERSION=$(upstream_version "$S_SRC_DIR")
-
-	log "Building as $(whoami)@$(hostname) (this will be included in dmsg)";
-	if [ -n "$RELEASE" ]; then
-		log "Building: release packages"
-		log "Building: kernel-source $S_DEB_VERSION"
-	else
-		log "Building: test packages"
-		log "          Define RELEASE=yes in the environment to build for a release"
-		log "Building: TAG_VERSION=\"$TAG_VERSION\", override in environment"
-		log "Building: kernel-source $S_DEB_VERSION -> $S_TAG_VERSION"
-	fi
-	log "Building: Base options to dpkg-buildpackage: \"$DEBBUILDOPTS_BASE\""
-	if [ -n "$DEBBUILDOPTS" ]; then
-		log "Building: User supplied options to dpkg-buildpackage: \"$DEBBUILDOPTS\""
-		log "Building: Over-ride DEBBUILDOPTS in envornment to alter"
-	else    
-		log "Building: Set DEBBUILDOPTS in envornment to add options"
-	fi
+	S_SRC_DIR="$S_SRC_BASE/$KERNEL_SPKG_NAME-$VERSION-$VERSION"
+	S_DST_DIR="$S_DST_BASE/$KERNEL_SPKG_NAME-$VERSION-$BRANCH"
+	S_PKG_DIR="$S_DST_DIR/$KERNEL_SPKG_NAME-$VERSION-$VERSION"
+	S_TMP_DIR="$S_DST_DIR/tmp"
+	S_LOG_DIR="$S_DST_DIR/log"
+
+	setup_source_generic_post "$S_SRC_DIR"
+
+	S_UPLOAD_DIR="$UPLOAD_BASE/$KERNEL_SPKG_NAME-${VERSION}_$S_TAG_VERSION"
+	S_UPLOAD_URL="$UPLOAD_URL_BASE/$KERNEL_SPKG_NAME-${VERSION}_$S_TAG_VERSION"
+	S_LOG="$S_LOG_DIR/${KERNEL_SPKG_NAME}_$S_TAG_VERSION.$ARCH.log"
 }
 
 fi # LIBTKB_SOURCE

Copied: people/horms/test_kernel_build/lib/libtkb.source.generic (from r4768, people/horms/test_kernel_build/lib/libtkb.source)
==============================================================================
--- people/horms/test_kernel_build/lib/libtkb.source	(original)
+++ people/horms/test_kernel_build/lib/libtkb.source.generic	Tue Nov 22 01:10:02 2005
@@ -3,15 +3,20 @@
 # Horms                                                   October 2004
 ######################################################################
 
-if [ "$LIBTKB_SOURCE" != "YES" ]; then
-LIBTKB_SOURCE="YES"
+if [ "$LIBTKB_SOURCE_GENERIC" != "YES" ]; then
+LIBTKB_SOURCE_GENERIC="YES"
 
 . "$TKB_LIB_DIR/libtkb.generic"
 
+setup_source_generic_pre ()
+{
+	setup_generic_pre $@
+}
+
 declare TAG_VERSION S_DEB_VERSION S_TAG_VERSION
-post_conf_setup_source ()
+setup_source_generic_post ()
 {
-	post_conf_setup_generic
+	setup_generic_post "$S_SRC_DIR"
 
 	if [ -z "$TAG_VERSION" ]; then
 		if [ -s "$TAG_RELEASE" ]; then
@@ -25,23 +30,26 @@
 	S_TAG_VERSION=$(tag_version "$S_SRC_DIR")
 	S_UPSTREAM_VERSION=$(upstream_version "$S_SRC_DIR")
 
+	options_print_version "$KERNEL_SPKG_NAME" "$S_TAG_VERSION" \
+			"$S_UPSTREAM_VERSION" "$TAG_VERSION"
+
 	log "Building as $(whoami)@$(hostname) (this will be included in dmsg)";
 	if [ -n "$RELEASE" ]; then
 		log "Building: release packages"
 		log "Building: kernel-source $S_DEB_VERSION"
 	else
 		log "Building: test packages"
-		log "          Define RELEASE=yes in the environment to build for a release"
-		log "Building: TAG_VERSION=\"$TAG_VERSION\", override in environment"
+		log "          Run with --release to build for a release"
+		log "Building: tag=\"$TAG_VERSION\", override with --tag"
 		log "Building: kernel-source $S_DEB_VERSION -> $S_TAG_VERSION"
 	fi
 	log "Building: Base options to dpkg-buildpackage: \"$DEBBUILDOPTS_BASE\""
 	if [ -n "$DEBBUILDOPTS" ]; then
 		log "Building: User supplied options to dpkg-buildpackage: \"$DEBBUILDOPTS\""
-		log "Building: Over-ride DEBBUILDOPTS in envornment to alter"
+		log "Building: Over-ride with --dpkg-buildpkg-opts"
 	else    
-		log "Building: Set DEBBUILDOPTS in envornment to add options"
+		log "Building: Use --dpkg-buildpkg-opts to add options"
 	fi
 }
 
-fi # LIBTKB_SOURCE
+fi # LIBTKB_SOURCE_GENERIC

Copied: people/horms/test_kernel_build/lib/libtkb.unified (from r4768, people/horms/test_kernel_build/lib/libtkb.source)
==============================================================================
--- people/horms/test_kernel_build/lib/libtkb.source	(original)
+++ people/horms/test_kernel_build/lib/libtkb.unified	Tue Nov 22 01:10:02 2005
@@ -3,45 +3,30 @@
 # Horms                                                   October 2004
 ######################################################################
 
-if [ "$LIBTKB_SOURCE" != "YES" ]; then
-LIBTKB_SOURCE="YES"
+if [ "$LIBTKB_UNIFIED" != "YES" ]; then
+LIBTKB_UNIFIED="YES"
 
-. "$TKB_LIB_DIR/libtkb.generic"
+. "$TKB_LIB_DIR/libtkb.source.generic"
 
-declare TAG_VERSION S_DEB_VERSION S_TAG_VERSION
-post_conf_setup_source ()
+declare S_SRC_BASE S_DST_BASE S_SRC_DIR S_DST_DIR S_PKG_DIR 
+declare S_UPLOAD_DIR S_UPLOAD_URL S_TMP_DIR S_LOG_DIR S_LOG
+setup_unified ()
 {
-	post_conf_setup_generic
+	setup_source_generic_pre 2.6 $@
 
-	if [ -z "$TAG_VERSION" ]; then
-		if [ -s "$TAG_RELEASE" ]; then
-			TAG_VERSION="${TAG_DATE}00"
-		else
-			TAG_VERSION="${TAG_RELEASE}.${TAG_DATE}00"
-		fi
-	fi
-
-	S_DEB_VERSION=$(deb_version "$S_SRC_DIR")
-	S_TAG_VERSION=$(tag_version "$S_SRC_DIR")
-	S_UPSTREAM_VERSION=$(upstream_version "$S_SRC_DIR")
-
-	log "Building as $(whoami)@$(hostname) (this will be included in dmsg)";
-	if [ -n "$RELEASE" ]; then
-		log "Building: release packages"
-		log "Building: kernel-source $S_DEB_VERSION"
-	else
-		log "Building: test packages"
-		log "          Define RELEASE=yes in the environment to build for a release"
-		log "Building: TAG_VERSION=\"$TAG_VERSION\", override in environment"
-		log "Building: kernel-source $S_DEB_VERSION -> $S_TAG_VERSION"
-	fi
-	log "Building: Base options to dpkg-buildpackage: \"$DEBBUILDOPTS_BASE\""
-	if [ -n "$DEBBUILDOPTS" ]; then
-		log "Building: User supplied options to dpkg-buildpackage: \"$DEBBUILDOPTS\""
-		log "Building: Over-ride DEBBUILDOPTS in envornment to alter"
-	else    
-		log "Building: Set DEBBUILDOPTS in envornment to add options"
-	fi
+	S_SRC_BASE="$SVN_BASE/$SVN_SUBDIR"
+	S_DST_BASE="$BUILD_BASE"
+	S_PKG_DIR="$S_DST_DIR/$KERNEL_SPKG_NAME-$BRANCH"
+	S_SRC_DIR="$S_SRC_BASE/$KERNEL_SPKG_NAME"
+	S_DST_DIR="$S_DST_BASE/$KERNEL_SPKG_NAME"
+	S_TMP_DIR="$S_DST_DIR/tmp"
+	S_LOG_DIR="$S_DST_DIR/log"
+
+	setup_source_generic_post "$S_SRC_DIR"
+
+	S_UPLOAD_DIR="$UPLOAD_BASE/${KERNEL_SPKG_NAME}_$S_TAG_VERSION"
+	S_UPLOAD_URL="$UPLOAD_URL_BASE/${KERNEL_SPKG_NAME}_$S_TAG_VERSION"
+	S_LOG="$S_LOG_DIR/${KERNEL_SPKG_NAME}_$S_TAG_VERSION.$ARCH.log"
 }
 
-fi # LIBTKB_SOURCE
+fi # LIBTKB_UNIFIED

Modified: people/horms/test_kernel_build/test_kernel_build.i386
==============================================================================
--- people/horms/test_kernel_build/test_kernel_build.i386	(original)
+++ people/horms/test_kernel_build/test_kernel_build.i386	Tue Nov 22 01:10:02 2005
@@ -9,15 +9,10 @@
 TKB_LIB_DIR="$TKB_BASE_DIR/lib"
 TKB_ETC_DIR="$TKB_BASE_DIR/etc"
         
-. "$TKB_ETC_DIR/test_kernel_build.conf"
-. "$TKB_LIB_DIR/libtkb.framework"
+. "$TKB_ETC_DIR/test_kernel_build.conf.i386"
 . "$TKB_LIB_DIR/libtkb.i386"
                 
-pre_conf_setup_generic $@
-
-. "$TKB_ETC_DIR/test_kernel_build.conf.i386"
-
-post_conf_setup_bin_generic
+setup_i386 $@
 
 LOG="$B_LOG"
 purgelog
@@ -34,7 +29,7 @@
 openlog
 log "Logs in $LOG.blah"
 
-STAGE_NAME="Extracting kernel-source package"
+STAGE_NAME="Extracting $KERNEL_SPKG_NAME package"
 stage_begin "$STAGE_NAME" || {
 	(
 	if [ -n "$RELEASE" ]; then
@@ -46,11 +41,11 @@
 		# prints out URLs of files that need to be downloaded,
 		# so if they are in the apt cache somewhere they
 		# won't show up
-		wget -N -q "$S_DOWNDLOAD_URL/kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb"
+		lynx -dump "$S_DOWNLOAD_URL/$KERNEL_SPKG_NAME-${VERSION}_${S_TAG_VERSION}_all.deb" > "$KERNEL_SPKG_NAME-${VERSION}_${S_TAG_VERSION}_all.deb"
 		dpkg-deb -x \
-		  "kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb" \
+		  "$KERNEL_SPKG_NAME-${VERSION}_${S_TAG_VERSION}_all.deb" \
 		  "$B_TMP_DIR"
-		wget -N -q "$S_DOWNDLOAD_URL/kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb"
+		lynx -dump "$S_DOWNLOAD_URL/kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb" > "kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb"
 		dpkg-deb -x \
 		  "kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb" \
 		  "$B_TMP_DIR"
@@ -80,7 +75,7 @@
 		echo skip
 	else
 		TMP_CMD="override_version=$S_TAG_VERSION home=$B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/debian sh -x $B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/apply/debian $S_TAG_VERSION" && \
-		sed -e "s#/usr/src/kernel-source#$B_TMP_DIR&#" \
+		sed -e "s#/usr/src/$KERNEL_SPKG_NAME#$B_TMP_DIR&#" \
 			-e "s#/usr/src/.*/apply/debian.*#$TMP_CMD#" \
 			< "$B_PKG_DIR/debian/rules" \
 			> "$B_PKG_DIR/debian/rules.2" && \
@@ -91,7 +86,7 @@
 			> "$B_PKG_DIR/debian/control.2" && \
 		mv "$B_PKG_DIR/debian/control.2" \
 			"$B_PKG_DIR/debian/control" && \
-		sed -e "s/^\($KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH\) ($B_DEB_VERSION) /\1 ($B_TAG_VERSION) /" \
+		sed -e "s/^\($KERNEL_PKG_NAME-$VERSION-$ARCH\) ($B_DEB_VERSION) /\1 ($B_TAG_VERSION) /" \
 			< "$B_PKG_DIR/debian/changelog" \
 			> "$B_PKG_DIR/debian/changelog.2" && \
 		mv "$B_PKG_DIR/debian/changelog.2" \
@@ -118,7 +113,7 @@
 		mkdir -p "$B_UPLOAD_DIR"
 		cp -vp "$B_DST_DIR"/kernel-*_"${B_TAG_VERSION}"*.{deb,dsc,changes,tar.gz} \
 			"$B_UPLOAD_DIR"
-		UP_LOG_DIR="$B_UPLOAD_DIR/$KERNEL_PKG_NAME-$VERSION-${KERNEL_ARCH}_${B_TAG_VERSION}_$KERNEL_ARCH.log"
+		UP_LOG_DIR="$B_UPLOAD_DIR/$KERNEL_PKG_NAME-$VERSION-${ARCH}_${B_TAG_VERSION}_$ARCH.log"
 		mkdir -p "$UP_LOG_DIR"
 		rm -f "$UP_LOG_DIR/"*.bz2
 		cp -p "$B_DST_DIR/log/"* "$UP_LOG_DIR"
@@ -127,6 +122,8 @@
 			gzip --best > Sources.gz ; )
 		(cd "$B_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
 			gzip --best > Packages.gz; )
+		(cd "$S_UPLOAD_DIR/.." && rm -f $KERNEL_PKG_NAME-${VERSION}_snapshot && \
+                        ln -s ${S_UPLOAD_DIR##*/} $KERNEL_PKG_NAME-${VERSION}_snapshot; )
 		print_readme_html "$B_UPLOAD_URL" > "$B_UPLOAD_DIR/README.html"
 		chmod -R a+rX "$B_UPLOAD_DIR"
 	) >& "$LOG.$STAGE"
@@ -142,7 +139,7 @@
 			LOOP_STATUS=1
 		echo "=== System.map Symbol Report ==="
 		cd "$B_OLD_DIR"
-		apt-get -q source "$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
+		apt-get -q source "$KERNEL_PKG_NAME-$VERSION-$ARCH"
 		# Using apt-get here does not work because it only
 		# prints out URLs of files that need to be downloaded,
 		# so if they are in the apt cache somewhere they
@@ -154,7 +151,7 @@
 		#	xargs wget -nv
 		export URL="http://debian.local.valinux.co.jp/debian/"
 		awk '/^Package: kernel-headers/ {print $2}' < \
-			$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH-$VERSION/debian/control | \
+			$KERNEL_PKG_NAME-$VERSION-$ARCH-$VERSION/debian/control | \
 			xargs apt-cache show |\
 			awk '/^Filename: / {print ENVIRON["URL"]$2}' | \
 			xargs wget -nv
@@ -163,8 +160,8 @@
 		for f in $(find config -maxdepth 1 -type f ! -name default -printf '%f\n'); do
 			echo "\"$f\""
 			kernel_symbol_check \
-				"$B_OLD_DIR/kernel-headers-$VERSION-"[0-9]"-${f}_$VERSION-"*"_$KERNEL_ARCH.deb" \
-				"$B_DST_DIR/kernel-headers-$VERSION-$SONAME-${f}_${B_TAG_VERSION}_$KERNEL_ARCH.deb" \
+				"$B_OLD_DIR/kernel-headers-$VERSION-"[0-9]"-${f}_$VERSION-"*"_$ARCH.deb" \
+				"$B_DST_DIR/kernel-headers-$VERSION-$SONAME-${f}_${B_TAG_VERSION}_$ARCH.deb" \
 				|| LOOP_STATUS=1
 		done
 		[ "$LOOP_STATUS" = "0" ]

Copied: people/horms/test_kernel_build/test_kernel_build.image (from r4768, people/horms/test_kernel_build/test_kernel_build.i386)
==============================================================================
--- people/horms/test_kernel_build/test_kernel_build.i386	(original)
+++ people/horms/test_kernel_build/test_kernel_build.image	Tue Nov 22 01:10:02 2005
@@ -1,6 +1,6 @@
 #!/bin/bash
-#######################################################################
-# Horms                                                   October 2004
+######################################################################
+# Horms                                                  November 2005
 ######################################################################
 
 set -e                  
@@ -10,167 +10,7 @@
 TKB_ETC_DIR="$TKB_BASE_DIR/etc"
         
 . "$TKB_ETC_DIR/test_kernel_build.conf"
-. "$TKB_LIB_DIR/libtkb.framework"
-. "$TKB_LIB_DIR/libtkb.i386"
-                
-pre_conf_setup_generic $@
-
-. "$TKB_ETC_DIR/test_kernel_build.conf.i386"
-
-post_conf_setup_bin_generic
-
-LOG="$B_LOG"
-purgelog
-DST_DIR="$B_DST_DIR"
-STAGE_NAME="Creating $KERNEL_PKG_NAME directory"
-stage_begin "$STAGE_NAME" || {
-	{
-		rm -rf "$B_DST_DIR" "$B_PKG_DIR" "$B_OLD_DIR" "$B_LOG_DIR" \
-			"$B_TMP_DIR"
-		mkdir -p "$B_DST_DIR" "$B_OLD_DIR" "$B_LOG_DIR" "$B_TMP_DIR"
-	}
-	stage_end $?
-}
-openlog
-log "Logs in $LOG.blah"
-
-STAGE_NAME="Extracting kernel-source package"
-stage_begin "$STAGE_NAME" || {
-	(
-	if [ -n "$RELEASE" ]; then
-		echo skip
-	else
-		set -x 
-		cd "$B_DST_DIR"
-		# Using apt-get here does not work because it only
-		# prints out URLs of files that need to be downloaded,
-		# so if they are in the apt cache somewhere they
-		# won't show up
-		wget -N -q "$S_DOWNDLOAD_URL/kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb"
-		dpkg-deb -x \
-		  "kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb" \
-		  "$B_TMP_DIR"
-		wget -N -q "$S_DOWNDLOAD_URL/kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb"
-		dpkg-deb -x \
-		  "kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb" \
-		  "$B_TMP_DIR"
-	fi
-	) >& "$LOG.$STAGE"
-	stage_end $?
-}
-
-STAGE_NAME="Copying $KERNEL_PKG_NAME debian directory"
-stage_begin "$STAGE_NAME" || {
-	{
-		( cd "$B_SRC_DIR/" && svn status; ) > "$LOG.$STAGE.svn" && \
-		rsync -av --exclude .svn "$B_SRC_DIR/" "$B_PKG_DIR/"  && \
-		chmod u+x "$B_PKG_DIR/debian/rules"
-	} >& "$LOG.$STAGE"
-	stage_end $?
-	if [ -s "$LOG.$STAGE.svn" ]; then
-		echo "=== SVN file stauts ==="
-		cat "$LOG.$STAGE.svn"
-	fi | tee -a "$LOG.$STAGE"
-}
-
-STAGE_NAME="Mangling $KERNEL_PKG_NAME debian/{rules,control,changelog}"
-stage_begin "$STAGE_NAME" || {
-	{
-	if [ -n "$RELEASE" ]; then
-		echo skip
-	else
-		TMP_CMD="override_version=$S_TAG_VERSION home=$B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/debian sh -x $B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/apply/debian $S_TAG_VERSION" && \
-		sed -e "s#/usr/src/kernel-source#$B_TMP_DIR&#" \
-			-e "s#/usr/src/.*/apply/debian.*#$TMP_CMD#" \
-			< "$B_PKG_DIR/debian/rules" \
-			> "$B_PKG_DIR/debian/rules.2" && \
-		mv "$B_PKG_DIR/debian/rules.2" "$B_PKG_DIR/debian/rules" && \
-		chmod u+x "$B_PKG_DIR/debian/rules" && \
-		sed -re "/^Build-Depends: / s/kernel-tree-$VERSION-[0-9]+(, )?//" \
-			< "$B_PKG_DIR/debian/control" \
-			> "$B_PKG_DIR/debian/control.2" && \
-		mv "$B_PKG_DIR/debian/control.2" \
-			"$B_PKG_DIR/debian/control" && \
-		sed -e "s/^\($KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH\) ($B_DEB_VERSION) /\1 ($B_TAG_VERSION) /" \
-			< "$B_PKG_DIR/debian/changelog" \
-			> "$B_PKG_DIR/debian/changelog.2" && \
-		mv "$B_PKG_DIR/debian/changelog.2" \
-			"$B_PKG_DIR/debian/changelog" || \
-		exit $?
-	fi
-	} >& "$LOG.$STAGE"
-	stage_end $?
-}
-
-STAGE_NAME="Building $KERNEL_PKG_NAME packages"
-stage_begin "$STAGE_NAME" || {
-	(
-		cd $B_PKG_DIR && \
-		time dpkg-buildpackage -rfakeroot -us -uc $DEBBUILDOPTS
-	) >& "$LOG.$STAGE"
-	stage_end $?
-}
-BUILD_STAGE=$STAGE
-
-STAGE_NAME="Uploading Kernel Image"
-stage_begin "$STAGE_NAME" || {
-	(
-		mkdir -p "$B_UPLOAD_DIR"
-		cp -vp "$B_DST_DIR"/kernel-*_"${B_TAG_VERSION}"*.{deb,dsc,changes,tar.gz} \
-			"$B_UPLOAD_DIR"
-		UP_LOG_DIR="$B_UPLOAD_DIR/$KERNEL_PKG_NAME-$VERSION-${KERNEL_ARCH}_${B_TAG_VERSION}_$KERNEL_ARCH.log"
-		mkdir -p "$UP_LOG_DIR"
-		rm -f "$UP_LOG_DIR/"*.bz2
-		cp -p "$B_DST_DIR/log/"* "$UP_LOG_DIR"
-		bzip2 --best "$UP_LOG_DIR/"*
-		(cd "$B_UPLOAD_DIR" && dpkg-scansources . /dev/null | \
-			gzip --best > Sources.gz ; )
-		(cd "$B_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
-			gzip --best > Packages.gz; )
-		print_readme_html "$B_UPLOAD_URL" > "$B_UPLOAD_DIR/README.html"
-		chmod -R a+rX "$B_UPLOAD_DIR"
-	) >& "$LOG.$STAGE"
-	stage_end $?
-}
 
-STAGE_NAME="Examining $KERNEL_PKG_NAME symbols"
-stage_begin "$STAGE_NAME" || {
-	(
-		LOOP_STATUS=0
-		echo "=== Modprobe Symbol Report ==="
-		fgrep "needs unknown symbol" $LOG.$BUILD_STAGE && \
-			LOOP_STATUS=1
-		echo "=== System.map Symbol Report ==="
-		cd "$B_OLD_DIR"
-		apt-get -q source "$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH"
-		# Using apt-get here does not work because it only
-		# prints out URLs of files that need to be downloaded,
-		# so if they are in the apt cache somewhere they
-		# won't show up
-		#awk '/^Package: kernel-headers/ {print $2}' < \
-		#	$KERNEL_PKG_NAME-2.4.27-i386-2.4.27/debian/control | \
-		#	xargs apt-get --reinstall -qq --print-uris install | \
-		#	awk -F\' '{print $2}' | \
-		#	xargs wget -nv
-		export URL="http://debian.local.valinux.co.jp/debian/"
-		awk '/^Package: kernel-headers/ {print $2}' < \
-			$KERNEL_PKG_NAME-$VERSION-$KERNEL_ARCH-$VERSION/debian/control | \
-			xargs apt-cache show |\
-			awk '/^Filename: / {print ENVIRON["URL"]$2}' | \
-			xargs wget -nv
-		cd $B_PKG_DIR
-		SONAME=$(sed -ne "s/Package: kernel-headers-$VERSION-\([0-9]\) *$/\1/ p" debian/control)
-		for f in $(find config -maxdepth 1 -type f ! -name default -printf '%f\n'); do
-			echo "\"$f\""
-			kernel_symbol_check \
-				"$B_OLD_DIR/kernel-headers-$VERSION-"[0-9]"-${f}_$VERSION-"*"_$KERNEL_ARCH.deb" \
-				"$B_DST_DIR/kernel-headers-$VERSION-$SONAME-${f}_${B_TAG_VERSION}_$KERNEL_ARCH.deb" \
-				|| LOOP_STATUS=1
-		done
-		[ "$LOOP_STATUS" = "0" ]
-	) >& "$LOG.$STAGE"
-	stage_end $?
-}
+. "$TKB_BASE_DIR/test_kernel_build.$ARCH"
 
-STAGE_STATUS="ok"
-exit
+exit 0

Modified: people/horms/test_kernel_build/test_kernel_build.old
==============================================================================
--- people/horms/test_kernel_build/test_kernel_build.old	(original)
+++ people/horms/test_kernel_build/test_kernel_build.old	Tue Nov 22 01:10:02 2005
@@ -31,7 +31,7 @@
 
 ## NO USER SERVICABLE PARTS BELOW HERE ##
 
-START=$(date --rfc)
+START=$(date --rfc-2822)
 TAG_DATE="$(date +%Y%m%d)"
 
 set -e
@@ -252,7 +252,7 @@
 	hostname -s
 	echo "Start: $START"
 	echo -n "Finish: "
-	date --rfc
+	date --rfc-2822
 	times
 
 	if [ "$STAGE_STATUS" = failed ]; then
@@ -267,7 +267,7 @@
 	hostname -s
 	echo "Start: $START"
 	echo -n "Finish: "
-	date --rfc
+	date --rfc-2822
 	times
 
 	if [ "$STAGE_STATUS" = failed ]; then

Modified: people/horms/test_kernel_build/test_kernel_build.powerpc
==============================================================================
--- people/horms/test_kernel_build/test_kernel_build.powerpc	(original)
+++ people/horms/test_kernel_build/test_kernel_build.powerpc	Tue Nov 22 01:10:02 2005
@@ -1,5 +1,5 @@
 #!/bin/bash
-#######################################################################
+######################################################################
 # Horms                                                   October 2004
 ######################################################################
 
@@ -9,15 +9,10 @@
 TKB_LIB_DIR="$TKB_BASE_DIR/lib"
 TKB_ETC_DIR="$TKB_BASE_DIR/etc"
 		                  
-. "$TKB_ETC_DIR/test_kernel_build.conf"
-. "$TKB_LIB_DIR/libtkb.framework"
+. "$TKB_ETC_DIR/test_kernel_build.conf.powerpc"
 . "$TKB_LIB_DIR/libtkb.powerpc"
 				                  
-pre_conf_setup_generic $@
-
-.  "$TKB_ETC_DIR/test_kernel_build.conf.powerpc"
-								            
-post_conf_setup_bin_generic
+setup_powerpc $@
 
 LOG="$B_LOG"
 purgelog
@@ -34,7 +29,7 @@
 openlog
 log "Logs in $LOG.blah"
 
-STAGE_NAME="Extracting kernel-source package"
+STAGE_NAME="Extracting $KERNEL_SPKG_NAME package"
 stage_begin "$STAGE_NAME" || {
 	(
 	if [ -n "$RELEASE" ]; then
@@ -46,11 +41,11 @@
 		# prints out URLs of files that need to be downloaded,
 		# so if they are in the apt cache somewhere they
 		# won't show up
-		wget -N -q "$S_DOWNDLOAD_URL/kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb"
+		lynx -dump "$S_DOWNLOAD_URL/$KERNEL_SPKG_NAME-${VERSION}_${S_TAG_VERSION}_all.deb" > "$KERNEL_SPKG_NAME-${VERSION}_${S_TAG_VERSION}_all.deb"
 		dpkg-deb -x \
-		  "kernel-source-${VERSION}_${S_TAG_VERSION}_all.deb" \
+		  "$KERNEL_SPKG_NAME-${VERSION}_${S_TAG_VERSION}_all.deb" \
 		  "$B_TMP_DIR"
-		wget -N -q "$S_DOWNDLOAD_URL/kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb"
+		lynx -dump "$S_DOWNLOAD_URL/kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb" > "kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb"
 		dpkg-deb -x \
 		  "kernel-patch-debian-${VERSION}_${S_TAG_VERSION}_all.deb" \
 		  "$B_TMP_DIR"
@@ -80,7 +75,7 @@
 		echo skip
 	else
 		TMP_CMD="override_version=$S_TAG_VERSION home=$B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/debian sh -x $B_TMP_DIR/usr/src/kernel-patches/all/$VERSION/apply/debian $S_TAG_VERSION" && \
-		sed -e "s#/usr/src/kernel-source#$B_TMP_DIR&#" \
+		sed -e "s#/usr/src/$KERNEL_SPKG_NAME#$B_TMP_DIR&#" \
 			-e "s#/usr/src/.*/apply/debian.*#$TMP_CMD#" \
 			-e "s# /usr/share/doc# $B_TMP_DIR/usr/share/doc#" \
 			< "$B_PKG_DIR/debian/rules" \
@@ -92,7 +87,7 @@
 			> "$B_PKG_DIR/debian/control.2" && \
 		mv "$B_PKG_DIR/debian/control.2" \
 			"$B_PKG_DIR/debian/control" && \
-		sed -e "s/^\($KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION\) ($B_DEB_VERSION) /\1 ($B_TAG_VERSION) /" \
+		sed -e "s/^\($KERNEL_PKG_NAME-$ARCH-$VERSION\) ($B_DEB_VERSION) /\1 ($B_TAG_VERSION) /" \
 			< "$B_PKG_DIR/debian/changelog" \
 			> "$B_PKG_DIR/debian/changelog.2" && \
 		mv "$B_PKG_DIR/debian/changelog.2" \
@@ -119,7 +114,7 @@
 		mkdir -p "$B_UPLOAD_DIR"
 		cp -vp "$B_DST_DIR"/kernel-*_"${B_TAG_VERSION}"*.{deb,dsc,changes,tar.gz} \
 			"$B_UPLOAD_DIR"
-		UP_LOG_DIR="$B_UPLOAD_DIR/$KERNEL_PKG_NAME-$VERSION-${KERNEL_ARCH}_${B_TAG_VERSION}_$KERNEL_ARCH.log"
+		UP_LOG_DIR="$B_UPLOAD_DIR/$KERNEL_PKG_NAME-$VERSION-${ARCH}_${B_TAG_VERSION}_$ARCH.log"
 		mkdir -p "$UP_LOG_DIR"
 		rm -f "$UP_LOG_DIR/"*.bz2
 		cp -p "$B_DST_DIR/log/"* "$UP_LOG_DIR"
@@ -128,6 +123,8 @@
 			gzip --best > Sources.gz ; )
 		(cd "$B_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
 			gzip --best > Packages.gz; )
+		(cd "$S_UPLOAD_DIR/.." && rm -f $KERNEL_PKG_NAME-${VERSION}_snapshot && \       
+                        ln -s ${S_UPLOAD_DIR##*/} $KERNEL_PKG_NAME-${VERSION}_snapshot; )
 		print_readme_html "$B_UPLOAD_URL" > "$B_UPLOAD_DIR/README.html"
 		chmod -R a+rX "$B_UPLOAD_DIR"
 	) >& "$LOG.$STAGE"
@@ -144,7 +141,7 @@
 		echo "=== System.map Symbol Report ==="
 		echo "Not implemeted for powerpc"
 		#cd "$B_OLD_DIR"
-		#apt-get -q source "$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION"
+		#apt-get -q source "$KERNEL_PKG_NAME-$ARCH-$VERSION"
 		## Using apt-get here does not work because it only
 		## prints out URLs of files that need to be downloaded,
 		## so if they are in the apt cache somewhere they
@@ -156,7 +153,7 @@
 		##	xargs wget -nv
 		#export URL="http://ftp2.jp.debian.org/debian/"
 		#awk '/^Package: kernel-headers/ {print $2}' < \
-		#	$KERNEL_PKG_NAME-$KERNEL_ARCH-$VERSION-$VERSION/debian/control | \
+		#	$KERNEL_PKG_NAME-$ARCH-$VERSION-$VERSION/debian/control | \
 		#	xargs apt-cache show |\
 		#	awk '/^Filename: / {print ENVIRON["URL"]$2}' | \
 		#	xargs wget -nv -N
@@ -164,8 +161,8 @@
 		# for f in powerpc powerpc-smppower3 power3-smp power4 power4-smp; do
 		# 	 echo "\"$f\""
 		#	kernel_symbol_check \
-		#		"$B_OLD_DIR/kernel-headers-${VERSION}_$VERSION-${f}_$KERNEL_ARCH.deb" \
-		#		"$B_DST_DIR/kernel-headers-${VERSION}_${B_TAG_VERSION}-${f}_$KERNEL_ARCH.deb" || \
+		#		"$B_OLD_DIR/kernel-headers-${VERSION}_$VERSION-${f}_$ARCH.deb" \
+		#		"$B_DST_DIR/kernel-headers-${VERSION}_${B_TAG_VERSION}-${f}_$ARCH.deb" || \
 		#	LOOP_STATUS=1
 		[ $LOOP_STATUS = "0" ]
 	) >& "$LOG.$STAGE"

Modified: people/horms/test_kernel_build/test_kernel_build.source
==============================================================================
--- people/horms/test_kernel_build/test_kernel_build.source	(original)
+++ people/horms/test_kernel_build/test_kernel_build.source	Tue Nov 22 01:10:02 2005
@@ -9,20 +9,15 @@
 TKB_LIB_DIR="$TKB_BASE_DIR/lib"
 TKB_ETC_DIR="$TKB_BASE_DIR/etc"
 
-. "$TKB_ETC_DIR/test_kernel_build.conf"
-. "$TKB_LIB_DIR/libtkb.framework"
-. "$TKB_LIB_DIR/libtkb.source"
-
-pre_conf_setup_generic $@
-
 . "$TKB_ETC_DIR/test_kernel_build.conf.source"
+. "$TKB_LIB_DIR/libtkb.source"
 
-post_conf_setup_source
+setup_source $@
 
 LOG="$S_LOG"
 purgelog
 DST_DIR="$S_DST_DIR"
-STAGE_NAME="Creating kernel-source directory"
+STAGE_NAME="Creating $KERNEL_SPKG_NAME directory"
 stage_begin "$STAGE_NAME" || {
 	{
 		rm -rf "$S_DST_DIR" "$S_PKG_DIR" "$S_TMP_DIR" "$S_LOG_DIR"
@@ -33,20 +28,20 @@
 openlog
 log "Logs in $LOG.blah"
 
-STAGE_NAME="Fetching kernel-source tarball from debian archive"
+STAGE_NAME="Fetching $KERNEL_SPKG_NAME tarball from debian archive"
 stage_begin "$STAGE_NAME" || {
 	(
 		cd "$S_DST_DIR" && \
-		apt-get source -d -q=1 "kernel-source-$VERSION" && \
-		tar -zxf "kernel-source-${VERSION}_$VERSION.orig.tar.gz" && \
-		test ! -d "kernel-source-${VERSION}-$VERSION.orig" || \
-		mv "kernel-source-${VERSION}-$VERSION.orig" \
-			"kernel-source-${VERSION}-$VERSION"
+		apt-get source -d -q=1 "$KERNEL_SPKG_NAME-$VERSION" && \
+		tar -zxf "$KERNEL_SPKG_NAME-${VERSION}_$VERSION.orig.tar.gz" && \
+		test ! -d "$KERNEL_SPKG_NAME-${VERSION}-$VERSION.orig" || \
+		mv "$KERNEL_SPKG_NAME-${VERSION}-$VERSION.orig" \
+			"$KERNEL_SPKG_NAME-${VERSION}-$VERSION"
 	) >& "$LOG.$STAGE"
 	stage_end $?
 }
 
-STAGE_NAME="Copying kernel-source debian directory"
+STAGE_NAME="Copying $KERNEL_SPKG_NAME debian directory"
 stage_begin "$STAGE_NAME" || {
 	{
 		( cd "$S_SRC_DIR/" && svn status; ) > "$LOG.$STAGE.svn" && \
@@ -62,13 +57,13 @@
 	fi | tee -a "$LOG.$STAGE"
 }
 
-STAGE_NAME="Mangling kernel-source debian/{control,patches/series/}"
+STAGE_NAME="Mangling $KERNEL_SPKG_NAME debian/{control,patches/series/}"
 stage_begin "$STAGE_NAME" || {
 	{
 	if [ -n "$RELEASE" ]; then
 		echo skip
 	else
-		sed -e "s/^\(kernel-source-$VERSION\) ($S_DEB_VERSION) /\1 ($S_TAG_VERSION) /" \
+		sed -e "s/^\($KERNEL_SPKG_NAME-$VERSION\) ($S_DEB_VERSION) /\1 ($S_TAG_VERSION) /" \
 			< "$S_PKG_DIR/debian/changelog" \
 			> "$S_PKG_DIR/debian/changelog.2" && \
 		mv "$S_PKG_DIR/debian/changelog.2" \
@@ -81,7 +76,7 @@
 }
 
 
-STAGE_NAME="Patching kernel-source tree"
+STAGE_NAME="Patching $KERNEL_SPKG_NAME tree"
 stage_begin "$STAGE_NAME" || {
 	(
 		cd "$S_PKG_DIR" && \
@@ -90,7 +85,7 @@
 	stage_end $?
 }
 
-STAGE_NAME="Build kernel-source package"
+STAGE_NAME="Build $KERNEL_SPKG_NAME package"
 stage_begin "$STAGE_NAME" || {
 	(
 		cd "$S_PKG_DIR" && \
@@ -104,9 +99,9 @@
 	(
 		mkdir -p "$S_UPLOAD_DIR"
 		cp -vp "$S_DST_DIR"/kernel-*_"${S_TAG_VERSION}"*.{deb,dsc,changes,diff.gz} \
-			"$S_DST_DIR/kernel-source-${VERSION}_${VERSION}.orig.tar.gz" \
+			"$S_DST_DIR/$KERNEL_SPKG_NAME-${VERSION}_${VERSION}.orig.tar.gz" \
 			"$S_UPLOAD_DIR"
-		UP_LOG_DIR="$S_UPLOAD_DIR/kernel-image-${VERSION}_${VERSION}-${S_TAG_VERSION}_$KERNEL_ARCH.log"
+		UP_LOG_DIR="$S_UPLOAD_DIR/$KERNEL_PKG_NAME-${VERSION}_${VERSION}-${S_TAG_VERSION}_$ARCH.log"
 		mkdir -p "$UP_LOG_DIR"
 		rm -f "$UP_LOG_DIR/"*.bz2
 		cp -p "$S_DST_DIR/log/"* "$UP_LOG_DIR"
@@ -115,6 +110,8 @@
 			gzip --best > Sources.gz ; )
 		(cd "$S_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
 			gzip --best > Packages.gz; )
+		(cd "$S_UPLOAD_DIR/.." && rm -f $KERNEL_SPKG_NAME-${VERSION}_snapshot && \
+			ln -s ${S_UPLOAD_DIR##*/} $KERNEL_SPKG_NAME-${VERSION}_snapshot; )
 		print_readme_html "$S_UPLOAD_URL" > "$S_UPLOAD_DIR/README.html"
 		chmod -R a+rX "$S_UPLOAD_DIR"
 	) >& "$LOG.$STAGE"

Modified: people/horms/test_kernel_build/test_kernel_build.unified
==============================================================================
--- people/horms/test_kernel_build/test_kernel_build.unified	(original)
+++ people/horms/test_kernel_build/test_kernel_build.unified	Tue Nov 22 01:10:02 2005
@@ -9,16 +9,10 @@
 TKB_LIB_DIR="$TKB_BASE_DIR/lib"
 TKB_ETC_DIR="$TKB_BASE_DIR/etc"
 
-. "$TKB_ETC_DIR/test_kernel_build.conf"
-. "$TKB_LIB_DIR/libtkb.framework"
-. "$TKB_LIB_DIR/libtkb.source"
-
-pre_conf_setup_generic 2.6 $@
-
 . "$TKB_ETC_DIR/test_kernel_build.conf.unified"
+. "$TKB_LIB_DIR/libtkb.unified"
 
-post_conf_setup_source
-S_PKG_DIR="$S_DST_DIR/linux-2.6-$S_UPSTREAM_VERSION"
+setup_unified $@
 
 gen_control ()
 {
@@ -32,7 +26,7 @@
 LOG="$S_LOG"
 purgelog
 DST_DIR="$S_DST_DIR"
-STAGE_NAME="Creating linux-2.6 directory"
+STAGE_NAME="Creating $KERNEL_SPKG_NAME directory"
 stage_begin "$STAGE_NAME" || {
 	{
 		rm -rf "$S_DST_DIR" "$S_PKG_DIR" "$S_TMP_DIR" "$S_LOG_DIR"
@@ -53,16 +47,16 @@
 		SRC_URL="${SRC_URL%%\/linux-2.6_*}" && \
 		[ -n "SRC_URL" ] && \
 		wget -q \
-		    "$SRC_URL/linux-2.6_${S_UPSTREAM_VERSION}.orig.tar.gz" && \
-		tar -zxf "linux-2.6_${S_UPSTREAM_VERSION}.orig.tar.gz" && \
-		test ! -d "linux-2.6-${S_UPSTREAM_VERSION}.orig" || \
-		mv "linux-2.6-${S_UPSTREAM_VERSION}.orig" \
-			"linux-2.6-${S_UPSTREAM_VERSION}"
+		    "$SRC_URL/${KERNEL_SPKG_NAME}_${S_UPSTREAM_VERSION}.orig.tar.gz" && \
+		tar -zxf "${KERNEL_SPKG_NAME}_${S_UPSTREAM_VERSION}.orig.tar.gz" && \
+		test ! -d "$KERNEL_SPKG_NAME-${S_UPSTREAM_VERSION}.orig" || \
+		mv "$KERNEL_SPKG_NAME-${S_UPSTREAM_VERSION}.orig" \
+			"$KERNEL_SPKG_NAME-${S_UPSTREAM_VERSION}"
 	) >& "$LOG.$STAGE"
 	stage_end $?
 }
 
-STAGE_NAME="Copying linux-2.6 debian directory"
+STAGE_NAME="Copying $KERNEL_SPKG_NAME debian directory"
 stage_begin "$STAGE_NAME" || {
 	{
 		( cd "$S_SRC_DIR/" && svn status; ) > "$LOG.$STAGE.svn" && \
@@ -79,7 +73,7 @@
 	fi | tee -a "$LOG.$STAGE"
 }
 
-STAGE_NAME="Mangling linux-2.6 debian/{changelog,patches/series/}"
+STAGE_NAME="Mangling $KERNEL_SPKG_NAME debian/{changelog,patches/series/}"
 stage_begin "$STAGE_NAME" || {
 	{
 	if [ -n "$RELEASE" ]; then
@@ -100,7 +94,7 @@
 }
 
 
-STAGE_NAME="Patching linux-2.6 tree"
+STAGE_NAME="Patching $KERNEL_SPKG_NAME tree"
 stage_begin "$STAGE_NAME" || {
 	(
 		# Make sure the contol file is up to date,
@@ -119,7 +113,7 @@
 	stage_end $?
 }
 
-STAGE_NAME="Build linux-2.6 package"
+STAGE_NAME="Build $KERNEL_SPKG_NAME package"
 stage_begin "$STAGE_NAME" || {
 	(
 		# have to unpatch first, else the build falls over
@@ -140,25 +134,24 @@
 STAGE_NAME="Uploading Kernel Source"
 stage_begin "$STAGE_NAME" || {
 	{
-		UDIR="${S_UPLOAD_DIR}_$S_TAG_VERSION"
-		mkdir -p "$UDIR"
+		mkdir -p "$S_UPLOAD_DIR"
 		cp -vp "$S_DST_DIR"/linux-*_"${S_TAG_VERSION}"*.{deb,dsc,changes,diff.gz} \
 			"$S_DST_DIR"/kernel-*-2.6*_"${S_TAG_VERSION}"*.deb \
-			"$S_DST_DIR/linux-2.6_${S_UPSTREAM_VERSION}.orig.tar.gz" \
-			"$UDIR"
-		UP_LOG_DIR="$UDIR/linux-2.6_${S_UPSTREAM_VERSION}-${S_TAG_VERSION}.log"
+			"$S_DST_DIR/${KERNEL_SPKG_NAME}_${S_UPSTREAM_VERSION}.orig.tar.gz" \
+			"$S_UPLOAD_DIR"
+		UP_LOG_DIR="$S_UPLOAD_DIR/${KERNEL_SPKG_NAME}_${S_UPSTREAM_VERSION}-${S_TAG_VERSION}.log"
 		mkdir -p "$UP_LOG_DIR"
 		rm -f "$UP_LOG_DIR/"*.bz2
 		cp -p "$S_DST_DIR/log/"* "$UP_LOG_DIR"
 		bzip2 --best "$UP_LOG_DIR/"*
-		(cd "$UDIR" && dpkg-scansources . /dev/null | \
+		(cd "$S_UPLOAD_DIR" && dpkg-scansources . /dev/null | \
 			gzip --best > Sources.gz ; )
-		(cd "$UDIR" && dpkg-scanpackages . /dev/null | \
+		(cd "$S_UPLOAD_DIR" && dpkg-scanpackages . /dev/null | \
 			gzip --best > Packages.gz; )
-		print_readme_html "$UDIR" > "$UDIR/README.html"
-		(cd "$UDIR/.." && rm -f linux-2.6-snapshot && \
-		 ln -s ${UDIR##*/} linux-2.6-snapshot; )
-		chmod -R a+rX "$UDIR" "$UDIR/../linux-2.6-snapshot"
+		print_readme_html "$S_UPLOAD_DIR" > "$S_UPLOAD_DIR/README.html"
+		(cd "$S_UPLOAD_DIR/.." && rm -f ${KERNEL_SPKG_NAME}_snapshot && \
+		 ln -s ${S_UPLOAD_DIR##*/} ${KERNEL_SPKG_NAME}_snapshot; )
+		chmod -R a+rX "$S_UPLOAD_DIR" "$S_UPLOAD_DIR/../$KERNEL_SPKG_NAME-snapshot"
 	} >& "$LOG.$STAGE"
 	stage_end $?
 }



More information about the Kernel-svn-changes mailing list