Hans, Are you sure you're seeing the patch system use $WORKDIR instead of $S as the root for patching? I've had to do a lot of patching in our own layers recently and I've always seen $S used as the root for the patch. Are you explicitly setting S = "${WORKDIR}/git"? That's what we do for our git recipes. That's how you get the system to recognize the source somewhere other than just $WORKDIR.
As for specifying a different -pnum, you absolutely can do that like so: *SRC_URI += "file://my-change.patch;striplevel=X"* X is the pnum that you want. Its default value is 1. You may also find this page useful -- it contains all sorts of hints for setting up your recipes in a Yocto-standard way: https://wiki.yoctoproject.org/wiki/Recipe_&_Patch_Style_Guide That's where I learned about striplevel and the preference for it over the deprecated pnum parameter. Kind regards, Jerrod On Thu, Mar 7, 2013 at 7:33 AM, Hans Beckérus <hans.becke...@gmail.com>wrote: > On Thu, Mar 7, 2013 at 1:12 PM, Hans Beckérus <hans.becke...@gmail.com> > wrote: > > Hi. More problems ;) > > I have a patch file that needs to be applied to a source tree and the > > patch file is copied properly to the ${WORKDIR} directory. > > So far so good. But, the problem with this source tree is that it is > > not built from the traditional root folder of the repo. > > This means I need to change ${S} to point somewhere else. This also > > causes the patch system to fail! > > I did an override of do_patch() in my .bb and that seems to work, but > > I do not like to use overrides unless I really have to. > > So basically, is there some way to tell the built-in patch system to > > use a different -pnum value? > > If there is, I could stick with the do_patch() as provided by default. > > > > Hans > > Hmm, ok a correction from my side. Forget parts of what I said ;) > The patch system does not seem to use the value of ${S}, it is using > ${WORKDIR} as the root for patching, this is also where the patch file > is placed. The problem in my case does not seem to be that is built > from a non-standard path. The reason why it fails seems to be because > the actual source is not in ${WORKDIR}, it is in ${WORKDIR}/git. The > patch file does include git as part of the source path for obvious > reasons. What am I doing wrong? Having actual source code in > ${WORKDIR}/git I assume is very common for git based downloads. > > Hans > _______________________________________________ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto >
_______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto