Created attachment 245250 [details] Fix to let vim depend on xxd Commit de841b40d24d22ab51ad05ed632e025903fbb41f added xxd as a standalone tool. Which was a nice idea to allow other tools to only depend on xxd. However, having two packages shipping xxd led to some funny situations: Imagine you use a tool, which depends on the "lightweight" sysutils/xxd. Now, you install vim. What happens is pkg will suggest you uninstall your other tool because its xxd dependency conflicts with your editor choice. The easiest solution is to let vim depend on sysutils/xxd. The only downside is you now have two packages installed instead of one.
The behavior you described is pkg working as intended. They are two conceptually distinct things——-if you install vim, you don’t need the standalone repackaging of xxd. Plus, editors/vim and sysutils/xxd are built from the same source, but they are potentially configured differently. Do we gain anything from this other than avoiding the CONFLICT message between vim and xxd?
(In reply to Adam Weinberger from comment #1) What you gain is that if you have a port that needs xxd as a runtime dep (we don't have one in the official tree but have one in ours at work) you avoid a lot of problems.
Good Morning all. I am the mantainer of sysutils/xxd. For me the best solution should be to have vim* considers xxd as external dependency because in this way I can install vim port and continue to follow and manage my xxd port. Now I cant. But this is a personal need and it is not mandatory for the community. If you think it is usefull to make things easier we can use the same options to compile sysutils/xxd like xxd shipped with vim* if the mantainer think this is the main problem now. Please let me know.
You've all brought up some interesting use-cases that I hadn't thought of. I see a couple options here: 1) Leave it as-is 2) Wait for subpackages (either way, when subpackages drops, that'll probably be the route we should switch to at that time) 3) Turn xxd into a hard-dep (this PR) 4) Turn xxd into an OPTION dep 5) Separate them entirely and have vim not install or depend on xxd at all At this point, I'm leaning towards (4), and going to (2) once subpackages drops. What are your thoughts on that? My primary hesitation is that the xxd port was intended to be a way to install xxd when you don't need vim, not the ONLY way to install xxd. I guess what I'm unclear on is whether a sizeable proportion of the user base wants this solved, or whether it's just the people on this PR.
(In reply to Adam Weinberger from comment #4) > At this point, I'm leaning towards (4), and going to (2) once subpackages drops. What are your thoughts on that? I think that's best for now, even if the option is default we can always turn it off at work, that will avoid us to carry patches in our tree. > My primary hesitation is that the xxd port was intended to be a way to install xxd when you don't need vim, not the ONLY way to install xxd. I guess what I'm unclear on is whether a sizeable proportion of the user base wants this solved, or whether it's just the people on this PR. Yes it's hard to know, I personally almost always install vim just for xxd as I'm an emacs user but like xxd. It's a bit weird to have two package shipping the same thing (not something named the same but actually the same binary) though.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=9d1c9b818dbbe0274bdaf58321eec49766339470 commit 9d1c9b818dbbe0274bdaf58321eec49766339470 Author: Adam Weinberger <adamw@FreeBSD.org> AuthorDate: 2023-10-03 02:03:43 +0000 Commit: Adam Weinberger <adamw@FreeBSD.org> CommitDate: 2023-10-03 02:14:31 +0000 editors/vim: Add XXD option Rather than conflicting with xxd (which presents a dependency problem for users who don't want to install vim), add an option to depend on xxd. So, the vim port will no longer install xxd, but the option is on by default so most users won't see a difference (other than the new dependency). PR: 274104 Reported by: corvink editors/vim/Makefile | 13 +++++++------ editors/vim/pkg-plist | 14 -------------- sysutils/xxd/Makefile | 2 -- 3 files changed, 7 insertions(+), 22 deletions(-)
OK, this is done. The xxd port will need to be updated, though, as it no longer makes sense for vim to install the xxd manpage (including the translated versions).
This change has caused some problems for other ports that depended at xxd being part of the Vim port. Please take a look at bug #274229 report and patches suggested there.