Tags:
create new tag
, view all tags
I can't get patch to work on ANY patches. patch constantly complains...
  • "can't find file to patch at line whatever... perhaps you used the wrong --strip arguments"

I've tried all kinds of different settings, but without any success. What are the correct command-line options for patch? From which directory should I run patch?

I'm using http://unxutils.sourceforge.net and Win XP Pro.

Question

  • TWiki version:
  • Perl version:
  • Web server & version:
  • Server OS: Windows XP
  • Web browser & version:
  • Client OS:

-- LeeBottemiller - 15 Mar 2003

Answer

It's important to run the patch program from the proper directory (use the command line!) and to use the correct "-p" option.

If you look inside a patch, you'll see that it has a diff commandline giving 2 filenames. There must be a file matching either of those names for patch to know what to do. E.g., you might see bin/register.orig and bin/register. In that case, running patch from the main TWiki dir with -p0 or no -p at all, or running it from the bin directory with -p1 (assuming no patched files in other subdirectories) will wolk.

On the other hand, if you see twiki/bin/register and patchedtwiki/bin/register or something similar, you will need -p1 for the patch to work if you run the program from the main TWiki directory.

I hope that was clear enough.

-- WalterMundt - 16 Mar 2003

I think we should standardise that all patch files include the path from the TWiki Base directory - its just too complicated to do anything different. If people have altered their configuration from the default then they are capable of making corresponding adjustments when patching files.

-- MartinCleaver - 30 Mar 2003

Topic revision: r4 - 2003-03-30 - MartinCleaver
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.