root icon indicating copy to clipboard operation
root copied to clipboard

gitinfo.txt not updated in incremental build

Open ferdymercury opened this issue 3 years ago • 1 comments

Describe the bug

I recently built ROOT from source. Then I grabbed 10 more commits git pull that were pushed during the last hours, and rebuilt in a couple of minutes as only a few things were changed.

When I call root -b, the SHA version it points at is still the one before git pull.

Expected behavior

etc/gitinfo.txt should contain the latest git pull, not the one before, even if nothing in the 'core' was changed inbetween.

To Reproduce

  • Build
  • Pull a couple of new commits
  • Rebuild
  • Open etc/gitinfo.txt to check

Setup

   ------------------------------------------------------------------
  | Welcome to ROOT 6.27/01                        https://root.cern |
  | (c) 1995-2022, The ROOT Team; conception: R. Brun, F. Rademakers |
  | Built for linuxx8664gcc on Aug 30 2022, 13:52:01                 |
  | From heads/master@v6-25-01-4921-gdfd0f52391                      |
  | With c++ (Ubuntu 8.4.0-1ubuntu1~18.04) 8.4.0                     |
  | Try '.help'/'.?', '.demo', '.license', '.credits', '.quit'/'.q'  |
   ------------------------------------------------------------------

ferdymercury avatar Aug 30 '22 14:08 ferdymercury

That's intentional: we don't want to rebuild libCore because the git hash changes.

The only way out would be to have TROOT::GetGitCommit() read a text file rather than rebuilding anything. I'll leave this open; this sounds like a useful improvement!

Axel-Naumann avatar Sep 06 '22 15:09 Axel-Naumann

My reasoning is bogus :-) Updating a text file obviously doesn't trigger a rebuild. We should just update gitinfo.txt any time we build.

Axel-Naumann avatar Sep 20 '23 12:09 Axel-Naumann

Should be fixed in master and 6.30. Can you confirm?

Axel-Naumann avatar Nov 27 '23 08:11 Axel-Naumann

Confirmed, thanks a lot !!

ferdymercury avatar Nov 27 '23 09:11 ferdymercury