-
Notifications
You must be signed in to change notification settings - Fork 42
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
Create symlinks with absolute path names #3
Comments
Interesting idea. Why do you think it would be more efficient? |
Dear aspiers, Several days before, I've discussed the similar issue as posted in this thread. Now, I give a concrete example as follows: When using systemd, we may create some customized service unit files, say, I've create the following service unit file just for testing: If I want to use stow to maintain this customized service unit file and put it in the non-standard locations which systemd cann't searches in its path, I must link this file to appropriate location so that systemd can recognize this service. On the other hand, systemd in itself can only support the absolute path symlinks for such case. You can see the systemd will create the following absolute symlinks for this service file: werner@debian-01:~/test-systemd$ systemctl --user enable ~/test-systemd/test-systemd.service So, if using stow to maintain this type of file and create the relative symlinks to the target locations, systemd won't work on this service file. Regards |
@aspiers Would you consider adding the option to create absolute symlinks? It's the only feature that's in xstow that I miss with GNU stow. The reason/usecase for me is that I run a lot of development tools in a (Docker) container. |
Yes sure, I'm all for extending Stow in ways that people find useful (regardless of whether I personally find it useful!), as long as it doesn't create any serious technical debt or issues with existing use cases (and I don't expect it would in this case). I'm incredibly busy at the moment, so this short note is mainly an apology that I can't look at this more closely right now. I tend to process my Stow backlog in batches, ideally every 3-6 months or so (Donald Knuth style) but less often in practice - and the next one is sorely overdue. But if there is a pull request to review at that point which adds this then I'd happily review, otherwise if it looks quick and easy to fix myself then maybe I can do it but no promises! |
An other use-case is maintaining a |
I've finally thought about this some more, and need some more info from the people requesting it:
I'm definitely open to Stow being extended to support these use cases, but it's a non-trivial piece of work, so I first want to make absolutely (pun intended) sure that the feature is justified and makes sense. Thanks in advance! |
Yes you got it right. I need this to manage my git hooks centrally and not on a per repo basis. For what I understand the systemd used case submitted by @hongyi-zhao can already be acheived. I'm currently successfully using stow to manage user services under
|
Thanks a lot for the quick reply @bricewge! I'm not sure I'm any closer to understanding why the feature requested in this issue is needed though: @bricewge commented on June 28, 2019 3:25 PM:
Sorry, maybe I'm being stupid but I still don't get it. What is the issue exactly, and how do they work around it?
What's stopping you doing that right now?
Right, so why is there a need for Stow to be enhanced to support this further? |
I apologize, I wasn't clear enough it only doesn't works when using
My workaround is a stupid script that get executed after stow because I'm using wrapper to run it.
There is no need for it for using |
Ohhhh I see, so you want the pre-commit hooks to symlink to hook files defined under a Stow package, and since |
So far this (git template directories) is the only use case which makes sense to me, but if anyone else can suggest others I'd love to hear them. |
My pull request #68 fixes this, adding a -a/--absolute option for both stowing and unstowing. |
This would be great to have - any chance #68 could get some attention in the near future? Stow has solved all of my issues with dotfiles management so far except for this use-case. |
A merge bot complains about code coverage having decreased, but I don't know how to fix it in Perl |
Thanks a lot @someonewithpc! I will definitely take a look at this, hopefully soon. I have a big backlog of Stow maintenance which I've been meaning to attend to for a long time already. The code coverage decreasing is not Perl-specific, it just means you haven't added tests for the new functionality - please take a look at |
Can we have an option to create symlinks with absolute path? When your stow dir is not in the default location which is /usr/local/stow, I think it's more efficient to use absolute path in the target path when creating symlinks
$ cd /opt/stow/jvm
$ stow -v1 -n -t /usr/local jre1.8.0_05
...
LINK: bin/java => ../../../opt/stow/jvm/jre1.8.0_05/bin/java
EDIT: Clarification from @aspiers:
They're all separate issues despite appearing similar on the surface.
The text was updated successfully, but these errors were encountered: