<?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>8911</bug_id>
          
          <creation_ts>2016-01-12 16:05:18 +0000</creation_ts>
          <short_desc>Storing build history in a Git submodule breaks due to a bad Git repository check</short_desc>
          <delta_ts>2016-02-01 06:59:42 +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>OE-Core</product>
          <component>deployment</component>
          <version>2.2</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>2.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>ulfalizer</reporter>
          <assigned_to name="Markus Lehtonen">markus.lehtonen</assigned_to>
          
          
          
          <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>57753</commentid>
    <comment_count>0</comment_count>
    <who name="">ulfalizer</who>
    <bug_when>2016-01-12 16:05:18 +0000</bug_when>
    <thetext>buildhistory.bbclass checks whether BUILDHISTORY_DIR is an initialized Git repository with &apos;if [ ! -d .git ]&apos;. This won&apos;t work when BUILDHISTORY_DIR is a Git submodule, since .git is a regular file in that case (containing something like &apos;gitdir: ../.git/modules/foo&apos;). Changing the test to &apos;if [ ! -e .git ]&apos; fixes the problem.

The broken test causes &apos;git init&apos; to be rerun in the submodule, which for some reason turns &apos;worktree&apos; in .git/modules/foo/config into an absolute path. This in turn makes the entire repository non-relocatable. (Commands like &apos;git diff&apos; fail with &quot;fatal: Could not switch to &apos;/home/ulf/poky&apos;: No such file or directory&quot;.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58367</commentid>
    <comment_count>1</comment_count>
    <who name="Markus Lehtonen">markus.lehtonen</who>
    <bug_when>2016-02-01 06:59:42 +0000</bug_when>
    <thetext>Fixed in oe-core &apos;master&apos; by this commit:
http://git.openembedded.org/openembedded-core/commit/?id=a5e931e0b1d941cc938fe2f49625c54b07fab0ce</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>