<?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>7771</bug_id>
          
          <creation_ts>2015-05-15 20:27:36 +0000</creation_ts>
          <short_desc>gitsm fetcher don&apos;t fetches submodules which are not any longer included in .gitmodules</short_desc>
          <delta_ts>2015-07-10 21:32:23 +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>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>CLOSED</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.9</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>betacentauri</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</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>51054</commentid>
    <comment_count>0</comment_count>
      <attachid>2514</attachid>
    <who name="">betacentauri</who>
    <bug_when>2015-05-15 20:27:36 +0000</bug_when>
    <thetext>Created attachment 2514
Bitbake file

I have used:
SRC_URI = &quot;gitsm://github.com/google/google-api-python-client.git&quot;
SRCREV = &quot;62af5a96988404207da9fc0e4aff2f6cefcb26c2&quot;

Unpack throws this error:
ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 1, output:
cp: cannot stat `....../git2/github.com.google.google-api-python-client.git/modules&apos;: No such file or directory

ERROR: Logfile of failure stored in: ....../python-api-python-client/1.2-r0/temp/log.do_unpack.17323

Problem is that current git has no submodules(https://github.com/google/google-api-python-client/blob/master/.gitmodules). But in old rev 62af5a96988404207da9fc0e4aff2f6cefcb26c2 there is a submodule (https://github.com/google/google-api-python-client/blob/62af5a96988404207da9fc0e4aff2f6cefcb26c2/.gitmodules). gitsm.py calls &quot;git reset --hard&quot; and then &quot;git submodule init&quot;. So it looks in wrong rev.

Attached is a patch which worked for me. I don&apos;t know whether ud.revisions[&quot;default&quot;] always contains the correct src rev. Please check.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51055</commentid>
    <comment_count>1</comment_count>
      <attachid>2515</attachid>
    <who name="">betacentauri</who>
    <bug_when>2015-05-15 20:28:09 +0000</bug_when>
    <thetext>Created attachment 2515
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52170</commentid>
    <comment_count>2</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-07-07 12:48:54 +0000</bug_when>
    <thetext>There was a version of this posted on the bitbake mailing list which used ud.names[0] instead of &quot;default&quot; so I&apos;ve merged that and it should resolve this issue. Thanks for the patch!

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=62caaa4d6d1e3585c94c34af91e94d1b0deba8c3</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52291</commentid>
    <comment_count>3</comment_count>
    <who name="">betacentauri</who>
    <bug_when>2015-07-10 21:32:23 +0000</bug_when>
    <thetext>Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2514</attachid>
            <date>2015-05-15 20:27:36 +0000</date>
            <delta_ts>2015-05-15 20:27:36 +0000</delta_ts>
            <desc>Bitbake file</desc>
            <filename>python-api-python-client_1.2.bb</filename>
            <type>application/octet-stream</type>
            <size>618</size>
            <attacher>betacentauri</attacher>
            
              <data encoding="base64">U1VNTUFSWSA9ICJHb29nbGUgQVBJIENsaWVudCBMaWJyYXJ5IGZvciBQeXRob24iCkRFU0NSSVBU
SU9OID0gIlRoZSBHb29nbGUgQVBJIENsaWVudCBmb3IgUHl0aG9uIGlzIGEgY2xpZW50IGxpYnJh
cnkgZm9yIGFjY2Vzc2luZyB0aGUgUGx1cywgTW9kZXJhdG9yLCBhbmQgbWFueSBvdGhlciBHb29n
bGUgQVBJcy4iCkhPTUVQQUdFID0gImh0dHA6Ly9nb29nbGUuZ2l0aHViLmlvL2dvb2dsZS1hcGkt
cHl0aG9uLWNsaWVudC8iClNFQ1RJT04gPSAiZGV2ZWwvcHl0aG9uIgpMSUNFTlNFID0gIkFwYWNo
ZS0yLjAiCkxJQ19GSUxFU19DSEtTVU0gPSAiZmlsZTovL0xJQ0VOU0U7bWQ1PTY5Mjg4NTE5ZDZi
ZmI3NTgxMjFlZGU2NGQyNzU4NWNlIgoKU1JDX1VSSSA9ICJnaXRzbTovL2dpdGh1Yi5jb20vZ29v
Z2xlL2dvb2dsZS1hcGktcHl0aG9uLWNsaWVudC5naXQgXAogICAgICAgIGZpbGU6Ly9BZGRfY2xl
YW5fdG9fTWFrZWZpbGUucGF0Y2giIAoKClMgPSAiJHtXT1JLRElSfS9naXQiCgpTUkNSRVYgPSAi
NjJhZjVhOTY5ODg0MDQyMDdkYTlmYzBlNGFmZjJmNmNlZmNiMjZjMiIKUFIgPSAicjAiCgppbmhl
cml0IHNldHVwdG9vbHMKaW5jbHVkZSBweXRob24tcGFja2FnZS1zcGxpdC5pbmMK
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>2515</attachid>
            <date>2015-05-15 20:28:09 +0000</date>
            <delta_ts>2015-05-15 20:28:09 +0000</delta_ts>
            <desc>Patch</desc>
            <filename>0001-gitsm-Reset-git-to-used-srcrev-and-not-to-HEAD.patch</filename>
            <type>text/html</type>
            <size>961</size>
            <attacher>betacentauri</attacher>
            
              <data encoding="base64">RnJvbSA4ZWQ4ZDg3Y2JlZmFjYjVlYjMyZTAzZDI2MmNhM2QxNmVmZGNjZTA5IE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBiZXRhY2VudGF1cmkgPGJldGFjZW50YXVyaUBhcmNvci5kZT4K
RGF0ZTogRnJpLCAxNSBNYXkgMjAxNSAyMjoxNTo0MCArMDIwMApTdWJqZWN0OiBbUEFUQ0hdIGdp
dHNtOiBSZXNldCBnaXQgdG8gdXNlZCBzcmNyZXYgYW5kIG5vdCB0byBIRUFECgotLS0KIGxpYi9i
Yi9mZXRjaDIvZ2l0c20ucHkgfCAyICstCiAxIGZpbGUgY2hhbmdlZCwgMSBpbnNlcnRpb24oKyks
IDEgZGVsZXRpb24oLSkKCmRpZmYgLS1naXQgYS9saWIvYmIvZmV0Y2gyL2dpdHNtLnB5IGIvbGli
L2JiL2ZldGNoMi9naXRzbS5weQppbmRleCBjMTI1Y2ZmLi40OTNhM2NjIDEwMDY0NAotLS0gYS9s
aWIvYmIvZmV0Y2gyL2dpdHNtLnB5CisrKyBiL2xpYi9iYi9mZXRjaDIvZ2l0c20ucHkKQEAgLTEw
OCw3ICsxMDgsNyBAQCBjbGFzcyBHaXRTTShHaXQpOgogICAgICAgICBvcy5yZW5hbWUodWQuY2xv
bmVkaXIsIGdpdGRpcikKICAgICAgICAgcnVuZmV0Y2hjbWQoInNlZCAiICsgZ2l0ZGlyICsgIi9j
b25maWcgLWkgLWUgJ3MvYmFyZS4qPS4qdHJ1ZS9iYXJlID0gZmFsc2UvJyIsIGQpCiAgICAgICAg
IG9zLmNoZGlyKHRtcGNsb25lZGlyKQotICAgICAgICBydW5mZXRjaGNtZCh1ZC5iYXNlY21kICsg
IiByZXNldCAtLWhhcmQiLCBkKQorICAgICAgICBydW5mZXRjaGNtZCh1ZC5iYXNlY21kICsgIiBy
ZXNldCAtLWhhcmQgIiArIHVkLnJldmlzaW9uc1siZGVmYXVsdCJdLCBkKQogICAgICAgICBydW5m
ZXRjaGNtZCh1ZC5iYXNlY21kICsgIiBzdWJtb2R1bGUgaW5pdCIsIGQpCiAgICAgICAgIHJ1bmZl
dGNoY21kKHVkLmJhc2VjbWQgKyAiIHN1Ym1vZHVsZSB1cGRhdGUiLCBkKQogICAgICAgICBzZWxm
Ll9zZXRfcmVsYXRpdmVfcGF0aHModG1wY2xvbmVkaXIpCi0tIAoxLjguNC5HSVQKCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>