* [PATCH] Fix scripts/setlocalversion with git
@ 2009-03-30 12:21 Nico Schottelius
2009-04-07 15:44 ` [Resend] " Nico Schottelius
0 siblings, 1 reply; 9+ messages in thread
From: Nico Schottelius @ 2009-03-30 12:21 UTC (permalink / raw)
To: LKML; +Cc: trivial
[-- Attachment #1.1: Type: text/plain, Size: 549 bytes --]
Hello!
When using trees like wireless-testing, which have untagged tags,
scripts/setlocalversion does not display any git indication for
localversion.
This patch fixes it: If git is available, but no usable tag is found,
it uses -g${head}. It skips the detection of unanottated tags via
git name-rev.
Please apply, otherwise testers like me always have '2.6.29' for trees
with unanottated tags, instead of 2.6.29-20318-g9aa4755, which helps
a lot if you've tons of kernels installed from different trees.
Sincerly,
Nico
ps: please cc on reply
[-- Attachment #1.2: patch-localversion-2.6.29 --]
[-- Type: text/plain, Size: 809 bytes --]
--- old/scripts/setlocalversion 2009-03-27 09:37:07.160938681 +0100
+++ new/scripts/setlocalversion 2009-03-30 14:14:21.187397016 +0200
@@ -10,13 +10,12 @@
# Check for git and a git repo.
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
- 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
+ # Do we have an annotated tag?
+ if atag=`git describe 2>/dev/null`; then
+ echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
+ # add -g${head}, if there is no usable tag
+ else
+ printf '%s%s' -g $head
fi
# Is this git on svn?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Resend] [PATCH] Fix scripts/setlocalversion with git
2009-03-30 12:21 [PATCH] Fix scripts/setlocalversion with git Nico Schottelius
@ 2009-04-07 15:44 ` Nico Schottelius
2009-04-07 15:56 ` Jiri Kosina
0 siblings, 1 reply; 9+ messages in thread
From: Nico Schottelius @ 2009-04-07 15:44 UTC (permalink / raw)
To: Nico Schottelius, LKML, trivial
[-- Attachment #1.1: Type: text/plain, Size: 1028 bytes --]
Hello again!
I just saw that this patch did not go anywhere and did not have
any replies, so I repost it.
I also created a git-repo at
git://git.schottelius.org/linux/linux-2.6
gitweb:
http://git.schottelius.org/?p=linux/linux-2.6;a=summary
if you want the patch (f43ba0be1204e7c26cc700a75bdb688a788fbf2f)
via git.
Sincerly,
Nico
Nico Schottelius [Mon, Mar 30, 2009 at 02:21:37PM +0200]:
> Hello!
>
> When using trees like wireless-testing, which have untagged tags,
> scripts/setlocalversion does not display any git indication for
> localversion.
>
> This patch fixes it: If git is available, but no usable tag is found,
> it uses -g${head}. It skips the detection of unanottated tags via
> git name-rev.
>
> Please apply, otherwise testers like me always have '2.6.29' for trees
> with unanottated tags, instead of 2.6.29-20318-g9aa4755, which helps
> a lot if you've tons of kernels installed from different trees.
>
> Sincerly,
>
> Nico
>
> ps: please cc on reply
[-- Attachment #1.2: patch-localversion-2.6.29 --]
[-- Type: text/plain, Size: 809 bytes --]
--- old/scripts/setlocalversion 2009-03-27 09:37:07.160938681 +0100
+++ new/scripts/setlocalversion 2009-03-30 14:14:21.187397016 +0200
@@ -10,13 +10,12 @@
# Check for git and a git repo.
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
- 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
+ # Do we have an annotated tag?
+ if atag=`git describe 2>/dev/null`; then
+ echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
+ # add -g${head}, if there is no usable tag
+ else
+ printf '%s%s' -g $head
fi
# Is this git on svn?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Resend] [PATCH] Fix scripts/setlocalversion with git
2009-04-07 15:44 ` [Resend] " Nico Schottelius
@ 2009-04-07 15:56 ` Jiri Kosina
2009-04-07 17:45 ` Sam Ravnborg
0 siblings, 1 reply; 9+ messages in thread
From: Jiri Kosina @ 2009-04-07 15:56 UTC (permalink / raw)
To: Nico Schottelius; +Cc: LKML, trivial, Sam Ravnborg
On Tue, 7 Apr 2009, Nico Schottelius wrote:
> Hello again!
>
> I just saw that this patch did not go anywhere and did not have
> any replies, so I repost it.
>
> I also created a git-repo at
>
> git://git.schottelius.org/linux/linux-2.6
> gitweb:
> http://git.schottelius.org/?p=linux/linux-2.6;a=summary
>
> if you want the patch (f43ba0be1204e7c26cc700a75bdb688a788fbf2f)
> via git.
>
> Sincerly,
>
> Nico
>
> Nico Schottelius [Mon, Mar 30, 2009 at 02:21:37PM +0200]:
> > Hello!
> >
> > When using trees like wireless-testing, which have untagged tags,
> > scripts/setlocalversion does not display any git indication for
> > localversion.
> >
> > This patch fixes it: If git is available, but no usable tag is found,
> > it uses -g${head}. It skips the detection of unanottated tags via
> > git name-rev.
> >
> > Please apply, otherwise testers like me always have '2.6.29' for trees
> > with unanottated tags, instead of 2.6.29-20318-g9aa4755, which helps
> > a lot if you've tons of kernels installed from different trees.
This patch isn't trivial enough to be applicable through trivial tree.
Adding Sam to CC.
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Resend] [PATCH] Fix scripts/setlocalversion with git
2009-04-07 15:56 ` Jiri Kosina
@ 2009-04-07 17:45 ` Sam Ravnborg
2009-04-17 21:34 ` Nico Schottelius
0 siblings, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2009-04-07 17:45 UTC (permalink / raw)
To: Jiri Kosina; +Cc: Nico Schottelius, LKML, trivial
On Tue, Apr 07, 2009 at 05:56:31PM +0200, Jiri Kosina wrote:
> On Tue, 7 Apr 2009, Nico Schottelius wrote:
>
> > Hello again!
> >
> > I just saw that this patch did not go anywhere and did not have
> > any replies, so I repost it.
> >
> > I also created a git-repo at
> >
> > git://git.schottelius.org/linux/linux-2.6
> > gitweb:
> > http://git.schottelius.org/?p=linux/linux-2.6;a=summary
> >
> > if you want the patch (f43ba0be1204e7c26cc700a75bdb688a788fbf2f)
> > via git.
> >
> > Sincerly,
> >
> > Nico
> >
> > Nico Schottelius [Mon, Mar 30, 2009 at 02:21:37PM +0200]:
> > > Hello!
> > >
> > > When using trees like wireless-testing, which have untagged tags,
> > > scripts/setlocalversion does not display any git indication for
> > > localversion.
> > >
> > > This patch fixes it: If git is available, but no usable tag is found,
> > > it uses -g${head}. It skips the detection of unanottated tags via
> > > git name-rev.
> > >
> > > Please apply, otherwise testers like me always have '2.6.29' for trees
> > > with unanottated tags, instead of 2.6.29-20318-g9aa4755, which helps
> > > a lot if you've tons of kernels installed from different trees.
>
> This patch isn't trivial enough to be applicable through trivial tree.
> Adding Sam to CC.
Thanks. Will take care later this week.
Sam
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Resend] [PATCH] Fix scripts/setlocalversion with git
2009-04-07 17:45 ` Sam Ravnborg
@ 2009-04-17 21:34 ` Nico Schottelius
2009-04-17 21:58 ` Sam Ravnborg
0 siblings, 1 reply; 9+ messages in thread
From: Nico Schottelius @ 2009-04-17 21:34 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Jiri Kosina, Nico Schottelius, LKML, trivial
[-- Attachment #1: Type: text/plain, Size: 736 bytes --]
Hey Sam,
Sam Ravnborg [Tue, Apr 07, 2009 at 07:45:50PM +0200]:
> On Tue, Apr 07, 2009 at 05:56:31PM +0200, Jiri Kosina wrote:
> > On Tue, 7 Apr 2009, Nico Schottelius wrote:
> >
> > > git://git.schottelius.org/linux/linux-2.6
> > >
> > > if you want the patch (f43ba0be1204e7c26cc700a75bdb688a788fbf2f)
> > > via git.
> >
> > This patch isn't trivial enough to be applicable through trivial tree.
> > Adding Sam to CC.
>
> Thanks. Will take care later this week.
had some time to look at it / some comments?
Sincerly,
Nico
--
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/
PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Resend] [PATCH] Fix scripts/setlocalversion with git
2009-04-17 21:34 ` Nico Schottelius
@ 2009-04-17 21:58 ` Sam Ravnborg
2009-04-18 9:16 ` Nico Schottelius
0 siblings, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2009-04-17 21:58 UTC (permalink / raw)
To: Nico Schottelius, Jiri Kosina, LKML, trivial
On Fri, Apr 17, 2009 at 11:34:36PM +0200, Nico Schottelius wrote:
> Hey Sam,
>
> Sam Ravnborg [Tue, Apr 07, 2009 at 07:45:50PM +0200]:
> > On Tue, Apr 07, 2009 at 05:56:31PM +0200, Jiri Kosina wrote:
> > > On Tue, 7 Apr 2009, Nico Schottelius wrote:
> > >
> > > > git://git.schottelius.org/linux/linux-2.6
> > > >
> > > > if you want the patch (f43ba0be1204e7c26cc700a75bdb688a788fbf2f)
> > > > via git.
> > >
> > > This patch isn't trivial enough to be applicable through trivial tree.
> > > Adding Sam to CC.
> >
> > Thanks. Will take care later this week.
>
> had some time to look at it / some comments?
I thought I already applied a similar fix.
Care to resend.
Thanks,
Sam
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Resend] [PATCH] Fix scripts/setlocalversion with git
2009-04-17 21:58 ` Sam Ravnborg
@ 2009-04-18 9:16 ` Nico Schottelius
2009-04-25 7:50 ` Sam Ravnborg
0 siblings, 1 reply; 9+ messages in thread
From: Nico Schottelius @ 2009-04-18 9:16 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Nico Schottelius, Jiri Kosina, LKML, trivial
[-- Attachment #1.1: Type: text/plain, Size: 501 bytes --]
Sam Ravnborg [Fri, Apr 17, 2009 at 11:58:02PM +0200]:
> I thought I already applied a similar fix.
> Care to resend.
- git: git://git.schottelius.org/foreign/linux-2.6 (URL changed!):
f43ba0be1204e7c26cc700a75bdb688a788fbf2fcommit
- Original patch attached (p1)
- Diff against your tree attached (p2)
Nico
--
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/
PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C
[-- Attachment #1.2: p1 --]
[-- Type: text/plain, Size: 1451 bytes --]
commit f43ba0be1204e7c26cc700a75bdb688a788fbf2f
Author: Nico Schottelius <nico@ikn.schottelius.org>
Date: Tue Apr 7 17:27:18 2009 +0200
[PATCH] Fix scripts/setlocalversion with git
When using trees like wireless-testing, which have untagged tags,
scripts/setlocalversion does not display any git indication for
localversion.
This patch fixes it: If git is available, but no usable tag is found,
it uses -g${head}. It skips the detection of unanottated tags via
git name-rev.
Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index f6946cf..296669a 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -10,13 +10,12 @@ cd "${1:-.}" || usage
# Check for git and a git repo.
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
- 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
+ # Do we have an annotated tag?
+ if atag=`git describe 2>/dev/null`; then
+ echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
+ # add -g${head}, if there is no usable tag
+ else
+ printf '%s%s' -g $head
fi
# Is this git on svn?
[-- Attachment #1.3: p2 --]
[-- Type: text/plain, Size: 1042 bytes --]
--- kbuild-fixes/scripts/setlocalversion 2009-04-18 09:44:18.142135489 +0200
+++ linux-2.6/scripts/setlocalversion 2009-04-07 17:37:33.131483677 +0200
@@ -10,18 +10,17 @@
# Check for git and a git repo.
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
- 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
+ # Do we have an annotated tag?
+ if atag=`git describe 2>/dev/null`; then
+ echo "$atag" | awk -F- '{printf("-%05d-%s", $(NF-1),$(NF))}'
+ # add -g${head}, if there is no usable tag
+ else
+ printf '%s%s' -g $head
fi
# Is this git on svn?
if git config --get svn-remote.svn.url >/dev/null; then
- printf -- '-svn%s' "`git svn find-rev $head`"
+ printf -- '-svn%s' "`git-svn find-rev $head`"
fi
# Are there uncommitted changes?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [Resend] [PATCH] Fix scripts/setlocalversion with git
2009-04-18 9:16 ` Nico Schottelius
@ 2009-04-25 7:50 ` Sam Ravnborg
2009-04-25 12:24 ` Nico Schottelius
0 siblings, 1 reply; 9+ messages in thread
From: Sam Ravnborg @ 2009-04-25 7:50 UTC (permalink / raw)
To: Nico Schottelius, Jiri Kosina, LKML, trivial
On Sat, Apr 18, 2009 at 11:16:53AM +0200, Nico Schottelius wrote:
> Sam Ravnborg [Fri, Apr 17, 2009 at 11:58:02PM +0200]:
> > I thought I already applied a similar fix.
> > Care to resend.
>
> - git: git://git.schottelius.org/foreign/linux-2.6 (URL changed!):
> f43ba0be1204e7c26cc700a75bdb688a788fbf2fcommit
> - Original patch attached (p1)
> - Diff against your tree attached (p2)
>
> Nico
Applied p2 - had to do so manually.
Sam
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Resend] [PATCH] Fix scripts/setlocalversion with git
2009-04-25 7:50 ` Sam Ravnborg
@ 2009-04-25 12:24 ` Nico Schottelius
0 siblings, 0 replies; 9+ messages in thread
From: Nico Schottelius @ 2009-04-25 12:24 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Nico Schottelius, Jiri Kosina, LKML, trivial
[-- Attachment #1: Type: text/plain, Size: 551 bytes --]
Sam Ravnborg [Sat, Apr 25, 2009 at 09:50:19AM +0200]:
> On Sat, Apr 18, 2009 at 11:16:53AM +0200, Nico Schottelius wrote:
> > Sam Ravnborg [Fri, Apr 17, 2009 at 11:58:02PM +0200]:
> > - Diff against your tree attached (p2)
>
> Applied p2 - had to do so manually.
Thanks! This makes life much easier for testers like me :-)
Enjod the sunny saturday!
Nico
--
Think about Free and Open Source Software (FOSS).
http://nico.schottelius.org/documentations/foss/the-term-foss/
PGP: BFE4 C736 ABE5 406F 8F42 F7CF B8BE F92A 9885 188C
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-04-25 12:25 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-30 12:21 [PATCH] Fix scripts/setlocalversion with git Nico Schottelius
2009-04-07 15:44 ` [Resend] " Nico Schottelius
2009-04-07 15:56 ` Jiri Kosina
2009-04-07 17:45 ` Sam Ravnborg
2009-04-17 21:34 ` Nico Schottelius
2009-04-17 21:58 ` Sam Ravnborg
2009-04-18 9:16 ` Nico Schottelius
2009-04-25 7:50 ` Sam Ravnborg
2009-04-25 12:24 ` Nico Schottelius
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.