Created attachment 207976 [details] Fix git-lite RUN_DEPENDS We don't need directly install git-lite, the port will also work fine with git, so we can check if there is the binary git, if not, we then can install git-lite.
This doesn't fix it: [dan@empty:~] $ pkg info -x git git-2.23.0 [dan@empty:~] $ sudo pkg install -y py36-iocage-devel [dan@empty:~] $ pkg info -x git git-2.23.0 py36-GitPython-2.1.11 py36-gitdb2-2.0.6
(In reply to Dan Langille from comment #1) Sorry, wrong pasting, let me try this again.
(In reply to Dan Langille from comment #2) [dan@empty:~] $ pkg info -x git iocage git-2.23.0 pkg: No package(s) matching iocage [dan@empty:~] $ [dan@empty:~] $ sudo pkg install -y py36-iocage-devel-1.0.0.20190810_2,1 [dan@empty:~] $ pkg info -x git iocage git-lite-2.23.0 py36-GitPython-2.1.11 py36-gitdb2-2.0.6 py36-iocage-devel-1.0.0.20190810_2,1 [dan@empty:~] $
This doesn't work if the package is build with poudriere. Because it is build in a clean environment there is no git binary detected and it always depends on git-lite. If you have other ports depending on devel/git you get conflicts when installing these packages. Here an example with iocage and portshaker: # pkg install portshaker-1.0.18 Updating buildhost repository catalogue... buildhost repository is up to date. All repositories are up to date. Checking integrity... done (1 conflicting) - git-2.23.0 conflicts with git-lite-2.23.0 on /usr/local/bin/git Checking integrity... done (0 conflicting) The following 4 package(s) will be affected (of 0 checked): Installed packages to be REMOVED: git-lite-2.23.0 py36-iocage-1.2_2 New packages to be INSTALLED: portshaker: 1.0.18 git: 2.23.0
Are you saying this will only help systems which contains packages not build with poudirere?
(In reply to Dan Langille from comment #5) I will try English this time. Are you saying the proposed change will only help on systems if they have packages not built with poudriere? If so, perhaps we should provide a compile time option for git/git-lite.
I don't see how it can work. Each package is build in its own environment with only the dependencies added that are defined by the port. So this will always install git-lite and use it as a dependency for the created package.
Created attachment 208096 [details] a patch to add ability to choose git providing package in options
(In reply to burnerbox from comment #8) Thank you for your patch. I see two things: 1 - it bumps PORTVERSION. There is no iocage 1.3 yet - I think you meant to bump PORTREVSION 2 - your patch is for iocage, whereas we are talking about iocage-devel here. - did you mean that?
(In reply to Dan Langille from comment #9) Sorry. 1 The PORTVERSION bump is a typo, your guess is correct. 2 The patch is for iocage, not iocage-devel, the problem there is the same. Will provide patch for iocage-devel in a minute.
Created attachment 208101 [details] patch for iocage-devel adding options radio-button switching dependency from git to git-lite
I am new to FreeBSD and OSS collaboration in general, so please excuse and guide me if i posted the patch wrongly formated or made any other procedural mistakes. Spent an evening trying to solve this properly. And by that i mean there surely must be a way to make the package depend on a "capability". Like an existence of a file or availability of an executable. Not sure if these two examples cover all the cases, but you can do that in ports. It took me a while to get so desperate with debugging why this doesn't work with pkg that i resorted to gutting the package created by my poudriere instance. And there I found that YAML describing the package just doesn't have that info. O-ok... Maybe I don't understand something and this is made on purpose. Abstractions and all that hip stuff. Then there should be a way to list packages that will suffice, right? Nah, sleepless night turns morning, porters handbook, scarce documentation of pkg(suspiciously smelling of 2010, ma-aybe 2014) and mailing list searching(if anyone has any guide or directions on how to do this effectively, i will very appreciate it) turned up some mentions of "variable dependencies" as some promised land in the future and some poor sods from 2016 with sasl samba dilemma(https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=215642). So the answer is no. Pkg behaves differently from ports, live with it. Are my findings correct or am i missing something?
Seems to me you got it down right. Ports/pkgs are depending on other ports/packages, not files which these provide. So you cannot depend on e.g. the git binary but you have to choose the port that provides this dependency at build time. I'm no ports expert myself but what might work is if the git-lite port was just a flavour of the git port instead of a slave port. Then one could depend just on devel/git and let the user select the flavour in their poudriere make.conf file. As said this is untested and just an idea, maybe asking on the ports mailing list might bring a solution.
(In reply to Sascha Holzleiter from comment #13) Thanks guys for the patch, I'm in holidays!!! I'm testing the patch proposed and I think that is the right direction, I'm still on vacation anyway. I'm gonna try to open a review just for other folks chime in and give their opinion. Thanks again folks. @dvl if you don't mind, I will take over this PR. Best Regards,
I'm taking over this PR! I'm testing the proposed patch on sysutils/iocage.
(In reply to burnerbox from comment #12) burnerbox - you did very well.
(In reply to Marcelo Araujo from comment #14) Sure, please proceed.
A commit references this bug: Author: araujo Date: Mon Oct 21 06:24:49 UTC 2019 New revision: 515084 URL: https://svnweb.freebsd.org/changeset/ports/515084 Log: - Fix git/git-lite dependencies as well as leftover EGG files. - Now the port pass "poudriere testport". - Bump PORTREVISION. PR: 240959 (based on) Submitted by: burnerbox <burnerbox_protonmail.com> Sascha Holzleiter <sascha_root-login.org> Reported by: many Reviewed by: romain Differential Revision: https://reviews.freebsd.org/D21929 Changes: head/sysutils/iocage/Makefile
A commit references this bug: Author: araujo Date: Mon Oct 21 07:13:24 UTC 2019 New revision: 515086 URL: https://svnweb.freebsd.org/changeset/ports/515086 Log: - Fix git/git-lite dependencies. - Fix "poudriere testport". - Pet portlint. - Bump PORTREVISION. PR: 240959 (based on) Submitted by: burnerbox <burnerbox_protonmail.com> Sascha Holzleiter <sascha_root-login.org> Approved by: dvl (maintainer) Changes: head/sysutils/iocage-devel/Makefile
Thank you all!!!!