Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 97150

Summary: pulling from a subversion respository and using an epatch does not play nice.
Product: Gentoo Linux Reporter: Marc Tousignant <myrdhn>
Component: EclassesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Marc Tousignant 2005-06-26 16:31:03 UTC
building from a subversion repository and applying a local epatch does not seem
to work together.
For some reason epatch applies the patch to the download directory
"/usr/portage/distfiles/svn-src" as opposed to the working directory
"/var/tmp/portage"
This sounds innocent, however, it is does this after subversion_src_unpack so
the patch in the working cirectory and this is not in the compile. 
On top of that in, conjunction with bug # 97129, since the update of the
checkout gets skipped the patch fails if you try to compile a second time
bombing the entire build. This is because you are trying to apply the patch to a
location that it has already been applied to.

Reproducible: Always
Steps to Reproduce:
1. emerge an ebuild that checks out from a subversion repository and applied a patch
2. repeat step 1 

Actual Results:  
patch failed to apply because it was applied to same location (subversion
checkout) a second time.

Expected Results:  
patch should have been applie to the working directory and not the checkout location

Since the subversion checkout is broken at this time, see bug # 97129, there is
a workaround.
1. emerge the ebuild
2. abort the build after the patch is applied to the checkout
3. edit the ebuild to remove the patch. this stops it from being applied a
second time and failing.
4. emerge the ebuild again. since the patch was applied to the subversion
checkout and bug # 97129 is not fixed at this time the patch is copied to the
working directory with the rest of the source.
Comment 1 solar (RETIRED) gentoo-dev 2005-06-26 16:56:26 UTC
Marc, Please stop assigning your bugs to the portage team ( this one and bug 
#97129 ) are not portage being python related.
dev-portage is for the python backend ie sys-apps/portage only. 
epatch is comes from a bash eclass. ie /usr/portage/eclass

The problem your having sounds like a problem with your own patch or euild 
btw and not the epatch command itself. I/we use patches from svn all the time.
Comment 2 Marc Tousignant 2005-06-26 17:07:31 UTC
My appoligies.
The test ebuild I was getting this error on was only running
subversion_svn_fetch and not subversion_src_unpack. Therefore the bootstrap was
not getting done until later. This is why the patch was being applied to the
checkout location.