A little question for vBulletin team.
What soft you are using to create patch files (*.diff) to generate patch(*.diff) files?
Today I meet with a problem under FreeBSD using
and geting error:
So I took old blog_admin.php made a new one manually and run
Then I copmared the problem line and found out that your diff has:
And my new has:
As you can notice your diff starts from 245 line.
And that line is empty...
My diff starts from 244 line.
And that line has information.
So I came to conclusion that diff blocks
@@ -245,6 +245,9 @@
must not start from the empty lines...
P.S. I also tried a software from this thread:
How to use Patch files (*.diff) for patching your vBulletin installation
But it also gives me an error...
Patch I used:
/usr/bin/patch -v
Patch version 2.1
So then I go to
/usr/ports/devel/patch
and run 'make'
Copied patch from
/usr/ports/devel/patch/work/patch-2.5.4/
directory to
/usr/local/bin/
/usr/local/bin/patch -v
patch 2.5.4
When I used this patch it patched the file OK.
/usr/local/bin/patch -u /www/blog_admin.php /www/23050.diff
Hope this one can help anyone.
FreeBSD 6.1-RELEASE #2
What soft you are using to create patch files (*.diff) to generate patch(*.diff) files?
Today I meet with a problem under FreeBSD using
Code:
patch -u < ./23050.diff
and geting error:
Code:
Hmm... Looks like a unified diff to me... The text leading up to this was: -------------------------- |Index: /admincp/blog_admin.php |=================================================================== |--- /admincp/blog_admin.php (revision 17990) |+++ /admincp/blog_admin.php (revision 17996) -------------------------- Patching file blog_admin.php using Plan A... [COLOR=red]patch: **** malformed patch at line 6:[/COLOR] Press any key to continue...
Code:
diff -crbBNu blog_admin_old.php blog_admin.php >23050_new.diff
Code:
@@ -245,6 +245,9 @@ // rebuild category counters + $tablename = 'blog_category_count' . $vbulletin->userinfo['userid']; + + $vbulletin->db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "$tablename"); $db->query_write(" - CREATE TEMPORARY TABLE " . TABLE_PREFIX . "blog_category_count + CREATE TABLE " . TABLE_PREFIX . "$tablename ( blogcategoryid INT UNSIGNED NOT NULL DEFAULT '0',
Code:
@@ -244,8 +244,11 @@ $tabletype = (version_compare(MYSQL_VERSION, '4.1', '<')) ? 'HEAP' : 'MEMORY'; // rebuild category counters + $tablename = 'blog_category_count' . $vbulletin->userinfo['userid']; + + $vbulletin->db->query_write("DROP TABLE IF EXISTS " . TABLE_PREFIX . "$tablename"); $db->query_write(" - CREATE TEMPORARY TABLE " . TABLE_PREFIX . "blog_category_count + CREATE TABLE " . TABLE_PREFIX . "$tablename ( blogcategoryid INT UNSIGNED NOT NULL DEFAULT '0', total INT UNSIGNED NOT NULL DEFAULT '0',
And that line is empty...
My diff starts from 244 line.
And that line has information.
So I came to conclusion that diff blocks
@@ -245,6 +245,9 @@
must not start from the empty lines...
P.S. I also tried a software from this thread:
How to use Patch files (*.diff) for patching your vBulletin installation
But it also gives me an error...
Patch I used:
/usr/bin/patch -v
Patch version 2.1
So then I go to
/usr/ports/devel/patch
and run 'make'
Copied patch from
/usr/ports/devel/patch/work/patch-2.5.4/
directory to
/usr/local/bin/
/usr/local/bin/patch -v
patch 2.5.4
When I used this patch it patched the file OK.
/usr/local/bin/patch -u /www/blog_admin.php /www/23050.diff
Hope this one can help anyone.
FreeBSD 6.1-RELEASE #2
Comment