Skip to content

Git fatal message while in out of source build #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ziva777 opened this issue Feb 11, 2021 · 5 comments
Closed

Git fatal message while in out of source build #32

ziva777 opened this issue Feb 11, 2021 · 5 comments

Comments

@ziva777
Copy link

ziva777 commented Feb 11, 2021

While in out of source build I got:
$ make clean -sj fatal: not a git repository (or any of the parent directories): .git
which is annoying.

@keremet
Copy link
Contributor

keremet commented Mar 31, 2022

@ziva777 Could you describe in more detail how to reproduce the error? I can't reproduce it.

[keremet@host-128 pg_wait_sampling]$ make -sj USE_PGXS=1 PG_CONFIG=/home/keremet/compile/postgrespro_bin/bin/pg_config clean
[keremet@host-128 pg_wait_sampling]$ make -s USE_PGXS=1 PG_CONFIG=/home/keremet/compile/postgrespro_bin/bin/pg_config clean
[keremet@host-128 pg_wait_sampling]$ make USE_PGXS=1 PG_CONFIG=/home/keremet/compile/postgrespro_bin/bin/pg_config clean
rm -f pg_wait_sampling.so   libpg_wait_sampling.a  libpg_wait_sampling.pc
rm -f pg_wait_sampling--1.1.sql
rm -f pg_wait_sampling.o collector.o compat.o pg_wait_sampling.bc collector.bc compat.bc
rm -rf pg_wait_sampling--1.1.sql
rm -rf results/ regression.diffs regression.out tmp_check/ tmp_check_iso/ log/ output_iso/
[keremet@host-128 pg_wait_sampling]$

@rjuju
Copy link
Contributor

rjuju commented Mar 31, 2022

You can reproduce it easily downlading a tarball rather than cloning the repository. It comes from https://github.com/postgrespro/pg_wait_sampling/blob/master/Makefile#L31

DISTVERSION := $(shell git tag -l | tail -n 1 | cut -d 'v' -f 2)

which is evaluated even if you're not using the "package" target. I guess you could move the zip file generation in the package rules rather than dependency? The zip file generation is very fast so it's not really a problem if you overwrite it.

@keremet
Copy link
Contributor

keremet commented Apr 1, 2022

I have created PR #44. @rjuju, do I understand your suggestion correctly?

@rjuju
Copy link
Contributor

rjuju commented Apr 1, 2022

@keremet yes, although it's possible to avoid the extra git execution entirely even if with your version it doesn't output any message anymore, as I mentioned in the review.

@keremet
Copy link
Contributor

keremet commented Apr 1, 2022

f4a87c5

@keremet keremet closed this as completed Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants