Thanks for your answer Paul, it took me longer than I thought because I couldn't find any documentation or comments in the code, but I finally got this working. The sintax to call it was, (there are actually 2 options, I took this one because I don't need user/passwd):
P4PORT = "yourhost:yourportnumber" FETCHCOMMAND_p4 = "p4" SRC_URI = " \ p4://depot/myproject...;module=destinationfolderInWORKDIR/destinationsubfolder;changeslist=9952 \ " I used the perforce.py in the latest yocto distribution, 1.5-dora. The subfolders where being renamed wrongly, deleting the first 3 characters. I solved it using this patch: diff --git poky/bitbake/lib/bb/fetch2/perforce.py_dora poky/bitbake/lib/bb/fetch2/perforce.py index fc4074d..d2ecccc 100644 --- poky/bitbake/lib/bb/fetch2/perforce.py_dora +++ poky/bitbake/lib/bb/fetch2/perforce.py @@ -112,7 +112,7 @@ class Perforce(FetchMethod): base = path which = path.find('/...') if which != -1: - base = path[:which] + base = path[:which-1] base = self._strip_leading_slashes(base) I hope this helps to anyone trying to use this. Cheers, Katu 2013/10/15 Paul Eggleton <paul.eggle...@linux.intel.com> > Hi Katu, > > On Tuesday 15 October 2013 20:52:15 Katu Txakur wrote: > > can someone please give me an example of fetching the code from perforce? > > I want to map files from perforce and put them in a different tree > > structure in the workspace before compiling it. I also need to set user > and > > password. > > I failed to find an example online and I don't understand the perforce > > script enough to guess the way to call it. > > I have zero experience with perforce or fetching from it with a recipe, but > looking at the fetcher code (bitbake/lib/bb/fetch2/perforce.py) it looks > like > the SRC_URI syntax is: > > p4://user:password:host:port@path > > Unfortunately it looks like you also need to set FETCHCOMMAND_p4 in your > configuration as well since there is no default for this. Something like > "/usr/bin/env p4" might work. > > Cheers, > Paul > > -- > > Paul Eggleton > Intel Open Source Technology Centre >
_______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto