Find the answer to your Linux question:
Results 1 to 4 of 4
I try to use a patch /diff for a linux graphics program. The patch file was obtained from Googlegroups. Unfortunately the patch failed (3 hunks). Apparently googlegroups add several "carriage ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Oct 2004
    Posts
    114

    Smile Failed Patch/Diff File From Googlegroups


    I try to use a patch /diff for a linux graphics program.
    The patch file was obtained from Googlegroups. Unfortunately the patch failed (3 hunks).

    Apparently googlegroups add several "carriage return" (ASCII 13) to diff / patch files.

    I edited the files and delete all "carriage return" characters.
    The patch work perfectly.

    Is it better to use GZ or ZIP file format for uploading patch to googlegroups?

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    What is the extension of the patch you downloaded? For gziped patches, you should do
    Code:
    patch -p0 / -p1 < zcat [patch]
    For bzip2ed patches, it is
    Code:
    patch -p0 / - p1 | bzcat [patch]
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    That's not quite true. Rather, it should be:
    Code:
    zcat patch.gz | patch -pwhatever
    Same for bzcat.

    However, that doesn't even seem to be the problem. I'm quite puzzled by the problem. It is indeed standard procedure to add carriage returns to text/* MIME types when they enter any mail-like system (include Usenet). However, they should be converted back when they are downloaded. I can only guess that you downloaded it using a web browser, and not some mail client, is that right?

    If you experience this problem often, you can use the dos2unix program to automatically remove the carriage returns.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    Yeah I'm sorry . Not redirection but piping, and reverse order...
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •