Bug 1838 - git merge failures in .scc files happen silently
Summary: git merge failures in .scc files happen silently
Status: RESOLVED FIXED
Alias: None
Product: Kernel
Classification: Yocto Project Subprojects
Component: kernel-configuration (show other bugs)
Version: 1.1-beta
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.2 M2
Assignee: Bruce Ashfield
QA Contact:
URL:
Whiteboard: Fixed in the kern-tools repository. W...
Depends on:
Blocks:
 
Reported: 2011-12-15 09:24 UTC by Tom Zanussi
Modified: 2012-01-10 07:28 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Zanussi 2011-12-15 09:24:34 UTC
If a 'git merge' in an .scc file fails, there's no indication to the user as to why it failed.  In a recent case, it took awhile to figure out why the emgd module wasn't being built on a system that didn't have git configured properly, which was causing a merge failure that ended up with an invalid config option message and no emgd module in the image.  The reason for the failure was that git hadn't been configured properly, but there wasn't anything in all the intermediate config or log files that indicated that the merge had failed:

yocto/egmd/tmp/work/crownbay-poky-linux/linux-yocto-3.0.4+git1+d05450e4aef02c1b7137398ab3a9f8f96da74f52_1+2247da9131ea7e46ed4766a69bb1353dba22f873-r2/linux$
git merge yocto/emgd

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident  <.(none)> not allowed
Comment 1 Bruce Ashfield 2011-12-15 10:50:51 UTC
I already have a case for this .. somewhere. I'll find it and dup this to it.
Comment 2 Bruce Ashfield 2011-12-21 08:53:00 UTC
I couldn't find the duplicate, it wasn't entirely obvious, since it was a subpart of a case that was about build failures on the autobuilder.

So we can use this case to address this issue.

Out of curiosity, can anyone else make this fail like this on an unconfigured
box ? I wanted to test my fix by hand, but I'm not seeing failures.

 > git commit -m "test commit with unconfigured git" Makefile
[yocto/standard/mti-malta32-be 5ce556b] test commit with unconfigured git
 Committer: Bruce Ashfield <bruce@yow-bashfiel-l1.(none)>
Your name and email address were configured automatically based
on your username and hostname. Please check that they are accurate.
You can suppress this message by setting them explicitly:

    git config --global user.name "Your Name"
    git config --global user.email you@example.com

After doing this, you may fix the identity used for this commit with:

    git commit --amend --reset-author

 1 files changed, 1 insertions(+), 1 deletions(-)
yow-bashfiel-l1 [/home/bruc...8-r2/linux]> echo $?
0
>

> git merge yocto/emgd
Merge made by the 'recursive' strategy.
 drivers/gpu/drm/Kconfig                            |    9 +
[snip]
> echo $?
130

So even in the second case, the merge happened, although the return code
is non-zero.
Comment 3 Tom Zanussi 2011-12-21 09:00:42 UTC
Must be a git version difference - your version seems OK with using the username and hostname it guessed it found, while the op's version asks '*** Please tell me who you are.'.
Comment 4 Bruce Ashfield 2011-12-21 09:03:12 UTC
Indeed. I was running my host version. I'll try git-native, and see
what I can get.

I can fix this, I'd just rather be able to test it fully!
Comment 5 Bruce Ashfield 2012-01-10 07:28:57 UTC
This has been merged.