* fetch from perforce
@ 2013-10-15 19:52 Katu Txakur
2013-10-15 22:34 ` Paul Eggleton
0 siblings, 1 reply; 6+ messages in thread
From: Katu Txakur @ 2013-10-15 19:52 UTC (permalink / raw)
To: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 377 bytes --]
Hi,
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.
Thanks a lot,
Katu
[-- Attachment #2: Type: text/html, Size: 473 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fetch from perforce
2013-10-15 19:52 fetch from perforce Katu Txakur
@ 2013-10-15 22:34 ` Paul Eggleton
2013-10-24 9:09 ` Katu Txakur
0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2013-10-15 22:34 UTC (permalink / raw)
To: Katu Txakur; +Cc: yocto
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: fetch from perforce
2013-10-15 22:34 ` Paul Eggleton
@ 2013-10-24 9:09 ` Katu Txakur
2013-10-28 9:35 ` Paul Eggleton
0 siblings, 1 reply; 6+ messages in thread
From: Katu Txakur @ 2013-10-24 9:09 UTC (permalink / raw)
To: Paul Eggleton; +Cc: yocto@yoctoproject.org
[-- Attachment #1: Type: text/plain, Size: 2213 bytes --]
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.eggleton@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
>
[-- Attachment #2: Type: text/html, Size: 2895 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: fetch from perforce
2013-10-24 9:09 ` Katu Txakur
@ 2013-10-28 9:35 ` Paul Eggleton
2013-10-28 9:38 ` Robert P. J. Day
0 siblings, 1 reply; 6+ messages in thread
From: Paul Eggleton @ 2013-10-28 9:35 UTC (permalink / raw)
To: Katu Txakur; +Cc: yocto@yoctoproject.org
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
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: fetch from perforce
2013-10-28 9:35 ` Paul Eggleton
@ 2013-10-28 9:38 ` Robert P. J. Day
2013-10-28 9:48 ` Paul Eggleton
0 siblings, 1 reply; 6+ messages in thread
From: Robert P. J. Day @ 2013-10-28 9:38 UTC (permalink / raw)
To: Paul Eggleton; +Cc: yocto@yoctoproject.org
On Mon, 28 Oct 2013, Paul Eggleton wrote:
> 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).
IIRC, richard purdie once suggested that the "FETCHCOMMAND_"
versions of the variables were deprecated, and that "FETCHCMD_" was
the correct usage. can someone clarify this?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: fetch from perforce
2013-10-28 9:38 ` Robert P. J. Day
@ 2013-10-28 9:48 ` Paul Eggleton
0 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2013-10-28 9:48 UTC (permalink / raw)
To: Robert P. J. Day; +Cc: yocto
Hi Robert,
On Monday 28 October 2013 05:38:49 Robert P. J. Day wrote:
> > 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).
>
> IIRC, richard purdie once suggested that the "FETCHCOMMAND_"
> versions of the variables were deprecated, and that "FETCHCMD_" was
> the correct usage. can someone clarify this?
They are, however we're talking about the perforce fetcher here and that still
reads FETCHCOMMAND, so that would need to be changed before we could expect to
use the new variable here.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-10-28 9:48 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-15 19:52 fetch from perforce Katu Txakur
2013-10-15 22:34 ` Paul Eggleton
2013-10-24 9:09 ` Katu Txakur
2013-10-28 9:35 ` Paul Eggleton
2013-10-28 9:38 ` Robert P. J. Day
2013-10-28 9:48 ` Paul Eggleton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.