From 505cb92dc6579889be403db02f7d388506e17de9 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Thu, 21 Jun 2007 20:17:24 +0000 Subject: [PATCH] Added two patches from John R. Graham from bug #180161. This should fix bug #180161, bug #144703, and bug #150697. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/genkernel/trunk@515 67a159dc-881f-0410-a524-ba9dfbe2cb84 --- ChangeLog | 5 +++++ gen_determineargs.sh | 9 ++++++++- gen_funcs.sh | 26 ++++++++++++++------------ genkernel | 6 +++++- genkernel.8 | 6 ++++-- genkernel.conf | 11 +++++++++++ 6 files changed, 47 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9128ebd..ccbb625 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,11 @@ # Copyright 2006-2007 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 21 Jun 2007; Chris Gianelloni gen_determineargs.sh, + gen_funcs.sh, genkernel, genkernel.8, genkernel.conf: + Added two patches from John R. Graham from + bug #180161. This should fix bug #180161, bug #144703, and bug #150697. + 21 Jun 2007; Chris Gianelloni x86/kernel-config-2.6: Added USB Printer support for bug #176543. diff --git a/gen_determineargs.sh b/gen_determineargs.sh index 072ec2b..02042c1 100644 --- a/gen_determineargs.sh +++ b/gen_determineargs.sh @@ -274,10 +274,12 @@ determine_real_args() { then MRPROPER="${CMD_MRPROPER}" fi + if [ "${CMD_MENUCONFIG}" != '' ] then MENUCONFIG="${CMD_MENUCONFIG}" fi + if [ "${CMD_CLEAN}" != '' ] then CLEAN="${CMD_CLEAN}" @@ -391,7 +393,12 @@ determine_real_args() { fi fi - if isTrue "${CMD_OLDCONFIG}" + if [ "${CMD_OLDCONFIG}" != '' ] + then + OLDCONFIG="${CMD_OLDCONFIG}" + fi + + if isTrue "${OLDCONFIG}" then OLDCONFIG=1 else diff --git a/gen_funcs.sh b/gen_funcs.sh index f869a78..480cc15 100755 --- a/gen_funcs.sh +++ b/gen_funcs.sh @@ -373,22 +373,24 @@ copy_image_with_preserve() { fi # We only erase the old image when it is the exact same version as the - # current image. Different version old images are left behind. This is - # consistent with how "make install" of the manual kernel build works. - if [ "${currDestImage}.old" == "${prevDestImage}" ] + # current and new images. Different version old images are left behind. + # This is consistent with how "make install" of the manual kernel build + # works. + if [ "${currDestImage}" == "${fullDestName}" -a \ + "${prevDestImage}" == "${currDestImage}.old" ] then # - # Case for current / old of the same base version. + # Case for new, currrent, and old of the same base version. # print_info 5 " Same base version. May have to delete old image to make room." - if [ "${prevDestImageExists}" -eq '1' ] - then - print_info 5 " Deleting old identical version ${symlinkName}." - rm -f "${BOOTDIR}/${prevDestImage}" - fi - if [ "${currDestImageExists}" -eq '1' ] + if [ "${currDestImageExists}" -eq '1' ] then + if [ "${prevDestImageExists}" -eq '1' ] + then + print_info 5 " Deleting old identical version ${symlinkName}." + rm -f "${BOOTDIR}/${prevDestImage}" + fi print_info 5 " Moving ${BOOTDIR}/${currDestImage}" print_info 5 " to ${BOOTDIR}/${currDestImage}.old" mv "${BOOTDIR}/${currDestImage}" "${BOOTDIR}/${currDestImage}.old" || @@ -398,12 +400,12 @@ copy_image_with_preserve() { # # Case for current / old not of the same base version. # - print_info 5 " Different base version. Do not delete old iamges." + print_info 5 " Different base version. Do not delete old images." if [ "${currDestImageExists}" -eq 1 ] then prevDestImage="${currDestImage}" - currDestImage="${fullDestName}" fi + currDestImage="${fullDestName}" fi print_info 5 " Copying ${symlinkName}: ${newSrceImage}" diff --git a/genkernel b/genkernel index 0922a97..4b45e32 100755 --- a/genkernel +++ b/genkernel @@ -4,8 +4,10 @@ PATH="/bin:/usr/bin:/sbin:/usr/sbin" GK_V='3.4.8' +# Set the default for TMPDIR. May be modified by genkernel.conf or the +# --tempdir command line option. TMPDIR='/var/tmp/genkernel' -TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$ + TODEBUGCACHE=1 # Until an error occurs or DEBUGFILE is fully qualified. small_die() { @@ -26,6 +28,8 @@ source ${GK_BIN}/gen_moddeps.sh || gen_die "Could not read ${GK_BIN}/gen_moddeps source ${GK_BIN}/gen_package.sh || gen_die "Could not read ${GK_BIN}/gen_package.sh" source ${GK_BIN}/gen_bootloader.sh || gen_die "Could not read ${GK_BIN}/gen_bootloader.sh" +TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$ + trap_cleanup(){ # Call exit code of 1 for failure cleanup diff --git a/genkernel.8 b/genkernel.8 index ccb081d..2d83bb4 100644 --- a/genkernel.8 +++ b/genkernel.8 @@ -55,8 +55,7 @@ to 0, minimal debugging is done; if this is set to 5 as much output as possible is given. .TP \fB\-\-debugfile=\fR -This outputs full debugging data; regardless of --debuglevel to the file -. By default this is +This outputs debugging data to the file . By default this is .I /var/log/genkernel.log\fR. .TP \fB\-\-\fR[no\-]\fBcolor\fR @@ -227,6 +226,9 @@ Use for the linuxrc instead of the genkernel linuxrc. \fB\-\-arch\-override=\fR Force the architecture settings described by the profile instead of autodetecting the running architecture. +.TP +\fB\-\-tempdir=\fR +Sets genkernel's temporary working directory to . .PP .BR Output \ Settings .TP diff --git a/genkernel.conf b/genkernel.conf index be1d1c3..546d606 100755 --- a/genkernel.conf +++ b/genkernel.conf @@ -2,6 +2,11 @@ # ===========GENKERNEL BASIC CONFIGURATION============= +# Run 'make oldconfig' before compiling this kernel? +# If set to "yes", also suppresses the fetch of the kernel .config file from +# /etc/kernels, thus preserving the .config file in /usr/src/linux. +# OLDCONFIG="no" + # Run 'make menuconfig' before compiling this kernel? MENUCONFIG="no" @@ -23,6 +28,9 @@ BOOTSPLASH="yes" # Mount BOOTDIR automatically if it isn't mounted? MOUNTBOOT="yes" +# Make symlinks in BOOTDIR automatically? +# SYMLINK="no" + # Save the new configuration in /etc/kernels upon # successfull compilation SAVE_CONFIG="yes" @@ -48,6 +56,9 @@ USECOLOR="yes" # %%ARCH%% - Final determined architecture # %%CACHE%% - Final determined cache location +# Set genkernel's temporary work directory. Default is /var/tmp/genkernel +# TMPDIR="/var/tmp/genkernel" + # Set the boot directory, default is /boot #BOOTDIR="/boot" -- 2.26.2