LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Syntax to apply this patch (https://www.linuxquestions.org/questions/linux-software-2/syntax-to-apply-this-patch-883161/)

Glenn D. 05-28-2011 03:07 AM

Syntax to apply this patch
 
Hello
what is the syntax to apply this patch [1]? and do I need to cd to a certian directory first before applying it ?
Is the file its looking for called transaction.py ?
Thanks Glenn

[1]
diff --git a/transaction.py b/transaction.py
index 98bdec2..3cfa4f5 100644
--- a/transaction.py
+++ b/transaction.py
@@ -313,6 +313,7 @@ class PolicyWithPriorities(Policy):
for pathpkg in path[1:]:
deps[pathpkg] = True
queue.append(path+[upgpkg])
+ queue.pop(0)
for upg in pkg.upgrades:
for prv in upg.providedby:
for prvpkg in prv.packages:

Snark1994 05-28-2011 05:21 PM

You're using a different version of diff to me, by the looks of things, but most probably you can just apply the patch with
Code:

patch transaction.py patchFileName

eightcien 05-29-2011 08:47 PM

The syntax you are looking for is:

Code:

  patch -p1 < my.patch
The "-p1" strips the first level of directories from the pathnames in the diff (in this case, the "a/" and "b/" prefixes). The patch in question is the file "my.patch". The whole command should be given in the directory containing the file "transation.py".


All times are GMT -5. The time now is 08:09 AM.