top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration
Print Preview

Getting the latest available Linux-kernel version (v3.x.y-stable or v3.x.y-rcX)?

0 votes
55 views

for my Linux-kernel build-script I am searching for a reliable check of getting the latest version.
This could be 'v3.x.y-stable' or 'v3.x.y-rcX'.

'git tag' seems to be fast, but not reliable.
'git log --oneline' is slow, but does the job.

For getting v3.x.y-stable this seems to work...

$ git tag | grep ^'v3.[0-9]*' | grep -v '-rc' | sort --version-sort
v3.0
v3.1
v3.2
v3.3
v3.4
v3.5
v3.6
v3.7
v3.8
v3.9
v3.10

...but not when listing v3.x.y-rcX, too:

$ git tag | grep ^'v3.[0-9]*' | sort --version-sort | grep ^'v3.10'
v3.10
v3.10-rc1
v3.10-rc2
v3.10-rc3
v3.10-rc4
v3.10-rc5
v3.10-rc6
v3.10-rc7

I know that v3.10 > v3.10-rcX, but not 'git tag' or 'sort --version-sort' :-). This seems from my poor sed/awk/grep skills to be the most reliable method...

$ time git log --oneline v3.0-rc1.. | grep 'Linux 3.' | awk '{ print
$3 }' | grep ^'3.[0-9]*' | head -1
3.10

real 0m10.024s
user 0m5.611s
sys 0m4.857s

...but is slow (even I take v3.0-rc1 as the 1st version-tag of Linux-v3.x series).

Any improvements?

posted Jul 2, 2013 by anonymous

Share this question
Facebook Share Button Twitter Share Button Google+ Share Button LinkedIn Share Button Multiple Social Share Button

1 Answer

0 votes

$ git describe HEAD
If you want a sorted list of tags,
$ git for-each-ref --sort=taggerdate --format="%(refname:short)" refs/tags

Are you looking for something else?

answer Jul 2, 2013 by anonymous
Similar Questions
+3 votes

Is there a particular reason or is it that it's just not bothered being built that often that new versions of Git is released?

How can I build new versions of Git myself?

+1 vote

git clone https://git.kernel.org/cgit/git/git.git
Cloning into 'git'...
error: Unable to get pack index https://git.kernel.org/cgit/git/git.git/objects/pack/pack-1e2bca8b5127039cff42b1cd3d47767fb577cd4f.idx
error: Unable to get pack file https://git.kernel.org/cgit/git/git.git/objects/pack/pack-6bfd3af75af71d7bf66a80d6374ac09245ad3ce5.pack
The requested URL returned error: 404 Not found
error: Unable to find bce6db96a333c2d47b07580c5a9207cf10935378 under https://git.kernel.org/cgit/git/git.git
Cannot obtain needed blob bce6db96a333c2d47b07580c5a9207cf10935378
while processing commit 5addd1c7531cc644787cd562a3c22a3b714c7d77.
error: Fetch failed.

any clue


Useful Links with Similar Problem
Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...