linux– 如何知道patch命令是否正常工作?

linux– 如何知道patch命令是否正常工作?,第1张

概述我正在尝试将seek-for-android项目提供的补丁应用于我从Cyanogenmod下载的代码.代码用make编译成功,所以我知道所有文件都在那里.我无法了解补丁正在做什么或者它是否正常工作.我尝试了-verbose选项.我不知道补丁遍历目录并查找要更新的文件需要多长时间.我的cpu中没有看到太多活动

我正在尝试将seek-for-android项目提供的补丁应用于我从Cyanogenmod下载的代码.代码用make编译成功,所以我知道所有文件都在那里.我无法了解补丁正在做什么或者它是否正常工作.我尝试了-verbose选项.我不知道补丁遍历目录并查找要更新的文件需要多长时间.我的cpu中没有看到太多活动.以下是我所遵循的说明:enter link description here以下是我看到的屏幕截图:

   root@ubuntu:~/androID/system# ls    abi       cm-11-2      docs             Makefile   sdk    androID   cm-11-3      external         ndk        smartcard-API-3_1_0    art       cts          frameworks       out        smartcard-API-3_1_0.tgz    bionic    dalvik       harDWare         packages   system    bootable  developers   kernel           pdk        tools    build     development  libcore          prebuilt   vendor    cm-11     device       libnativehelper  prebuilts    root@ubuntu:~/androID/system# cd smartcard-API-3_1_0    root@ubuntu:~/androID/system/smartcard-API-3_1_0# cd ..    root@ubuntu:~/androID/system# patch -p1 smartcard-API-3_1_0/smartcard-API.patch   ^C     root@ubuntu:~/androID/system# patch -p1 -R smartcard-API-3_1_0/smartcard- API.patch     ^C    root@ubuntu:~/androID/system# patch -p1 -verbose smartcard-   API-3_1_0/smartcard-      API.patch     patch 2.6.1    copyright (C) 1988 Larry Wall    copyright (C) 2003, 2009 Free Software Foundation, Inc.

我想在某些情况下,我应该寻找目标文件?下面的输出似乎说一个补丁是成功的,而另一个文件没有找到?我想我必须找到目标文件并指定它?由于某种原因,甚至没有识别出完整的路径.

root@ubuntu:~/androID/system# patch -p1 < smartcard-API-3_1_0/uicc.patch patching file frameworks/base/telephony/java/com/androID/internal/telephony  /ITelephony.aIDlHunk #1 Failed at 304.1 out of 1 hunk Failed -- saving rejects to file frameworks/base/telephony /java/com/androID/internal/telephony/ITelephony.aIDl.rejpatching file frameworks/base/telephony/java/com/androID/internal/telephony  /RILConstants.javaHunk #1 Failed at 55.Hunk #2 Failed at 262.2 out of 2 hunks Failed -- saving rejects to file frameworks/base/telephony/java/com/androID/internal/telephony/RILConstants.java.rejpatching file frameworks/opt/telephony/src/java/com/androID/internal/telephony /CommandException.javaHunk #1 Failed at 42.Hunk #2 Failed at 83.2 out of 2 hunks Failed -- saving rejects to file frameworks/opt/telephony  /src/java/com/androID/internal/telephony/CommandException.java.rejpatching file frameworks/opt/telephony/src/java/com/androID/internal/telephony /CommandsInterface.javaHunk #1 succeeded at 1250 (offset 109 lines).patching file frameworks/opt/telephony/src/java/com/androID/internal/telephony /IccCard.javaHunk #1 Failed at 214.1 out of 1 hunk Failed -- saving rejects to file frameworks/opt/telephony  /src/java/com/androID/internal/telephony/IccCard.java.rejpatching file frameworks/opt/telephony/src/java/com/androID/internal/telephony  /RIL.javaHunk #1 succeeded at 2592 (offset 253 lines).Hunk #2 succeeded at 4109 (offset 467 lines).Hunk #3 succeeded at 4619 (offset 543 lines).patching file frameworks/opt/telephony/src/java/com/androID/internal/telephony/sip/SipCommandInterface.javaHunk #1 Failed at 536.1 out of 1 hunk Failed -- saving rejects to file frameworks/opt/telephony/src/java/com/androID/internal/telephony/sip/SipCommandInterface.java.rejpatching file frameworks/opt/telephony/src/java/com/androID/internal/telephony  /test/SimulatedCommands.javaHunk #1 Failed at 1655.1 out of 1 hunk Failed -- saving rejects to file frameworks/opt/telephony /src/java/com/androID/internal/telephony/test/SimulatedCommands.java.rejpatching file frameworks/opt/telephony/src/java/com/androID/internal/telephony/uicc/IccCardProxy.javaHunk #1 succeeded at 844 (offset 102 lines).patching file frameworks/opt/telephony/src/java/com/androID/internal/telephony/uicc/UiccCardApplication.javaHunk #1 Failed at 44.Hunk #2 succeeded at 437 (offset 100 lines).Hunk #3 succeeded at 941 (offset 194 lines).1 out of 3 hunks Failed -- saving rejects to file frameworks/opt/telephony  /src/java/com/androID/internal/telephony/uicc/UiccCardApplication.java.rejpatching file frameworks/opt/telephony/tests/telephonytests/src/com/androID    /internal/telephony/gsm/UsimDataDownloadCommands.javaHunk #1 succeeded at 651 with fuzz 2 (offset 21 lines).can't find file to patch at input line 404Perhaps you used the wrong -p or --strip option?The text leading up to this was:-------------------------- diff --git a/packages/apps/Phone/src/com/androID/phone  /PhoneInterfaceManager.java b/packages/apps/Phone/src/com/androID/phone    /PhoneInterfaceManager.java|index 6600ae5..2ae6739 100644|--- a/packages/apps/Phone/src/com/androID/phone/PhoneInterfaceManager.java|+++ b/packages/apps/Phone/src/com/androID/phone/PhoneInterfaceManager.java--------------------------file to patch: 

解决方法:

出于某种原因,必须通过重定向将补丁文件馈送到补丁程序中,即

     patch file

不起作用,但是

    patch < file

作品

总结

以上是内存溢出为你收集整理的linux – 如何知道patch命令是否正常工作?全部内容,希望文章能够帮你解决linux – 如何知道patch命令是否正常工作?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1111961.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-29
下一篇 2022-05-29

发表评论

登录后才能评论

评论列表(0条)

保存