(address . bug-guix@gnu.org)
Hi,
On a very fresh install of a system, I have just cloned the Guix
repository then run the dance ./bootstrap, ./configure and make. It
fails because:
Toggle snippet (8 lines)
cp: cannot create regular file '.git/hooks/pre-push': No such file or directory
make[2]: *** [Makefile:7454: .git/hooks/pre-push] Error 1
make[2]: Leaving directory '/home/simon/src/guix/guix'
make[1]: *** [Makefile:6137: all-recursive] Error 1
make[1]: Leaving directory '/home/simon/src/guix/guix'
make: *** [Makefile:4253: all] Error 2
In the file Makefile.am, nothing check that the directory .git/hooks
exists before copying to it. By default, it does not seem created. At
least, it was not with a fresh clone using Git from Guix revision
fc6bdaa.
I propose this patch attached.
Toggle diff (11 lines)
diff --git a/Makefile.am b/Makefile.am
index cbc3191dfc..6e9a22fae5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1170,6 +1170,7 @@ cuirass-jobs: $(GOBJECTS)
# Git auto-configuration.
.git/hooks/pre-push: etc/git/pre-push
$(AM_V_at)if test -d .git; then \
+ mkdir -p .git/hooks; \
cp etc/git/pre-push .git/hooks/pre-push; \
fi
Cheers,
simon