<?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>7558</bug_id>
          
          <creation_ts>2015-04-02 12:48:37 +0000</creation_ts>
          <short_desc>Wrong URL in git fetcher&apos;s checkstatus method</short_desc>
          <delta_ts>2015-10-13 13:18:46 +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>VERIFIED</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 name="Marcin Smoczyński">smoczynski.marcin</reporter>
          <assigned_to name="Richard Purdie">richard.purdie</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <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>50036</commentid>
    <comment_count>0</comment_count>
      <attachid>2464</attachid>
    <who name="Marcin Smoczyński">smoczynski.marcin</who>
    <bug_when>2015-04-02 12:48:37 +0000</bug_when>
    <thetext>Created attachment 2464
Proposed patch

Executing checkuri on a rule with git repository in SRC_URI does not report errors when working offline because wrong repository url is passed to the ls-remote command. For example &quot;bitbake -c checkuri glibc&quot; command executes:
&quot;git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git;branch=release/2.21/master&quot;
command in a shell subprocess to determine if url is valid. Shell subprocess executes in fact 2 commands:
&quot;git -c core.fsyncobjectfiles=0 ls-remote git://sourceware.org/git/glibc.git&quot;
and
&quot;branch=release/2.21/master&quot;

First one returns 127 or 128 depending on error but second one returns 0 because it is just env variable setup. Therefore we&apos;re not catching connection error. 

To reproduce:
Go offline and execute bitbake -c checkuri glibc
no error will be reported

To fix:
pass proper repository url without arguments after a semicolon. Proposed patch in an attachment.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>51199</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2015-05-21 14:27:25 +0000</bug_when>
    <thetext>Thanks for the patch, http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=7310c3c925282e52b44351a5dfd7f7d882d2dcc4</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55255</commentid>
    <comment_count>2</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2015-10-13 13:18:46 +0000</bug_when>
    <thetext>Verified on master d302c98822efe2cb78a63b620aed1b94b4ed4a68
using this command with network enabled and disabled: 
bitbake -c checkuri m4</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>2464</attachid>
            <date>2015-04-02 12:48:37 +0000</date>
            <delta_ts>2015-04-02 12:48:37 +0000</delta_ts>
            <desc>Proposed patch</desc>
            <filename>0001-bitbake-fetch2-fix-uri-in-git-checkstatus.patch</filename>
            <type>text/plain</type>
            <size>886</size>
            <attacher name="Marcin Smoczyński">smoczynski.marcin</attacher>
            
              <data encoding="base64">RnJvbSBjYjUxZjkwMzFhZTRhZjMzMTE5MWMyYjI1OD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EZldGNoRXJyb3I6CiAgICAgICAg
ICAgICByZXR1cm4gRmFsc2UKLS0gCjEuNy45LjUKCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>