Hi, One of our clients have a desperate need to have both composer-1 and composer-2 installed on the same system. Primarily due to some of their more legacy systems still requiring composer-1 to deploy. Looking at the installed files I'd say this should be possible, if /usr/share/composer becomes /usr/share/composer-X (where X is the SLOT number, 1 or 2 in this case), then there is no file conflicts other than the symlink at /usr/bin/composer (which I'm guessing we can manage using eselect). Happy to cook a few patches if this is something which makes sense (I can use eselect-php as base of eselect-composer I'm guessing, and this could then install the required symbolic links, can even have /usr/share/composer as a symlink to the selected main version). Does this make sense? Am I missing something obvious? (keeping in mind what I know of composer is dangerous to say the least) Reproducible: Always
I don't think that this will happen. The problem is that PHP deps will be installed in /usr/share/php -- unversioned. Once >=composer-2.x will depend on the same dep but newer version than composer-1.x you will be in trouble. I haven't reviewed your PR yet but I am very sure that this is already the case, we just weren't in need yet to add an upper limit because 1.x is overshadowed and wasn't removed yet. So I would recommend that you make 1.x available via phar version but I really don't see slotted PHP applications happen in Gentoo. Not sure what other project members are thinking about this.
Hi Thomas, I was waiting to see if others replied before responding. Would still welcome additional input. As it stands (prior to the introduction of the eselect-composer component) I managed to install three different versions of composer, one from each of the SLOTS (0,1,2), and they were all operational. Since introducing eselect-composer there is a conflict from eselect-composer on composer:0 (/usr/bin/composer ...), and composer:1 and composer:2 depends on eselect-composer (which I'm not 100% sure is a requirement but it does make sense for me), and this is no longer possible, but :1 and :2 lives together conveniently. I know there is a report (https://bugs.gentoo.org/795957) about dependencies, but I've not been able to reproduce that specific issue (as per my comment there). Based on that though, I do get where you're coming from, and I do agree that there are risks. phar is even a potential workaround. But then you could argue that other than the base php interpreter all applications should be phars or otherwise managed by the system administrator. So I get that we may bump into problems in future - and I'd be happy to assist with those when they happen, or even at that point say, ok, this is no longer viable. For now I believe that there is a simple, workable solution which has already been shown to work. I would also like to point out that there are already a fair amount of PHP stuff that's SLOT'ed (phpmyadmin, mediawiki ... pretty much all web applications). Looking to understand your reasoning further, and understand the rule(s) that's being applied to decide when to slot, and when not to. Kind Regards, Jaco
Whissi (Thomas) have indicated that this won't be fixed. Closing accordingly.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1dee9e868060492e4e35e374a0cc95a255b10004 commit 1dee9e868060492e4e35e374a0cc95a255b10004 Author: Jaco Kroon <jaco@uls.co.za> AuthorDate: 2021-10-01 14:14:28 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-10-15 10:22:41 +0000 dev-php/composer: v1 dep on dev-php/semver constraints fix. Whilst we all want old software to "just go away", this is one that is required to be kept around for a while longer. Closes: https://bugs.gentoo.org/795957 Bug: https://bugs.gentoo.org/813045 I'll apply same to SLOT PR. Package-Manager: Portage-3.0.20, Repoman-3.0.3 Signed-off-by: Jaco Kroon <jaco@uls.co.za> Closes: https://github.com/gentoo/gentoo/pull/22458 Signed-off-by: Joonas Niilola <juippis@gentoo.org> .../composer/{composer-1.10.22.ebuild => composer-1.10.22-r1.ebuild} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)