[U-Boot] newbie question about patch to fix 'fatal: cannot describe'

Detlev Zundel dzu at denx.de
Tue Jun 16 13:14:28 CEST 2009


Hi Rainer,

> This is my first posting to the list and I just joined the mailing list 
> about a week ago.

Welcome aboard!

> Plus I am pretty new to the open source world as well, so please send
> me pointers to where to look things up if the posting is not
> inappropriate or does not belong here.

Judging by the questions you ask I presume you have found the relevant
places, but still the most important one here:

http://www.denx.de/wiki/U-Boot/Patches

> Any time I build U-Boot from my git checkout I receive the 'fatal: 
> cannot describe' message. Googling quickly got me to the solution: A fix 
> for similar behaviour in the kernel was fixed a while ago, basically it 
> is a problem in setlocalversion. So I took the two relevant patches 
> (instead of the full file because it looks like u-boot has it's own 
> version of that file) and applied them to my repository. 
>
> This is my patch: 
>
> commit ec6609f492e41594715c4764ae7c0994e9e70270
> Author: Rainer Keller <rkeller at ubicom.com>
> Date:   Mon Jun 15 12:55:50 2009 -0700
>
>     combined two kernel patches to fix git describe errors in tools/setlocalversion: Commit f03b283f081f538ec71b9e87cb8411bb62e2abc9 and Commit 56b2f0706d82535fd8d85503f2dcc0be40c8e55d
>
> diff --git a/tools/setlocalversion b/tools/setlocalversion
> index b3f5f28..aca9d63 100755
> --- a/tools/setlocalversion
> +++ b/tools/setlocalversion
> @@ -9,11 +9,15 @@ usage() {
>  cd "${1:-.}" || usage
>  
>  # Check for git and a git repo.
> -if head=`git rev-parse --verify HEAD 2>/dev/null`; then
> +if head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
>  	# Do we have an untagged version?
>  	if git name-rev --tags HEAD | \
>  	   grep -E '^HEAD[[:space:]]+(.*~[0-9]*|undefined)$' > /dev/null; then
> -	        git describe | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
> +		if tag=`git describe 2>/dev/null`; then
> +			echo $tag | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
> +		else
> +			printf '%s%s' -g $head
> +		fi
>  	fi
>  
>  	# Are there uncommitted changes?
>
> So here are my questions:
>
> Obviously that is not my code, do I still add my `Signed-off-by'? 

Yep - as you introduce the code, you certify the "Developer's
Certificate of Origin" (-> Documentation/SubmittingPatches in a Linux tree).

> Should I add the comments from the original commits to the kernel or it 
> is ok to just refer to the commits? 

I'm pretty lazy so it is more work for me to look up the comments in the
other repo.  So please include the comments in the log here directly.

> I don't have a publicly accessible git repository to ask a custodian to 
> pull from and from checking the custodian list it looks like this is 
> Wolfgang's area. Is it ok to just post it as is and expect him to apply 
> it out of the email? 

Entirely correct.

> If these seem to be slighly overly careful questions please consider 
> that over time Ubicom would like to add a complete additional 
> architecture with dozens of boards and we'll have a lot more newbie 
> questions, so I want to start as polite as I can :) 

Hey, you're welcome, looking forward to those patches.  So it looks like
actually you need to prepare yourself for a custodian job soon :)

Cheers
  Detlev

-- 
Q: Does that mean we also shouldn't be using IRQF_SAMPLE_RANDOM on
   interrupt [sources]?
A: Yes. The flag needs to be taken out and shot.
                            -- Matt Mackall <1239116251.14392.133.camel at calx>
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de


More information about the U-Boot mailing list