Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1490218
  • 博文数量: 226
  • 博客积分: 3997
  • 博客等级: 少校
  • 技术积分: 2369
  • 用 户 组: 普通用户
  • 注册时间: 2010-06-19 17:26
个人简介

Never save something for a special occasion. Every day in your life is a special occasion.

文章分类

全部博文(226)

文章存档

2018年(5)

2017年(11)

2016年(1)

2015年(17)

2014年(14)

2013年(30)

2012年(5)

2011年(52)

2010年(107)

分类: 其他平台

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 ".rej" where "" denotes the filename
that couldn't be patched.  The most likely reason for that is that
you have modified "" in a way that conflicts with the changes
made between the different releases.

However, not everything is lost now.  You can inspect ".rej" and
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.

阅读(2346) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~