[comp.lang.perl] Perl Patches Applied

stevej@synopsys.synopsys.com (Steven Jukoff) (06/29/90)

I received and attempted to apply all 18 patches at once.
In the directory containing Perl source I tried:

foreach i (patch*)
	patch < $i
end


I get: 

[Stuff deleted...]
Hmm...  The next patch looks like a new-style context diff to me...
The text leading up to this was:
--------------------------
|
|Index: t/op.sort
|Prereq: 3.0
|*** t/op.sort.old      Thu Oct 26 23:31:20 1989
|--- t/op.sort  Thu Oct 26 23:31:21 1989
--------------------------
File to patch:

...and waits for input. 
What other answer is there besides the name after "Index:" ?
In all cases I put the name given after "Index:"

How do I know what patchlevel I am at?
% cat patchlevel.h
#define PATCHLEVEL 1

Shouldn't this be 18 after the above procedure?


If I subsequently try 'patch -f' I expect something like
"patch applied".  But it runs all the patches again.
Eventually I get an error:

|Index: t/op.dbm
|Prereq: 3.0
|*** t/op.dbm.old       Tue Mar 27 16:43:24 1990
|--- t/op.dbm   Tue Mar 27 16:43:25 1990
--------------------------
No file to patch.  Skipping...
Can't find  t/op.dbm.             (...and it terminates)

% ls t/op.dbm
t/op.dbm

'ls' finds it.  Why do I get this error?

% cat patchlevel.h 
#define PATCHLEVEL 18

Do I really have all 18 patches applied even though I got
"Can't find  t/op.dbm" error?

If you have experience with this please help.

Steven Jukoff,             Phone: (415)962-5407
Synopsys, Inc.             FAX:   (415)965-8637
1098 Alta Ave              DDN:   stevej@synopsys.com
Mountain View, CA 94043    UUCP:  ..!uunet!fernwood!synopsys!stevej

lwall@jpl-devvax.JPL.NASA.GOV (Larry Wall) (06/29/90)

In article <540@synopsys.COM> stevej@synopsys.synopsys.com (Steven Jukoff) writes:
: I received and attempted to apply all 18 patches at once.
: In the directory containing Perl source I tried:
: 
: foreach i (patch*)
: 	patch < $i
: end

That won't work for two reasons.  First, you didn't invoke patch with
the switches indicated in the directions.  Second, if your files are
named patch1 .. patch18, you're going to apply them in lexicographic
order rather than numeric.  You wanted

    foreach i (patch? patch??)
	    patch -p -N < $i
    end

The -p tells it to use the full pathnames instead of assuming everything
is in the current directory.  The -N says to assume that no patches are
reversed.  You might be able to get away without the -N, but the -p is
essential.

By now your kits are probably mangled, and you'll have to start with
fresh kits.

Larry

kgallagh@digi.lonestar.org (Kevin Gallagher) (06/30/90)

In article <540@synopsys.COM> stevej@synopsys.synopsys.com (Steven Jukoff) writes:
>I received and attempted to apply all 18 patches at once.
>I get:
>[stuff deleted]
>|*** t/op.sort.old      Thu Oct 26 23:31:20 1989
>|--- t/op.sort  Thu Oct 26 23:31:21 1989
>--------------------------
>File to patch:
>
If you look into the headers of each patch file you will note that they
contain instructions for installing each patch.  In particular, you need to
invoke patch with the option -p0.  

If you follow the instructions, you will have no problems.

But I would advise you not to try to install patch n+1 without first examining
the output of installing patch n.  

Good luck.
-- 
----------------------------------------------------------------------------
Kevin Gallagher        texbell!digi!kgallagh  OR  kgallagh@digi.UUCP
                                OR  kgallagh@digi.lonestar.org
----------------------------------------------------------------------------