[imp] which "patch" program to use

Lars Hecking lhecking@nmrc.ucc.ie
Mon, 21 May 2001 17:43:57 +0100


> I have tried different versions of (GNU) patch and every single one seems to
> have trouble with lines consiting only of a "?>".
> 
> Obviously version 2.5.4 seems to be the latest one available from ftp.gnu.org.
 
 I have yet to find anything better than GNU patch. It beast most vendors'
 version hands down.

> $ patch < deletetotrash-2.1.1.patch
> patching file defaults.php3.dist
> patch: **** malformed patch at line 18:  ?>
> 
> $ patch --version
> patch 2.5.4
> 
> $ cat_with_linenumber deletetotrash-2.1.1.patch
> [...]
>      1  diff -urN [...]/defaults.php3.dist [...]/defaults.php3.dist
>      2  --- [...]/defaults.php3.dist   Tue Aug 22 21:57:38 2000
>      3  +++ [...]/defaults.php3.dist Sat Feb 10 11:33:28 2001
>      4  @@ -423,4 +423,13 @@
>      5   // $default->path_to_rpm = '/usr/bin/rpm';
>      6   // $default->path_to_dpkg = '/usr/bin/dpkg';
>      7
>      8  +$default->trash_folder = 'Trash';
>      9  +$default->delete_to_trash = true;
>     10  +$default->user_change_deletetotrash = true;
>     11  +
>     12  +$default->empty_on_exit = true;
>     13  +$default->user_change_emptyonexit = true;
>     14  +
>     15  +$default->expunge_on = 'N';
>     16  +$default->user_change_expungeon = true;
>     17  +
>     18   ?>
           ^^

 Well, the patch file is obviously broken. Was it downloaded from a web
 page, or otherwise converted?