Jesús Sánchez González wrote:
>
> It is the first time I try to install a patch and it was unsuccessful.
> I did what you wrote in another post, first I copied the patch (from
> 'Index' to the end) into the file
> fix-prepareclient-with-custom-kernel-openSUSE10.3.patch and then I
> tested the patch. Here is the output:
>
> golden-client:/usr/lib/systemimager/perl/SystemImager # patch -p0
> --dry-run < fix-prepareclient-with-custom-kernel-openSUSE10.3.patch
> patching file /usr/lib/systemimager/perl/SystemImager/UseYourOwnKernel.pm
> Hunk #1 succeeded at 373 with fuzz 2 (offset -12 lines).
> Hunk #2 FAILED at 445.
> 1 out of 2 hunks FAILED -- saving rejects to file
> /usr/lib/systemimager/perl/SystemImager/UseYourOwnKernel.pm.rej
> golden-client:/usr/lib/systemimager/perl/SystemImager #
>
> I don't know what's wrong, but it seems that the patch cannot be
> applied correctly :(
>
> Is there any other way to get the latest revision of
> UseYourOwnKernel.pm directly from the repository?
>
> Thanks for helping.
>
> jesus .-
The previous patch was based on the developers' trunk. Following there's
a patch based on 4.0.2. You should be able to apply this cleanly.
-Andrea
---
Index: /usr/lib/systemimager/perl/SystemImager/UseYourOwnKernel.pm
===================================================================
--- /usr/lib/systemimager/perl/SystemImager/UseYourOwnKernel.pm (revision 4382)
+++ /usr/lib/systemimager/perl/SystemImager/UseYourOwnKernel.pm (working copy)
@@ -345,18 +345,30 @@
#
# and not a directory
if( -d $file ) { return undef; }
+ #
+ # skip symlinks
+ if( -l $file ) { return undef; }
+ #
+ # skip .bak files
+ if( $file =~ /\.bak$/ ) { return undef; }
+ #
+ # eliminate vmlinux files on RH
+ if( $file =~ m/^vmlinux$/ ) { return undef; }
+ #
+ # eliminate ramdisks
+ if( $file =~ m/initrd/ ) { return undef; }
+ #
+ # eliminate memtest
+ if( $file =~ m/^memtest/ ) { return undef; }
+ #
+ # eliminate message
+ if( $file =~ m/^message/ ) { return undef; }
#
# Get output from "file" for elimination by identification tests
- my $cmd = "file -b $file";
+ my $cmd = "file -bz $file";
open(INPUT,"$cmd|") or die("Couldn't run $cmd to get INPUT");
my ($input) = (<INPUT>);
- #
- # eliminate vmlinux files on RH
- if( $input =~ m/ELF (32|64)-bit LSB executable,/ ) { return
undef; }
- #
- # eliminate compressed data (eg. ramdisk)
- if( $input =~ m/gzip compressed data,/ ) { return undef; }
# eliminate cpio archives (eg. ramdisk)
if( $input =~ m/cpio archive/ ) { return undef; }
# eliminate cramfs files (eg. ramdisk)
@@ -373,7 +385,7 @@
# Usage:
# my $kernel_file = _choose_kernel_file( $uname_r, $image_dir );
#
-sub _choose_kernel_file($) {
+sub _choose_kernel_file($$) {
my $uname_r = shift;
my $image_dir = shift;
@@ -445,8 +457,20 @@
# 2.4.24 ([EMAIL PROTECTED]) #2 Fri Jan 16 19:51:43 CST
2004^
# 2.4.19-mantis-2002.11.20 ([EMAIL PROTECTED]) #6 Tue
Nov 19 15:15:43 CST 2002
# 2.6.7-1-686 ([EMAIL PROTECTED]) #1 Thu Jul 8 05:36:53
EDT 2004
+ # 2.6.22.5-31-default ([EMAIL PROTECTED]) #1 SMP
2007/09/21 22:29:00 UTC
#
- my $regex = '(2\.[46]\.\d[^\/]*?) \([EMAIL PROTECTED])
[#]\d+.*\w{3} \w{3} \d{1,2} \d{2}:\d{2}:\d{2} \w{3,4} \d{4}';
+ my $regex =
+ # | kernel version + build machine
+ # `---------------------------------------
+ '(2\.[46]\.\d[^\/]*?) \([EMAIL PROTECTED])
[#]\d+.*' .
+ #
+ # | build date
+ # `---------------------------------------
+ '(\w{3} \w{3} \d{1,2}|\d{4}\/\d{2}\/\d{2}) '.
+ #
+ # | build time
+ # `---------------------------------------
+ '\d{2}:\d{2}:\d{2} \w{3,4}( \d{4})?';
while(<IN>) {
# extract the `uname -r` string from the kernel file
if(m/$regex/o) {
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
sisuite-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sisuite-users