bugManeage - Bugs: bug #60376, metastore is not installed by...


You are not allowed to post comments on this tracker with your current authentication level.

bug #60376: metastore is not installed by default

Submitted by:  Boud Roukema <boud>
Submitted on:  Sun 11 Apr 2021 09:17:33 PM UTC  
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Sun 11 Apr 2021 09:31:13 PM UTC, comment #1: 

Just to clarify:

The bug at 1106 is that the shell is in the temporary build directory, not the top directory where .git/ is typically located.
So if [ -d .git ]; yields false - the directory .git doesn't exist in the temporary build directory.

Boud Roukema <boud>
Project Member
Sun 11 Apr 2021 09:17:33 PM UTC, original submission:  

BUG: In commit 20b6273 of maneage (and many earlier versions), the claim in README-hacking.md that metastore hooks are automatically installed in .git/hooks/ appears to be incorrect from practical experience (in several different maneage installs), and the code in basic.mk appears to explain this.

In commit 20b6273, reproduce/software/make/basic.mk has

  1094          current_dir=$$(pwd); \
  1095          $(call gbuild, metastore-$(metastore-version), static,, \
  1105          if [ -f $(ibdir)/metastore ]; then
  1106            if [ -d .git ]; then
  1107              user=$$(whoami)
  1108              group=$$(groups | awk '{print $$1}')
  1109              cd $$current_dir
  1110              for f in pre-commit post-checkout; do
  1111                 sed -e's|@USER[@]|'$$user'|g' \
  1112                     -e's|@GROUP[@]|'$$group'|g' \
  1113                     -e's|@BINDIR[@]|$(ibdir)|g' \
  1114                     -e's|@TOP_PROJECT_DIR[@]|'$$current_dir'|g' \
  1115                     reproduce/software/shell/git-$$f > .git/hooks/$$f
  1116                 chmod +x .git/hooks/$$f
  1117              done
  1118            fi
  1119            echo "Metastore (forked) $(metastore-version)" > $@

Since  basic.mk is run from the top directory, current_dir , and since gbuild changes to a temporary build directory, it seems likely that at line 1106, the shell is in the temporary build directory, not in .git/ .

This would cause a failure to install the two hooks, but no warning message is provided to the user.

SUGGESTED FIX (not tested):

Either shift cd $$current_dir upwards, to be located between lines 1105 and 1106, or modify README-hacking.md to state that installation of metastore hooks is opt-in, not opt-out.

See the related discussion at https://savannah.nongnu.org/task/index.php?15942 about a replacement for metastore. Users of metastore who find that it has problems might consider the opt-in installation of the hooks to be a feature instead of a bug.

Boud Roukema <boud>
Project Member


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by boud (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    No changes have been made to this item

    Back to the top

    Powered by Savane 3.7