When I run a patch it fails on one of the files. I would like to remove the respective line from the patch.x.x.x.sh so everything else is being patched except this file.

Hope someone can explain the procedure.

For example, I am trying to apply Patch SUPEE-10336 and get error:

[http]$ bash PATCH_SUPEE-10336_CE_1.9.2.4_v1.sh
Checking if patch can be applied/reverted successfully...
ERROR: Patch can't be applied/reverted successfully.

patching file app/code/core/Mage/Usa/Model/Shipping/Carrier/Usps.php
patching file app/locale/en_US/Mage_Usa.csv
Hunk #1 FAILED at 99.
1 out of 1 hunk FAILED -- saving rejects to file app/locale/en_US/Mage_Usa.csv.rej

I would like to edit the PATCH_SUPEE-10336_CE_1.9.2.4_v1.sh so I remove the line from the patch that's responsible for this file.


I can't see anyone interested in this question but I thought I post the answer to it anyway.

If you open the patch in any text editor, and find the section __PATCHFILE_FOLLOWS__ that's where the files are being merged using diff command. In make case it was the `Mage_Usa.csv" file was causing the problem so I found the part of the patch responsible for this file:

diff --git app/locale/en_US/Mage_Usa.csv app/locale/en_US/Mage_Usa.csv
index 072170d..5e8f844 100644
--- app/locale/en_US/Mage_Usa.csv
+++ app/locale/en_US/Mage_Usa.csv
@@ -99,7 +99,7 @@
 "First-Class Mail Large Envelope","First-Class Mail Large Envelope"
 "First-Class Mail Large Postcards","First-Class Mail Large Postcards"
 "First-Class Mail Letter","First-Class Mail Letter"
-"First-Class Mail Parcel","First-Class Mail Parcel"
+"First-Class Package Service - Retail","First-Class Package Service - Retail"
 "First-Class Mail Postcards","First-Class Mail Postcards"
 "First-Class Package International Service","First-Class Package International Service"
 "First-Class Package Service","First-Class Package Service"

I have deleted this whole section of the patch and re-run it is SSH.

This time:

[http]$ bash PATCH_SUPEE-10336_CE_1.9.2.4_v1.sh
Checking if patch can be applied/reverted successfully...
Patch was applied/reverted successfully.

I have manually changed the USPS names in file Mage_Usa.csv (The part of the patch that I deleted).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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