[yocto] fetch from perforce

Paul Eggleton paul.eggleton at linux.intel.com
Mon Oct 28 02:35:50 PDT 2013


Hi Katu,

On Thursday 24 October 2013 10:09:50 Katu Txakur wrote:
> 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"

Is this not able to be specified in the SRC_URI?

> FETCHCOMMAND_p4 = "p4"

We should really get a default value for FETCHCOMMAND_p4 defined in OE-Core 
(and perhaps also the default bitbake.conf bundled with bitbake itself).
 
> SRC_URI = " \
> p4://depot/myproject...;module=destinationfolderInWORKDIR/destinationsubfold
> er;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.

I see you've opened up a bug for this, thanks.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list