public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Fabio Erculiani" <lxnay@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/genkernel:master commit in: /, defaults/
Date: Tue, 13 Sep 2011 09:54:44 +0000 (UTC)	[thread overview]
Message-ID: <1e50bd01d27fbc3c3be29753f59f6e9608a19312.lxnay@gentoo> (raw)

commit:     1e50bd01d27fbc3c3be29753f59f6e9608a19312
Author:     Fabio Erculiani <lxnay <AT> sabayon <DOT> org>
AuthorDate: Tue Sep 13 09:58:30 2011 +0000
Commit:     Fabio Erculiani <lxnay <AT> gentoo <DOT> org>
CommitDate: Tue Sep 13 09:58:30 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=1e50bd01

trivial: cleanup code, drop whitespaces and some more cruft

---
 defaults/linuxrc     |   60 +++++++++++++++++--------------------------------
 gen_arch.sh          |    2 +-
 gen_bootloader.sh    |    4 +-
 gen_cmdline.sh       |    4 +-
 gen_compile.sh       |    4 +-
 gen_configkernel.sh  |    2 +-
 gen_determineargs.sh |   14 +++++-----
 gen_funcs.sh         |   10 ++++----
 gen_initramfs.sh     |   32 +++++++++++++-------------
 gen_moddeps.sh       |    4 +-
 gen_package.sh       |   33 +++++++++++++--------------
 11 files changed, 75 insertions(+), 94 deletions(-)

diff --git a/defaults/linuxrc b/defaults/linuxrc
index ee74d76..01d5cf9 100755
--- a/defaults/linuxrc
+++ b/defaults/linuxrc
@@ -78,7 +78,7 @@ do
 		isoboot=*)
 			ISOBOOT=${x#*=}
 		;;
-		# Start Volume manager options 
+		# Start Volume manager options
 		dolvm)
 			USE_LVM_NORMAL=1
 		;;
@@ -100,7 +100,7 @@ do
 		debug)
 			DEBUG='yes'
 		;;
-		# Scan delay options 
+		# Scan delay options
 		scandelay=*)
 			SDELAY=${x#*=}
 		;;
@@ -228,30 +228,12 @@ do
 		nounionfs)
 			USE_UNIONFS_NORMAL=0
 			;;
-#                 unionfs=*) 	 
-#                         if [ ! -x /sbin/unionfs ] 	 
-#                         then 	 
-#                                 USE_UNIONFS_NORMAL=0 	 
-#                                 bad_msg 'unionfs binary not found: aborting use of unionfs!'
-#                         else 	 
-#                                 USE_UNIONFS_NORMAL=1 	 
-#                                 CMD_UNIONFS=${x#*=} 	 
-#                                 echo ${CMD_UNIONFS}|grep , >/dev/null 2>&1 	 
-#                                 if [ $? -eq 0 ]
-#                                 then 	 
-#                                         UID=$(echo ${CMD_UNIONFS#*,}) 	 
-#                                         UNIONFS=$(echo ${CMD_UNIONFS%,*}) 
-#                                 else 	 
-#                                         UNIONFS=${CMD_UNIONFS} 	 
-#                                 fi 	 
-#                         fi 	 
-#                 ;;
 	esac
 done
 
 if [ -z "${REAL_ROOT}" -a \( "${CDROOT}" = '0' \)  -a \( "${FAKE_ROOT}" != "/dev/ram0" \) ]
 then
-	REAL_ROOT="${FAKE_ROOT}"	
+	REAL_ROOT="${FAKE_ROOT}"
 fi
 
 splash 'init'
@@ -325,22 +307,22 @@ then
 
 				RESUME_DEV=""
 				retval=1
-				
+
 				if [ ${retval} -ne 0 ]; then
 					RESUME_DEV=$(findfs "${REAL_RESUME}" 2>/dev/null)
 					retval=$?
 				fi
-				
+
 				if [ ${retval} -ne 0 ]; then
 					RESUME_DEV=$(busybox findfs "${REAL_RESUME}" 2>/dev/null)
 					retval=$?
 				fi
-				
+
 				if [ ${retval} -ne 0 ]; then
 					RESUME_DEV=$(blkid -l -t "${REAL_RESUME}" | cut -d ":" -f 1 2>/dev/null)
 					retval=$?
 				fi
-				
+
 				if [ ${retval} -eq 0 ] && [ -n "${RESUME_DEV}" ]; then
 					good_msg "Detected real_resume=${RESUME_DEV}"
 					REAL_RESUME="${RESUME_DEV}"
@@ -362,7 +344,7 @@ if [ "${CDROOT}" = '1' ]
 then
 	good_msg "Making tmpfs for ${NEW_ROOT}"
 	mount -n -t tmpfs tmpfs "${NEW_ROOT}"
-	
+
 	for i in dev mnt mnt/cdrom mnt/livecd mnt/key tmp tmp/.initrd mnt/gentoo sys
 	do
 		mkdir -p "${NEW_ROOT}/${i}"
@@ -393,7 +375,7 @@ then
 	if [ "${REAL_ROOT}" = '' ]
 	then
 		echo -n -e "${WARN}>>${NORMAL}${BOLD} No bootable medium found. Waiting for new devices"
-		
+
 		COUNTER=0
 		while [ ${COUNTER} -lt 3 ]; do
 			sleep 3
@@ -428,26 +410,26 @@ do
 	while [ "${got_good_root}" != '1' ]
 	do
 		case "${REAL_ROOT}" in
-			LABEL\=*|UUID\=*)
-			
+			LABEL=*|UUID=*)
+
 				ROOT_DEV=""
 				retval=1
-				
+
 				if [ ${retval} -ne 0 ]; then
 					ROOT_DEV=$(findfs "${REAL_ROOT}" 2>/dev/null)
 					retval=$?
 				fi
-				
+
 				if [ ${retval} -ne 0 ]; then
 					ROOT_DEV=$(busybox findfs "${REAL_ROOT}" 2>/dev/null)
 					retval=$?
 				fi
-				
+
 				if [ ${retval} -ne 0 ]; then
 					ROOT_DEV=$(blkid -l -t "${REAL_ROOT}" | cut -d ":" -f 1 2>/dev/null)
 					retval=$?
 				fi
-				
+
 				if [ ${retval} -eq 0 ] && [ -n "${ROOT_DEV}" ]; then
 					good_msg "Detected real_root=${ROOT_DEV}"
 					REAL_ROOT="${ROOT_DEV}"
@@ -458,7 +440,7 @@ do
 				fi
 				;;
 		esac
-				
+
 		if [ "${REAL_ROOT}" = '' ]
 		then
 			# No REAL_ROOT determined/specified. Prompt user for root block device.
@@ -503,8 +485,8 @@ do
 				mount -t ${ROOTFSTYPE} -o ro,${REAL_ROOTFLAGS} ${REAL_ROOT} ${NEW_ROOT}
 			fi
 		fi
-		
-		# If mount is successful break out of the loop 
+
+		# If mount is successful break out of the loop
 		# else not a good root and start over.
 		if [ "$?" = '0' ]
 		then
@@ -613,7 +595,7 @@ then
 					"${NEW_ROOT}${CDROOT_DEV}" \
 					"${NEW_ROOT}${REAL_ROOT}"
 			test_success 'losetup /dev/sr0 /dev/loop0'
-	
+
 			good_msg 'Mounting the Root Partition'
 			mount -t squashfs -o ro "${NEW_ROOT}${CDROOT_DEV}" "${NEW_ROOT}/mnt/livecd"
 			test_success 'mount /dev/loop0 /'
@@ -631,7 +613,7 @@ then
 		if [ -e "${NEW_ROOT}/mnt/cdrom/add" ]
 		then
 				for targz in $(ls ${NEW_ROOT}/mnt/cdrom/add/*.tar.gz)
-				do	
+				do
 					tarname=$(basename ${targz})
 					good_msg "Adding additional package ${tarname}"
 					(cd ${NEW_ROOT} ; /bin/tar -xzf ${targz})
@@ -645,7 +627,7 @@ then
 		setup_unionfs ${NEW_ROOT} ${NEW_ROOT}/${FS_LOCATION}
 		CHROOT=/union
 	elif [ "${USE_AUFS_NORMAL}" != '1' ]; then
-	
+
 	good_msg "Copying read-write image contents to tmpfs"
 	# Copy over stuff that should be writable
 	(cd "${NEW_ROOT}/${FS_LOCATION}"; cp -a ${ROOT_TREES} "${NEW_ROOT}")

diff --git a/gen_arch.sh b/gen_arch.sh
index c7bd3cc..866a40f 100755
--- a/gen_arch.sh
+++ b/gen_arch.sh
@@ -42,7 +42,7 @@ get_official_arch() {
 	then
 		UTILS_ARCH='sparc'
 	fi
-	
+
 	ARCH_CONFIG="${GK_SHARE}/arch/${ARCH}/config.sh"
 	[ -f "${ARCH_CONFIG}" ] || gen_die "${ARCH} not yet supported by genkernel. Please add the arch-specific config file, ${ARCH_CONFIG}"
 }

diff --git a/gen_bootloader.sh b/gen_bootloader.sh
index 3e6f98b..79531d4 100755
--- a/gen_bootloader.sh
+++ b/gen_bootloader.sh
@@ -60,7 +60,7 @@ set_bootloader_grub() {
 			echo "root (${GRUB_BOOT_DISK},${GRUB_BOOT_PARTITION})" >> ${GRUB_CONF}
 			echo >> ${GRUB_CONF}
 
-			# Add grub configuration to grub.conf	
+			# Add grub configuration to grub.conf
 			echo "# Genkernel generated entry, see GRUB documentation for details" >> ${GRUB_CONF}
 			echo "title=Gentoo Linux ($KV)" >> ${GRUB_CONF}
 			if [ "${BUILD_INITRD}" = '0' ]
@@ -109,7 +109,7 @@ set_bootloader_grub_check_for_existing_entry() {
 set_bootloader_grub_duplicate_default() {
 	local GRUB_CONF=$1
 	local GRUB_CONF_TMP="${GRUB_CONF}.tmp"
-	
+
 	line_count=$(wc -l < "${GRUB_CONF}")
 	line_nums="$(grep -n "^title" "${GRUB_CONF}" | cut -d: -f1)"
 	if [ -z "${line_nums}" ]; then

diff --git a/gen_cmdline.sh b/gen_cmdline.sh
index b3e451d..f048b28 100755
--- a/gen_cmdline.sh
+++ b/gen_cmdline.sh
@@ -422,11 +422,11 @@ parse_cmdline() {
 			TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
 			print_info 2 "TMPDIR: ${TMPDIR}"
 			print_info 2 "TEMP: ${TEMP}"
-			;; 
+			;;
 		--postclear)
 			CMD_POSTCLEAR=1
 			print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}"
-			;; 
+			;;
 		--arch-override=*)
 			CMD_ARCHOVERRIDE=`parse_opt "$*"`
 			print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}"

diff --git a/gen_compile.sh b/gen_compile.sh
index 045ca8f..fce0750 100755
--- a/gen_compile.sh
+++ b/gen_compile.sh
@@ -517,10 +517,10 @@ compile_dmraid() {
 		rm -rf "${TEMP}/device-mapper" > /dev/null
 		/bin/tar -jxpf "${DEVICE_MAPPER_BINCACHE}" -C "${TEMP}" ||
 			gen_die "Could not extract device-mapper binary cache!";
-		
+
 		cd "${DMRAID_DIR}"
 		print_info 1 'dmraid: >> Configuring...'
-		
+
 		LDFLAGS="-L${TEMP}/device-mapper/lib" \
 		CFLAGS="-I${TEMP}/device-mapper/include" \
 		CPPFLAGS="-I${TEMP}/device-mapper/include" \

diff --git a/gen_configkernel.sh b/gen_configkernel.sh
index faf1874..5d619fa 100755
--- a/gen_configkernel.sh
+++ b/gen_configkernel.sh
@@ -73,7 +73,7 @@ config_kernel() {
 	else
 		print_info 1 "kernel: --clean is disabled; not running 'make clean'."
 	fi
-	
+
 	if isTrue ${MENUCONFIG}
 	then
 		print_info 1 'kernel: >> Invoking menuconfig...'

diff --git a/gen_determineargs.sh b/gen_determineargs.sh
index ce479cb..8244269 100755
--- a/gen_determineargs.sh
+++ b/gen_determineargs.sh
@@ -30,7 +30,7 @@ get_KV() {
 		SUB=`grep ^SUBLEVEL\ \= ${KERNEL_DIR}/Makefile | awk '{ print $3 };'`
 		EXV=`grep ^EXTRAVERSION\ \= ${KERNEL_DIR}/Makefile | sed -e "s/EXTRAVERSION =//" -e "s/ //g" -e 's/\$([a-z]*)//gi'`
 
-		if [ -z "${SUB}" ]; 
+		if [ -z "${SUB}" ]
 		then
 			# Handle O= build directories
 			KERNEL_SOURCE_DIR=`grep ^MAKEARGS\ \:\=  ${KERNEL_DIR}/Makefile | awk '{ print $4 };'`
@@ -143,7 +143,7 @@ determine_real_args() {
 	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
 	UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"`
 	GPG_BINCACHE=`cache_replace "${GPG_BINCACHE}"`
-  
+
 	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
 	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
 	BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"`
@@ -166,7 +166,7 @@ determine_real_args() {
 			BOOTLOADER=`echo "${CMD_BOOTLOADER}" | cut -f1 -d:`
 		fi
 	fi
-	
+
 	if [ "${NO_KERNEL_SOURCES}" != "1" ]
 	then
 		if [ ! -d ${KERNEL_DIR} ]
@@ -192,7 +192,7 @@ determine_real_args() {
 		fi
 	fi
 
-	# Special case:  If --no-clean is specified on the command line, 
+	# Special case:  If --no-clean is specified on the command line,
 	# imply --no-mrproper.
 	if [ "${CMD_CLEAN}" != '' ]
 	then
@@ -201,12 +201,12 @@ determine_real_args() {
 			MRPROPER=0
 		fi
 	fi
-	
+
 	if [ -n "${MINKERNPACKAGE}" ]
 	then
 		mkdir -p `dirname ${MINKERNPACKAGE}`
 	fi
-	
+
 	if [ -n "${MODULESPACKAGE}" ]
 	then
 		mkdir -p `dirname ${MODULESPACKAGE}`
@@ -221,6 +221,6 @@ determine_real_args() {
 	then
 		INTEGRATED_INITRAMFS=0
 	fi
-	
+
 	get_KV
 }

diff --git a/gen_funcs.sh b/gen_funcs.sh
index a5cd5df..13e57c7 100755
--- a/gen_funcs.sh
+++ b/gen_funcs.sh
@@ -22,7 +22,7 @@ isTrue() {
 	return 1
 }
 
-setColorVars() { 
+setColorVars() {
 if isTrue ${USECOLOR}
 then
 	GOOD=$'\e[32;01m'
@@ -144,7 +144,7 @@ print_info() {
 				DEBUGCACHE="${DEBUGCACHE}${STR}"
 			else
 				echo -ne "${STR}" >> ${LOGFILE}
-			fi	
+			fi
 		else
 			if [ "${TODEBUGCACHE}" = '1' ]; then
 				DEBUGCACHE="${DEBUGCACHE}${STR}"$'\n'
@@ -178,7 +178,7 @@ var_replace()
   # in the later sed expression
   local SAFE_VAR
   SAFE_VAR=`echo "${2}" | sed -e 's/\([\/\.]\)/\\\\\\1/g'`
-  
+
   echo "${3}" | sed -e "s/%%${1}%%/${SAFE_VAR}/g" -
 }
 
@@ -194,7 +194,7 @@ clear_log() {
     if [ -f "${LOGFILE}" ]
     then
 	(echo > "${LOGFILE}") 2>/dev/null || small_die "Genkernel: Could not write to ${LOGFILE}."
-    fi   
+    fi
 }
 
 gen_die() {
@@ -267,7 +267,7 @@ then
 		rm ${TMPDIR}/${i}
 	done
 fi
-}	
+}
 
 #
 # Function to copy various kernel boot image products to the boot directory,

diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 50ddbe5..41c07a6 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -25,7 +25,7 @@ append_base_layout() {
 
 	echo "/dev/ram0     /           ext2    defaults	0 0" > ${TEMP}/initramfs-base-temp/etc/fstab
 	echo "proc          /proc       proc    defaults    0 0" >> ${TEMP}/initramfs-base-temp/etc/fstab
-	
+
 	cd ${TEMP}/initramfs-base-temp/dev
 	mknod -m 660 console c 5 1
 	mknod -m 660 null c 1 3
@@ -61,7 +61,7 @@ append_busybox() {
 		ln -s busybox ${TEMP}/initramfs-busybox-temp/bin/$i ||
 			gen_die "Busybox error: could not link ${i}!"
 	done
-	
+
 	cd "${TEMP}/initramfs-busybox-temp/"
 	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \
 			|| gen_die "compressing busybox cpio"
@@ -174,7 +174,7 @@ append_multipath(){
 			|| gen_die "Could not copy file ${i} for MULTIPATH"
 	done
 
-	if [ -x /sbin/multipath ] 
+	if [ -x /sbin/multipath ]
 	then
 		cp /etc/multipath.conf "${TEMP}/initramfs-multipath-temp/etc/" || gen_die 'could not copy /etc/multipath.conf please check this'
 	fi
@@ -475,12 +475,12 @@ append_modules() {
 	else
 	  cd /
 	fi
-	
+
 	if [ -d "${TEMP}/initramfs-modules-${KV}-temp" ]
 	then
 		rm -r "${TEMP}/initramfs-modules-${KV}-temp/"
 	fi
-	mkdir -p "${TEMP}/initramfs-modules-${KV}-temp/lib/modules/${KV}"	
+	mkdir -p "${TEMP}/initramfs-modules-${KV}-temp/lib/modules/${KV}"
 	for i in `gen_dep_list`
 	do
 		mymod=`find ./lib/modules/${KV} -name "${i}${MOD_EXT}" 2>/dev/null| head -n 1 `
@@ -489,11 +489,11 @@ append_modules() {
 			print_warning 2 "Warning :: ${i}${MOD_EXT} not found; skipping..."
 			continue;
 		fi
-		
+
 		print_info 2 "initramfs: >> Copying ${i}${MOD_EXT}..."
 		cp -ax --parents "${mymod}" "${TEMP}/initramfs-modules-${KV}-temp"
 	done
-	
+
 	cp -ax --parents ./lib/modules/${KV}/modules* ${TEMP}/initramfs-modules-${KV}-temp 2>/dev/null
 
 	mkdir -p "${TEMP}/initramfs-modules-${KV}-temp/etc/modules"
@@ -519,13 +519,13 @@ append_auxilary() {
 	then
 		rm -r "${TEMP}/initramfs-aux-temp/"
 	fi
-	mkdir -p "${TEMP}/initramfs-aux-temp/etc"	
-	mkdir -p "${TEMP}/initramfs-aux-temp/sbin"	
+	mkdir -p "${TEMP}/initramfs-aux-temp/etc"
+	mkdir -p "${TEMP}/initramfs-aux-temp/sbin"
 	if [ -f "${CMD_LINUXRC}" ]
 	then
 		cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init"
 		print_info 2 "        >> Copying user specified linuxrc: ${CMD_LINUXRC} to init"
-	else	
+	else
 		if isTrue ${NETBOOT}
 		then
 			cp "${GK_SHARE}/netboot/linuxrc.x" "${TEMP}/initramfs-aux-temp/init"
@@ -546,12 +546,12 @@ append_auxilary() {
 	# big cpio.
 	cd ${TEMP}/initramfs-aux-temp
 	ln -s init linuxrc
-#	ln ${TEMP}/initramfs-aux-temp/init ${TEMP}/initramfs-aux-temp/linuxrc 
+#	ln ${TEMP}/initramfs-aux-temp/init ${TEMP}/initramfs-aux-temp/linuxrc
 
 	if [ -f "${GK_SHARE}/arch/${ARCH}/initrd.scripts" ]
 	then
 		cp "${GK_SHARE}/arch/${ARCH}/initrd.scripts" "${TEMP}/initramfs-aux-temp/etc/initrd.scripts"
-	else	
+	else
 		cp "${GK_SHARE}/defaults/initrd.scripts" "${TEMP}/initramfs-aux-temp/etc/initrd.scripts"
 	fi
 
@@ -566,13 +566,13 @@ append_auxilary() {
 	then
 		sed -i "s:^REAL_ROOT=.*$:REAL_ROOT='${REAL_ROOT}':" "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"
 	fi
-	
-	echo -n 'HWOPTS="$HWOPTS ' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"	
+
+	echo -n 'HWOPTS="$HWOPTS ' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"
 	for group_modules in ${!MODULES_*}; do
 		group="$(echo $group_modules | cut -d_ -f2 | tr "[:upper:]" "[:lower:]")"
 		echo -n "${group} " >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"
 	done
-	echo '"' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"	
+	echo '"' >> "${TEMP}/initramfs-aux-temp/etc/initrd.defaults"
 
 	if [ -f "${GK_SHARE}/arch/${ARCH}/modprobe" ]
 	then
@@ -607,7 +607,7 @@ append_auxilary() {
 	find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \
 			|| gen_die "compressing auxilary cpio"
 	cd "${TEMP}"
-	rm -r "${TEMP}/initramfs-aux-temp/"	
+	rm -r "${TEMP}/initramfs-aux-temp/"
 }
 
 append_data() {

diff --git a/gen_moddeps.sh b/gen_moddeps.sh
index 5aeb84f..0867b56 100755
--- a/gen_moddeps.sh
+++ b/gen_moddeps.sh
@@ -59,9 +59,9 @@ gen_dep_list()
 	if [ "${ALLRAMDISKMODULES}" = "1" ]; then
 		strip_mod_paths $(find "${INSTALL_MOD_PATH}/lib/modules/${KV}" -name "*$(modules_kext)") | sort
 	else
-		local group_modules	
+		local group_modules
 		rm -f ${TEMP}/moddeps > /dev/null
-	
+
 		for group_modules in ${!MODULES_*}; do
 			gen_deps ${!group_modules}
 		done

diff --git a/gen_package.sh b/gen_package.sh
index a0a6bd0..e7c6142 100755
--- a/gen_package.sh
+++ b/gen_package.sh
@@ -28,7 +28,7 @@ gen_minkernpackage() {
 			cp "${tmp_kernel_binary2}" "${TEMP}/minkernpackage/kernelz-${KV}" || gen_die "Could not copy the kernelz for the min kernel package"
 		fi
 	fi
-	
+
 	if ! isTrue "${INTEGRATED_INITRAMFS}"
 	then
 		[ "${BUILD_RAMDISK}" != '0' ] && { cp "${TMPDIR}/initramfs-${KV}" "${TEMP}/minkernpackage/initramfs-${ARCH}-${KV}" || gen_die 'Could not copy the initramfs for the kernel package!'; }
@@ -40,8 +40,8 @@ gen_minkernpackage() {
 	else
 		cp "${KERNEL_DIR}/System.map" "${TEMP}/minkernpackage/System.map-${ARCH}-${KV}" || gen_die 'Could not copy System.map for the kernel package!';
 	fi
-	
-	cd "${TEMP}/minkernpackage" 
+
+	cd "${TEMP}/minkernpackage"
 	/bin/tar -jcpf ${MINKERNPACKAGE} * || gen_die 'Could not compress the kernel package!'
 	cd "${TEMP}" && rm -rf "${TEMP}/minkernpackage" > /dev/null 2>&1
 }
@@ -84,27 +84,27 @@ gen_kerncache()
 	then
 		cp "${tmp_kernel_binary2}" "${TEMP}/kerncache/kernelz-${ARCH}-${KV}" || gen_die "Could not copy the kernelz for the kernel package"
 	fi
-	
+
 	echo "VERSION = ${VER}" > "${TEMP}/kerncache/kerncache.config"
 	echo "PATCHLEVEL = ${PAT}" >> "${TEMP}/kerncache/kerncache.config"
 	echo "SUBLEVEL = ${SUB}" >> "${TEMP}/kerncache/kerncache.config"
 	echo "EXTRAVERSION = ${EXV}" >> "${TEMP}/kerncache/kerncache.config"
-	
+
 	mkdir -p "${TEMP}/kerncache/lib/modules/"
-	
+
 	if [ -d ${INSTALL_MOD_PATH}/lib/modules/${KV} ]
 	then
 	    cp -r "${INSTALL_MOD_PATH}/lib/modules/${KV}" "${TEMP}/kerncache/lib/modules"
 	fi
-	
-	cd "${TEMP}/kerncache" 
+
+	cd "${TEMP}/kerncache"
 	/bin/tar -jcpf ${KERNCACHE} * || gen_die 'Could not compress the kernel package!'
 	cd "${TEMP}" && rm -rf "${TEMP}/kerncache" > /dev/null 2>&1
 }
 
 gen_kerncache_extract_kernel()
 {
-	/bin/tar -f ${KERNCACHE} -C ${TEMP} -xj 
+	/bin/tar -f ${KERNCACHE} -C ${TEMP} -xj
 	copy_image_with_preserve "kernel" \
 		"${TEMP}/kernel-${ARCH}-${KV}" \
 		"kernel-${KNAME}-${ARCH}-${KV}"
@@ -115,7 +115,7 @@ gen_kerncache_extract_kernel()
 			"${TEMP}/kernelz-${ARCH}-${KV}" \
 			"kernelz-${KNAME}-${ARCH}-${KV}"
 	fi
-    
+
 	copy_image_with_preserve "System.map" \
 		"${TEMP}/System.map-${ARCH}-${KV}" \
 		"System.map-${KNAME}-${ARCH}-${KV}"
@@ -123,7 +123,7 @@ gen_kerncache_extract_kernel()
 
 gen_kerncache_extract_modules()
 {
-        if [ -e "${KERNCACHE}" ] 
+        if [ -e "${KERNCACHE}" ]
 	then
 		print_info 1 'Extracting kerncache kernel modules'
         	if [ "${INSTALL_MOD_PATH}" != '' ]
@@ -137,7 +137,7 @@ gen_kerncache_extract_modules()
 
 gen_kerncache_extract_config()
 {
-	if [ -e "${KERNCACHE}" ] 
+	if [ -e "${KERNCACHE}" ]
 	then
 		print_info 1 'Extracting kerncache config to /etc/kernels'
 		mkdir -p /etc/kernels
@@ -156,13 +156,13 @@ gen_kerncache_is_valid()
 		# Can make this more secure ....
 
 		/bin/tar -xj -f ${KERNCACHE} -C ${TEMP}
-		if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV} ] 
-		then 
+		if [ -e ${TEMP}/config-${ARCH}-${KV} -a -e ${TEMP}/kernel-${ARCH}-${KV} ]
+		then
 			print_info 1 'Valid kernel cache found; no sources will be used'
 			KERNCACHE_IS_VALID=1
 		fi
 	else
-		if [ -e "${KERNCACHE}" ] 
+		if [ -e "${KERNCACHE}" ]
 		then
 			KERNEL_CONFIG="/${KERNEL_DIR}/.config"
 			if [ "${CMD_KERNEL_CONFIG}" != '' ]
@@ -183,7 +183,6 @@ gen_kerncache_is_valid()
 				test2=$(grep -v "^#" ${KERNEL_CONFIG} | md5sum | cut -d " " -f 1)
 				if [ "${test1}" == "${test2}" ]
 				then
-	
 					echo
 					print_info 1 "No kernel configuration change, skipping kernel build..."
 					echo
@@ -192,6 +191,6 @@ gen_kerncache_is_valid()
 			fi
 		fi
 	fi
-	export KERNCACHE_IS_VALID	
+	export KERNCACHE_IS_VALID
 	return 1
 }



             reply	other threads:[~2011-09-13  9:54 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13  9:54 Fabio Erculiani [this message]
  -- strict thread matches above, loose matches on Subject: below --
2020-07-23 23:57 [gentoo-commits] proj/genkernel:master commit in: /, defaults/ Thomas Deutschmann
2019-11-26 13:50 Thomas Deutschmann
2019-07-21 16:26 Thomas Deutschmann
2017-09-04  5:36 Robin H. Johnson
2017-01-08  1:57 Robin H. Johnson
2017-01-07 23:50 Robin H. Johnson
2017-01-02 23:25 Robin H. Johnson
2016-05-16  6:55 Robin H. Johnson
2016-01-05 19:39 Robin H. Johnson
2016-01-05 19:39 Robin H. Johnson
2013-06-06  3:36 [gentoo-commits] proj/genkernel:ryao " Richard Yao
2013-06-03 23:49 ` [gentoo-commits] proj/genkernel:master " Richard Yao
2013-04-25  6:22 Fabio Erculiani
2012-10-16  0:03 Robin H. Johnson
2012-10-03 16:24 Sebastian Pipping
2012-08-30 16:20 Fabio Erculiani
2012-08-12 19:04 Sebastian Pipping
2012-07-24 18:01 Robin H. Johnson
2012-07-24 17:29 Robin H. Johnson
2012-07-24  8:29 Robin H. Johnson
2012-07-19 20:12 Richard Yao
2012-07-09 17:51 Sebastian Pipping
2012-07-08 17:05 Sebastian Pipping
2012-05-17 18:34 Sebastian Pipping
2012-03-17  1:27 Sebastian Pipping
2012-03-17  1:27 Sebastian Pipping
2012-03-17  1:27 Sebastian Pipping
2012-03-17  1:27 Sebastian Pipping
2012-02-20  6:58 Robin H. Johnson
2012-02-09  7:42 Robin H. Johnson
2012-02-06  9:35 Robin H. Johnson
2012-02-06  8:19 Robin H. Johnson
2012-01-14 23:22 Sebastian Pipping
2012-01-13 23:19 Sebastian Pipping
2012-01-13 23:19 Sebastian Pipping
2012-01-06  6:37 Robin H. Johnson
2011-11-08 17:21 Sebastian Pipping
2011-10-08 21:22 Fabio Erculiani
2011-09-11  7:40 Fabio Erculiani
2011-08-30 15:34 Sebastian Pipping
2011-07-27 17:38 Sebastian Pipping
2011-05-31 10:58 Sebastian Pipping

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e50bd01d27fbc3c3be29753f59f6e9608a19312.lxnay@gentoo \
    --to=lxnay@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox