Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 42060 - cvs.eclass trys only patch -p0 while iterating $PATCHES
Summary: cvs.eclass trys only patch -p0 while iterating $PATCHES
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: SpanKY
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-18 12:50 UTC by Jyrki Muukkonen
Modified: 2005-09-21 16:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jyrki Muukkonen 2004-02-18 12:50:56 UTC
Looks like cvs.eclass trys only "patch -p0" while iterating the $PATCHES variable.
In my opinion, it should also try (at least) -p1 since numerous diff's are made with something like "diff -ur dir-orig dir-patched".
Note that base.eclass uses -p0 for $PATCHES and -p1 for $PATCHES1

Reproducible: Always
Steps to Reproduce:
1. obviously inherit cvs in the ebuild
2. use "PATCHES=${FILESDIR}/somepatch.diff" which needs -p1 when applied in ${S} directory
3. try to emerge

Actual Results:  
emerge fails with something like:
can't find file to patch at input line 4
Perhaps you used the wrong -p or --strip option?


Expected Results:  
Patch it cleanly, I guess :P

One could add a similar "for x in $PATCHES1 ... " block to cvs.eclass, or make
it use epatch-function.

This bug is in no way critical. One solution is not to use the $PATCHES variable
at all and overwrite the src_unpack() function. But since the $PATCHES is there
it might be reasonable to handle it correctly.
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2005-09-21 15:50:49 UTC
Re-assign, assignee seems retired (Bug 106726).
Comment 2 SpanKY gentoo-dev 2005-09-21 16:19:25 UTC
changed it to epatch