|
From: Serge L. <fi...@in...> - 2007-12-03 07:44:26
|
Heiko,
I'm sorry for delay - I forgot to pay the bill and ISP blocked my account from
December, 1... :-\
Heiko Zuerker wrote:
> I like it, then we don't have to download that huge kernel tarball every
> time.
It's the first good news for me today :-)
> It may also work if you use the $KERNELVERSION variable (may be spelled a
> little different) for the filename, then we don't need the separate
> folder.
> Something like:
> bzcat $DL_DIR/srv/patch-$KERNELVERSION.bz2 | patch -p1 || exit 1
:-) I tried to do that.
To define filename for the file I should know minor version of the kernel patch
or add asterisk as a mask. I mean KERNELVERSION returns 2.6.23 (in my case) but
the patch has name patch-KERNELVERSION.MINOR_VERSION.bz2 (2.6.23.9). If I use
the pattern patch-KERNELVERSION.*.bz2 I get false positive, so I have to make
the pattern narrower...
'man bash' helps me :-) and I've created the next variant:
===================================================================
RCS file: /cvsroot/devil-linux/build/scripts/prepare,v
retrieving revision 1.69
diff -u -r1.69 prepare
--- scripts/prepare 22 Oct 2007 14:08:51 -0000 1.69
+++ scripts/prepare 1 Dec 2007 11:54:19 -0000
@@ -40,6 +40,18 @@
exit 1
fi
+# We are applying minor version kernel patch here
+ pushd $KERNELDIR > /dev/null
+ if [ ! -f .minor_version_patch.done ]; then
+ shopt -s extglob
+ for i in $(ls ../../src/patch-$KERNELVERSION.+([[:digit:]]).bz2)
+ do
+ bzcat $i | patch -p1 || exit 1
+ done
+ touch .minor_version_patch.done
+ popd > /dev/null
+ fi
+
# let's find out if we force the usage of old kernel include files
# this is sometimes necessary, when they change too much in the new kernel
KERN_INC=$(find_src_dir kernel-includes)
--
Sincerely,
Serge Leschinsky
|