Kevin Brosius on Mon, 29 Apr 2002 16:04:53 -0400


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] kernel patching


Paul wrote:
> 
> Actually, it makes sense that a patch can be reversed because the diff
> (patch file) shows both the old code and the new code.  I questioned
> it because the my Red Hat 6 book stated that a kernel patch could not
> be undone.  Either it is wrong or things have changed.

Depends on if that's all they said.  As far as I know, you can always
reverse a single patch (to one file, or, like in the case of the kernel,
one kernel version.)  However, if you apply multiple patches:

2.4.1
2.4.2
2.4.3

such that your kernel tree is now 2.4.3, you might be able to reverse
the 2.4.1->2.4.2 patch (ignoring for the moment you shouldn't want to do
this!).  But generally I'd expect this to fail.  And you would no longer
have a released version of the kernel tree.

You can apply the patches in reverse order, using patch -r, to get back
to the 2.4.1 kernel. ie.

2.4.3
2.4.2
2.4.1

(So you are reversing the patches, as well as applying them in
reverse.)  If the Red Hat book says you can't do this, then I'd say they
are wrong.  Unless they meant rpm patch updates.  It's possible that rpm
would run pre- or post- scripts which would make the update process
irreversible on a Red Hat system.

-- 
Kevin Brosius

______________________________________________________________________
Philadelphia Linux Users Group       -      http://www.phillylinux.org
Announcements-http://lists.phillylinux.org/mail/listinfo/plug-announce
General Discussion  -  http://lists.phillylinux.org/mail/listinfo/plug