<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>5380</bug_id>
          
          <creation_ts>2013-10-24 13:41:22 +0000</creation_ts>
          <short_desc>Perforce fetch renames sub folders</short_desc>
          <delta_ts>2013-11-25 14:54:58 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>BitBake</product>
          <component>bitbake</component>
          <version>1.5</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.5.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Katutxakurra">katutxakurra</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>38155</commentid>
    <comment_count>0</comment_count>
      <attachid>1577</attachid>
    <who name="Katutxakurra">katutxakurra</who>
    <bug_when>2013-10-24 13:41:22 +0000</bug_when>
    <thetext>Created attachment 1577
perforce.py patch

The following sintax fetches the code from a perforce repository:

P4PORT = &quot;host:port&quot;
FETCHCOMMAND_p4 = &quot;p4&quot;

P4CHANGELIST = &quot;changelistnumber&quot;

PR = &quot;r0&quot;
S = &quot;${WORKDIR}&quot;

SRC_URI = &quot; \
p4://depot/folder/...;module=localfolder/localsubfolder;changeslist=${P4CHANGELIST} \
&quot;

However, the subfolders of //depot/folder/... get renamed when mapped to the local folder structure. They lose the first 3 letters.

The attached change worked for me, It changes
- base = path[:which]
+ base = path[:which-1]

in the perforce.py from yocto 1.5 dora.

Thanks</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>39066</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2013-11-25 14:54:58 +0000</bug_when>
    <thetext>Fixed in master: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=6ddb9bf0976169fde7eee16d70a83210aa354416. Thanks for the patch!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>1577</attachid>
            <date>2013-10-24 13:41:22 +0000</date>
            <delta_ts>2013-10-24 13:41:22 +0000</delta_ts>
            <desc>perforce.py patch</desc>
            <filename>perforce-fetch.patch</filename>
            <type>text/plain</type>
            <size>467</size>
            <attacher name="Katutxakurra">katutxakurra</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBwb2t5L2JpdGJha2UvbGliL2JiL2ZldGNoMi9wZXJmb3JjZS5weV9kb3JhIHBv
a3kvYml0YmFrZS9saWIvYmIvZmV0Y2gyL3BlcmZvcmNlLnB5CmluZGV4IGZjNDA3NGQuLmQyZWNj
Y2MgMTAwNjQ0Ci0tLSBwb2t5L2JpdGJha2UvbGliL2JiL2ZldGNoMi9wZXJmb3JjZS5weV9kb3Jh
CisrKyBwb2t5L2JpdGJha2UvbGliL2JiL2ZldGNoMi9wZXJmb3JjZS5weQpAQCAtMTEyLDcgKzEx
Miw3IEBAIGNsYXNzIFBlcmZvcmNlKEZldGNoTWV0aG9kKToKICAgICAgICAgYmFzZSA9IHBhdGgK
ICAgICAgICAgd2hpY2ggPSBwYXRoLmZpbmQoJy8uLi4nKQogICAgICAgICBpZiB3aGljaCAhPSAt
MToKLSAgICAgICAgICAgIGJhc2UgPSBwYXRoWzp3aGljaF0KKyAgICAgICAgICAgIGJhc2UgPSBw
YXRoWzp3aGljaC0xXQogCiAgICAgICAgIGJhc2UgPSBzZWxmLl9zdHJpcF9sZWFkaW5nX3NsYXNo
ZXMoYmFzZSkKIAo=
</data>

          </attachment>
      

    </bug>

</bugzilla>