basherpm / basher

A package manager for shell scripts.
https://www.basher.it/
MIT License
1.16k stars 74 forks source link

[Feature Request] Support and maintain patches for popular repos #87

Closed cornfeedhobo closed 3 years ago

cornfeedhobo commented 4 years ago

After installing pyenv I found that it doesn't load the built-in plugin python-build properly. I've submitted a PR upstream, but since I know they can take a long time, it got me thinking about how pyenv itself manages patches for python-build; why not do something similar.

juanibiapina commented 3 years ago

Because it's super complicated. I'd rather not go that direction.

cornfeedhobo commented 3 years ago

@juanibiapina what do you think about pre/post hooks instead? it'd offer broader support and doesn't require you making patch specific logic.

juanibiapina commented 3 years ago

How would that work for patches?

cornfeedhobo commented 3 years ago

@juanibiapina I don't envision anyone managing patches in a central way, just simply making it easy for someone to hack locally if the need arises. e.g. when I was working on pyenv, I could have made my a script for my development team to patch after install until my PR was merged upstream.

juanibiapina commented 3 years ago

In that case you could also install from your fork, right ? Both are manual work.

cornfeedhobo commented 3 years ago

@juanibiapina yes, I worked around it, but that is very far from the point and maintaining a fork implies a lot more overhead that you are trivializing as compared to maintaining a set of patches that always must be applied for certain software. You are essentially saying that because there is some manual work, users might as well take on a herculean task as well. That's silly - why even write basher at all when we could all be cloning??

I'm sorry, I don't really have an interest trying to explain and justify a very common software pattern. Hooks are useful. I hope you come around on this issue at some point.

juanibiapina commented 3 years ago

Let me try to explain it better with a question. Where would you put the code that gets executed in the hook (to fetch and apply the patch, for instance) ?