DragonFly BSD
DragonFly users List (threaded) for 2012-01
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: kernel version in git repo

From: YONETANI Tomokazu <y0n3t4n1@xxxxxxxxx>
Date: Thu, 26 Jan 2012 01:47:09 +0900

On Tue, Jan 24, 2012 at 05:20:44PM -0500, Pierre Abbat wrote:
> I have a bug report (starting X causes reboot) in which I gave a date but not 
> an exact version, and I've been asked to check out the latest code and see if 
> it fixes an unrelated bug (make -j2 buildkernel). What git command can I use 
> before checking out so that you can reproduce the first bug?

The output from `uname -a' contains a prefix of the commit hash
of the source code from which the kernel was built

  $ uname -a
  DragonFly X335 2.13-DEVELOPMENT DragonFly v2.13.0.929.g2a1f9-DEVELOPMENT #0: Mon Jan 16 18:02:19 JST 2012     root@X335:/usr/obj/build/usr/src/sys/SMP  i386

The string `2a1f9' after `g' before `-DEVELOPMENT' is the one you need.
If you need the `uname -a' output from the older kernel, try this:

  $ strings /boot/kernel.old/kernel |tail -n4
  DragonFly v2.13.0.796.g4090d-DEVELOPMENT #0: Wed Jan  4 22:59:22 JST 2012

You can use this string to checkout the previous version:
  $ cd /usr/src
  $ git checkout 2a1f9
  Note: checking out '2a1f9'.
  (and long message here mentioning you're not on a particular branch
   and an instruction on how to create a new branch)

You can go back to the original branch, say, `master', by
  $ git checkout master

Finally, Git remembers what you did to your repository for you for a while,
so you don't even have to remember what version you have now before updating
to the latest:
  $ git reflog
  e27434d HEAD@{0}: checkout: moving from 2a1f96b998a7a95f220d7a527c2f0a7b9e42be3a to master
  2a1f96b HEAD@{1}: checkout: moving from master to 2a1f9
  e27434d HEAD@{2}: pull: Fast-forward
  2a1f96b HEAD@{3}: pull: Fast-forward
  4090d6f HEAD@{4}: pull: Fast-forward
  e820d19 HEAD@{5}: pull: Fast-forward

[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]