Never save something for a special occasion. Every day in your life is a special occasion.
分类: 其他平台
2014-03-07 18:50:59
在使用过程中,通常会出现对某个文件patch失败的问题,打完补丁后,需要检查一下有没有拒绝执行的文件,即检查.rej文件的存在。
使用命令:
$find . -name *.rej
如果发现,会将其输出。
If patch failed to apply a patch completely it will save the rejected
hunks in a file called "
that couldn't be patched. The most likely reason for that is that
you have modified "
made between the different releases.
However, not everything is lost now. You can inspect "
try to apply the patch manually. The .rej files are regular patches
and look like this (MiNTLib patches are always in unified format):
#######################
### FROMLINE,TOLINE ###
context line
context line
- line to remove
- another line to remove
context line
context line
- line to remove
+ line to add
context line
context line
...
[The hash signs `###' are really asterisks `***' but I cannot write
this here. Otherwise patch gets confused.]
Every hunk is preceded by line number information. This line number
information gives patch a basic idea on where to look for the lines
to change. Around the lines in questions you always have some (usually
2) lines of context and then lines beginning with '-' that should
be removed and lines beginning with '+' that should be added.
Normally you can guess from the .rej file what should be done.