LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-28-2011, 03:07 AM   #1
Glenn D.
Member
 
Registered: May 2009
Location: ACT - Australia
Distribution: Opensuse x86_64 (Latest)
Posts: 132

Rep: Reputation: 26
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:
 
Old 05-28-2011, 05:21 PM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Distribution: Debian
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
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
 
Old 05-29-2011, 08:47 PM   #3
eightcien
LQ Newbie
 
Registered: May 2011
Posts: 5

Rep: Reputation: 0
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".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] How to Apply a patch vikas027 Linux - Software 5 01-27-2011 08:32 AM
Apply Patch culin Linux - General 1 02-21-2007 08:02 AM
how to apply a patch? ashlesha Linux - Software 4 12-07-2006 02:09 PM
How to apply a patch? amwink Programming 2 11-25-2005 07:14 PM
How to Apply patch for Mass Storage device to work? (uss725-2.4.20-rc2.patch) cevjr Linux - Hardware 3 04-20-2004 11:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration