Coder Social home page Coder Social logo

Comments (1)

z1atk0 avatar z1atk0 commented on August 19, 2024 1

Hi!

Strangely enough, I only experienced this issue starting with 2.4.0. Up to & including 2.3.1, both stowing and unstowing of absolute symlinks has never been a problem before (and I've been using stow since the early 1.3.x days, almost as long as I've been using Linux itself), despite the comment in https://github.com/aspiers/stow/blob/master/lib/Stow.pm.in#L503 (which I never knew about, as it just worked as expected all those years 🤷‍♂️).

I have not unrolled the whole history of this issue yet, but I don't understand what would actually be the problem with stowing and unstowing an absolute symlink. As far as I understand, unstowing means the deletion of relative symlinks. What difference does it make where this relative symlink is pointing to (I understand of course the difference between pointing to a directory vs. pointing to a file with regards to folding/unfolding, but why is it any different depending on what file type the symlink points to?

To break it down, manually doing ...

ln -s ../stow/some_package/bin/actual_file /usr/local/bin/actual_file
ln -s ../stow/some_package/share/doc/package/absolute_symlink_to_somewhere /usr/local/share/doc/package/absolute_symlink_to_somewhere
ln -s ../stow/some_package/dev/package_device_node /usr/local/dev/package_device_node
ln -s ../stow/some/package/var/run/package_socket /usr/local/var/run/package_socket

... would work just fine, as would ...

rm /usr/local/bin/actual_file
rm /usr/local/share/doc/package/absolute_symlink_to_somewhere
rm /usr/local/dev/package_device_node
rm /usr/local/var/run/package_socket

... to remove the symlinks again, without breaking anything. So what is the reason for the strange special-casing of absolute symlinks? Does it have to do with stow's complex folding/unfolding logic (which I admittedly didn't consider at all here 😇)? Are there some tricky non-obvious corner cases that I'm missing here?

And, if this change in behaviour from 2.3.1 to 2.4.0 was intentional, could you please point me to the commit that is responsible for it, so that I can keep a local diff around to revert it back to the old behaviour? 🤓

Thanks for listening! 🙂

from stow.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.