Skip to content
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

make install breaks when repo is checked out with git #7

Open
hrehfeld opened this issue Jan 6, 2025 · 4 comments
Open

make install breaks when repo is checked out with git #7

hrehfeld opened this issue Jan 6, 2025 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@hrehfeld
Copy link

hrehfeld commented Jan 6, 2025

$ make check-deps
jj-fzf 0.24.0
Error: There is no jj repo in "."
Hint: It looks like this is a git repo. You can create a jj repo backed by it by running this:
jj git init --colocate
jj-fzf: **ERROR**: /home/hrehfeld/projects/arch-packages/jj-fzf/src/jj-fzf: not a JJ repository
make: *** [Makefile:14: check-deps] Error 127

check-deps seems to be required by install

This sucks, because e.g. an archlinux PKGBUILD relies on using git.

@hrehfeld
Copy link
Author

hrehfeld commented Jan 6, 2025

@tim-janik
Copy link
Owner

https://aur.archlinux.org/packages/jj-fzf

Please correct me if I am wrong, but doesn't this lack a dependency on jj?
https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=jj-fzf

I guess we could get make install to work on a pur .git repo, but having the jj executable around is a hard dependency.

@hrehfeld
Copy link
Author

hrehfeld commented Jan 6, 2025

Thanks! Fixed the dependencies.

And sorry, it was a little late yesterday:

  • jj was in path while testing make check-deps.

  • the culprit is ofc that jj-fzf --help fails if .jj hasn't been initialized. jj --help works fine tho, so I think jj-fzf should mirror that behavior?

I can work around that by initializing jj during PKGBUILD 🤷

However, if I do that and then just make install with the $pkgdir:

install -c -t "/home/hrehfeld/projects/arch-packages/jj-fzf/pkg/jj-fzf/bin" jj-fzf
install: failed to access '/home/hrehfeld/projects/arch-packages/jj-fzf/pkg/jj-fzf/usr/bin': No such file or directory

I guess if you provide a make install, then it should also make sure the target dir exists (and permissions etc):

How about this?

install: check-deps
	mkdir -p "$(bindir)"
	$(INSTALL) -t "$(bindir)" jj-fzf

Sorry for the hassle and thanks for the help/support ;-)

@tim-janik
Copy link
Owner

Thanks! Fixed the dependencies.

And sorry, it was a little late yesterday:

* `jj` was in path  while testing make check-deps.

* the culprit is ofc that `jj-fzf --help` fails if `.jj` hasn't been initialized. `jj --help` works fine tho, so I think jj-fzf should mirror that behavior?

Yes, but it's a bit involved which is why I haven't gotten around to it yet.

How about this?

install: check-deps
	mkdir -p "$(bindir)"
	$(INSTALL) -t "$(bindir)" jj-fzf

Using install should take care of that, can you try recent trunk or v0.25.0 that had some Makefile fixes?

@tim-janik tim-janik self-assigned this Jan 24, 2025
@tim-janik tim-janik added the bug Something isn't working label Jan 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants