[bitbake-devel] [PATCH] fetch/perforce: Fix single file checkouts

Richard Purdie richard.purdie at linuxfoundation.org
Fri Jun 26 16:41:40 UTC 2015


Fetching directories with p4 worked but single files did not. This
patch from Helmut Auer (helmut.auer at harman.com) fixes that issue.

[YOCTO #7891]

Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

diff --git a/lib/bb/fetch2/perforce.py b/lib/bb/fetch2/perforce.py
index 5a6631a..3a10c7c 100644
--- a/lib/bb/fetch2/perforce.py
+++ b/lib/bb/fetch2/perforce.py
@@ -123,7 +123,7 @@ class Perforce(FetchMethod):
         if depot.find('/...') != -1:
             path = depot[:depot.find('/...')]
         else:
-            path = depot
+            path = depot[:depot.rfind('/')]
 
         module = parm.get('module', os.path.basename(path))
 





More information about the bitbake-devel mailing list