patching phpBB2.01 to 2.02 - assertion failure

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
User avatar
BarryMoore
Registered User
Posts: 52
Joined: Thu Dec 20, 2001 4:37 pm
Location: UK

patching phpBB2.01 to 2.02 - assertion failure

Post by BarryMoore »

Hi,

I have a modified phpBB2.0.0 which I want to update to 2.0.2.

I've downloaded the patch file and also following information found in these forums UnixUtils so that I can update it on my local Windows machine and then FTP the updated files.

Using the patch to 2.0.1 was successfull - I had a few rej files which I then manually altered, ran the update_to_201.php file and everything seems to be fine. I assumed that a similar process would get me from 2.0.1 to 2.0.2 but I keep getting the following error:

Code: Select all

C:\My Documents\phpBB2>patch -p0 < phpBB-2.0.2-update.patch
patching file `install.php'
Assertion failed: hunk, file patch.c, line 321

abnormal program termination
I was wondering if anyone with any experience of patch or UnixUtils could point me in the direction of what might be causing the problem. I've checked that I'm using the right command. I though the patch file might have been corrupt during download so have tried that again. I've tried this on Win95 and 98 (don't have easy access to anything newer) - could anyone confirm whether they've been able to update using this method on either of these versions of Windows or do I need something like ME or XP?
User avatar
primedomain
Former Team Member
Posts: 25944
Joined: Sat Dec 15, 2001 10:23 am

Post by primedomain »

I would suggest to delete install.php before running the patch. It does not really make sense anyway to patch install.php. Maybe it works then...
User avatar
BarryMoore
Registered User
Posts: 52
Joined: Thu Dec 20, 2001 4:37 pm
Location: UK

Post by BarryMoore »

Thanks.

I too thought it was strange to be updating the install so as a temporary thing to see if I could get anything to work I had already tried deleting that first section from the patch file. I got the same error message just regarding the login.php file this time which is the next one in the patch file.

I think that should have the same overall effect as your suggestion but I've got everything back to how it was, removed the install.php, and tried running the patch again. I get a few more errors regarding the install.php but I think these are basically because it cannot find the file now, and then again I get the assertion failure for the next file - login.php.

The error message indicates patch.c line 321 again so although I'm a bit out of my depth I'm thinking this must be a problem with the patch.exe from UnixUtils rather than the patch itself. Does that sound logical? But then why did it work going from 2.0.0 to 2.0.1 but won't work from 2.0.1 to 2.0.2?
MrTan
Registered User
Posts: 4
Joined: Wed Aug 14, 2002 1:19 am
Location: localhost

Post by MrTan »

I also tried using the UnixUtils version of patch and experienced the same results. After reading the comments posted here I went on a mission to find a port of patch which actually works. After quite some time I found a reference to this version of patch on this site.

I've just run the 2.0.2 patch against my 2.0.1 installation and found that this version of the patch program actually produces <filename>.orij and <filename>.rej for hunks it can't process.

As I said, I'm in the middle of applying the hunk rejections (.rej) so I'll let you know if I run into any problems. :D
User avatar
BarryMoore
Registered User
Posts: 52
Joined: Thu Dec 20, 2001 4:37 pm
Location: UK

Post by BarryMoore »

Excellent, thanks for that MrTan.

Haven't had a chance to check everything yet (I'll have to do that later today) but that version of patch certainly seems to work - at least I get some output this time and a cursory glance looks very promising. Just wanted to post quickly to confirm that this version of patch.exe (169k dated 30 April 2002) rather than the other one mentioned elsewhere on the forums seems to have fixed the problem with an assertion failure when going from 2.0.2 to 2.0.2

Thanks again for the help.
User avatar
BarryMoore
Registered User
Posts: 52
Joined: Thu Dec 20, 2001 4:37 pm
Location: UK

Post by BarryMoore »

OK, I got my other stuff out of the way and have now gone back to this and now have my board running 2.0.2 :P

So thanks again to MrTan - and for anyone else having problems with running the patch on a Windows machine, if it doesn't work as it should then try a different version of patch.exe
webgp
Registered User
Posts: 27
Joined: Sun Feb 17, 2002 12:44 am

Post by webgp »

I think that there is a problem with patch with windows maybe because it’s saved as unix format, I do not know, but I open the patch with a text editor and copy the text to a new file and saved as DOS/Windows format and the patch file worked with unixutils program.

Try to use --dry-run option of patch program to preview the results of the patch ,

patch --dry-run -p0 < phpBB-2.0.2-update.patch

The --dry-run option DO NOT actually change any files; just print what would happen. I think this command is useful to test the patch program.

I thinking about the use of “--ignore-whitespace” option , my board have some mods applied and this option give fewer rej files.

You can try this option to see is useful to you using the command

patch --dry-run --ignore-whitespace -p0 < phpBB-2.0.2-update.patch

This command just show the results of patch program and do not change any file.
User avatar
BarryMoore
Registered User
Posts: 52
Joined: Thu Dec 20, 2001 4:37 pm
Location: UK

Post by BarryMoore »

Thanks for the tips. I'll try them on the next update.
Locked

Return to “2.0.x Support Forum”