Uups! Bad luck again. I don't know if the file is the same for version
4.0.2 and 4.0.2-1, here is what I get now:

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 FAILED at 345.
Hunk #2 succeeded at 385 with fuzz 2.
Hunk #3 FAILED at 457.
2 out of 3 hunks FAILED -- saving rejects to file
/usr/lib/systemimager/perl/SystemImager/UseYourOwnKernel.pm.rej

As I mentioned before, the file I'm trying to patch belongs to the
4.0.2-1package:

golden-client:/usr/lib/systemimager/perl/SystemImager # rpm -qf
UseYourOwnKernel.pm
systemimager-common-4.0.2-1

  Thanks again for helping.

          Jesús .-



On 2/21/08, Andrea Righi <[EMAIL PROTECTED]> wrote:
>
>
> 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
>
-------------------------------------------------------------------------
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

Reply via email to