0

I'm following the instructions at http://www.magentocommerce.com/knowledge-base/entry/apply-revert-magento-patches?icid=BLOG_php54_knowledgebase but not getting the listed results. I have 3 sh patches downloaded into my magento root, but when I run them (sh patchname.sh) I immediately get a command prompt again. I'm not getting success or failure. Just a bounce right back to the command prompt. I'm running FreeBSD and the first patch I'm looking at specifies /bin/sh, which does in fact exist. What am I missing here?

edit

I was downloading with IE. On a whim I decided to try Chrome. Appears the line ending handling is different. The Chrome download version gives me:

PATCH_SUPEE-2677_EE_1.13.0.2_v2.sh: 127: not found
PATCH_SUPEE-2677_EE_1.13.0.2_v2.sh: 127: not found
PATCH_SUPEE-2677_EE_1.13.0.2_v2.sh: 0: not found
Checking if patch can be applied/reverted successfully... patch: unrecognized option `--dry-run'
Usage: /usr/bin/patch [options] [origfile [patchfile]] [+[options] [origfile]]...
Options:
[-cCeEflnNRsStuv] [-b backup-ext] [-B backup-prefix] [-d directory]
[-D symbol] [-F max-fuzz] [-i patchfile] [-o out-file] [-p[strip-count]]
[-r rej-name] [-V {numbered,existing,simple}] [--check] [--context]
[--prefix=backup-prefix] [--suffix=backup-ext] [--ifdef=symbol]
[--directory=directory] [--ed] [--fuzz=max-fuzz] [--force] [--batch]
[--ignore-whitespace] [--forward] [--reverse] [--output=out-file]
[--strip[=strip-count]] [--normal] [--reject-file=rej-name] [--skip]
[--remove-empty-files] [--quiet] [--silent] [--unified] [--version]
[--version-control={numbered,existing,simple}] [--index-first]
ERROR: Patch can't be applied/reverted successfully.

Not terribly informative as to why it won't install, but at least it's something more to work with.

9
  • If I recall correctly I just chmod +x them and ./patchname.sh Commented May 9, 2014 at 13:53
  • No go, that just bounces back immediately too. Commented May 9, 2014 at 13:58
  • Try removing the shebang line and passing it to sh Commented May 9, 2014 at 14:01
  • Same results. Very odd, I'd expect to get an error is a required tool was missing. Why I don't get anything at all is baffling. :-/ Commented May 9, 2014 at 14:09
  • Question edited to add data collected. Commented May 9, 2014 at 14:37

1 Answer 1

2

I had to modify the provided patch script. In the _apply_revert_patch() function I had to replace DRY_RUN_FLAG=" --dry-run" with DRY_RUN_FLAG=" --check". After doing so the patch applied normally.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.