aMule 22.3 porting - some questions

Torfinn Ingolfsen tingox at gmail.com
Tue Dec 30 18:27:48 UTC 2008


Hello,

On Tue, Dec 30, 2008 at 6:55 PM, Dmitry Marakasov <amdmi3 at amdmi3.ru> wrote:
> But I assume what you need is -r option for diff - it compares 2
> directories recursively, processing all changes as well as new and
> removed files correctly.

I actually tried with the -r option to diff after sending mail to this
list. But it seems like -r on it's own isn't enough, I also need patch
with the -E argument.
I created the attached patch with diff -ruN ...

when I try patch without '-E':

root at kg-vm# patch -C -p1 < /home/tingo/work/amule/amule2-3.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/Makefile amule2/Makefile
|--- amule2.org/Makefile	2008-08-21 08:18:04.000000000 +0200
|+++ amule2/Makefile	2008-12-29 21:18:08.000000000 +0100
--------------------------
Patching file Makefile using Plan A...
Hunk #1 succeeded at 6.
Hunk #2 succeeded at 45 (offset 1 line).
Hunk #3 succeeded at 121 (offset 1 line).
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/Makefile.man amule2/Makefile.man
|--- amule2.org/Makefile.man	2006-01-04 06:59:25.000000000 +0100
|+++ amule2/Makefile.man	2008-12-29 20:51:00.000000000 +0100
--------------------------
Patching file Makefile.man using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 20.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/distinfo amule2/distinfo
|--- amule2.org/distinfo	2007-01-12 18:18:48.000000000 +0100
|+++ amule2/distinfo	2008-12-29 20:43:48.000000000 +0100
--------------------------
Patching file distinfo using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/files/patch-amuleDlg.cpp amule2/files/patch-amuleDlg.cpp
|--- amule2.org/files/patch-amuleDlg.cpp	2006-01-04 06:59:25.000000000 +0100
|+++ amule2/files/patch-amuleDlg.cpp	1970-01-01 01:00:00.000000000 +0100
--------------------------
Patching file files/patch-amuleDlg.cpp using Plan A...
Hunk #1 failed at 0.
1 out of 1 hunks failed--saving rejects to files/patch-amuleDlg.cpp.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/pkg-plist amule2/pkg-plist
|--- amule2.org/pkg-plist	2007-10-25 01:36:24.000000000 +0200
|+++ amule2/pkg-plist	2008-12-29 22:24:25.000000000 +0100
--------------------------
Patching file pkg-plist using Plan A...
Hunk #1 succeeded at 39.
done

Looks like it doesn't remove the file.
Next try - now with '-E':
root at kg-vm# patch -C -Ep1 < /home/tingo/work/amule/amule2-3.diff
Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/Makefile amule2/Makefile
|--- amule2.org/Makefile	2008-08-21 08:18:04.000000000 +0200
|+++ amule2/Makefile	2008-12-29 21:18:08.000000000 +0100
--------------------------
Patching file Makefile using Plan A...
Hunk #1 succeeded at 6.
Hunk #2 succeeded at 45 (offset 1 line).
Hunk #3 succeeded at 121 (offset 1 line).
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/Makefile.man amule2/Makefile.man
|--- amule2.org/Makefile.man	2006-01-04 06:59:25.000000000 +0100
|+++ amule2/Makefile.man	2008-12-29 20:51:00.000000000 +0100
--------------------------
Patching file Makefile.man using Plan A...
Hunk #1 succeeded at 1.
Hunk #2 succeeded at 20.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/distinfo amule2/distinfo
|--- amule2.org/distinfo	2007-01-12 18:18:48.000000000 +0100
|+++ amule2/distinfo	2008-12-29 20:43:48.000000000 +0100
--------------------------
Patching file distinfo using Plan A...
Hunk #1 succeeded at 1.
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/files/patch-amuleDlg.cpp amule2/files/patch-amuleDlg.cpp
|--- amule2.org/files/patch-amuleDlg.cpp	2006-01-04 06:59:25.000000000 +0100
|+++ amule2/files/patch-amuleDlg.cpp	1970-01-01 01:00:00.000000000 +0100
--------------------------
Patching file files/patch-amuleDlg.cpp using Plan A...
Hunk #1 failed at 0.
Removing files/patch-amuleDlg.cpp (empty after patching).
1 out of 1 hunks failed--saving rejects to files/patch-amuleDlg.cpp.rej
Hmm...  The next patch looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN amule2.org/pkg-plist amule2/pkg-plist
|--- amule2.org/pkg-plist	2007-10-25 01:36:24.000000000 +0200
|+++ amule2/pkg-plist	2008-12-29 22:24:25.000000000 +0100
--------------------------
Patching file pkg-plist using Plan A...
Hunk #1 succeeded at 39.
done

It stills says "hunk failed" but now it removes the empty file.
So this is good then?

Thanks for your feedback, helpful as always.
-- 
Regards,
Torfinn Ingolfsen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: amule2-3.diff
Type: text/x-diff
Size: 5545 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20081230/5669ba64/amule2-3.bin


More information about the freebsd-ports mailing list