From owner-freebsd-ports@freebsd.org Sat Dec 16 14:27:01 2017 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DEEEE83D67 for ; Sat, 16 Dec 2017 14:27:01 +0000 (UTC) (envelope-from se@freebsd.org) Received: from mailout08.t-online.de (mailout08.t-online.de [194.25.134.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailout00.t-online.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1AF2765C2E; Sat, 16 Dec 2017 14:27:00 +0000 (UTC) (envelope-from se@freebsd.org) Received: from fwd16.aul.t-online.de (fwd16.aul.t-online.de [172.20.26.243]) by mailout08.t-online.de (Postfix) with SMTP id D97DF41D3EF6; Sat, 16 Dec 2017 15:26:52 +0100 (CET) Received: from Stefans-MBP-2.fritz.box (rI6x7qZYghJVtj4Dm0JQgp9yJpJvIb5DQkkM+FPDV9Xr-ygFZcqMfIitJ3vcbofwbz@[84.154.97.124]) by fwd16.t-online.de with (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384 encrypted) esmtp id 1eQDQI-2JzZpI0; Sat, 16 Dec 2017 15:26:42 +0100 Subject: Re: Can we have multiple flavors for a port? To: Matthew Seaman , FreeBSD Ports ML References: <6ed4ac6e-a075-0fc0-a3da-371a46a9e977@FreeBSD.org> From: Stefan Esser Cc: FreeBSD Port-Manager Message-ID: <09760447-455d-5de0-36a9-c978d84cfb72@freebsd.org> Date: Sat, 16 Dec 2017 15:24:47 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <6ed4ac6e-a075-0fc0-a3da-371a46a9e977@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ID: rI6x7qZYghJVtj4Dm0JQgp9yJpJvIb5DQkkM+FPDV9Xr-ygFZcqMfIitJ3vcbofwbz X-TOI-MSGID: 9c07d865-04ef-4a45-a270-b6780e9aec28 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Dec 2017 14:27:01 -0000 Am 16.12.17 um 14:51 schrieb Matthew Seaman: > > I have a review up to add a USES=django -- > https://reviews.freebsd.org/D12592 which I'm now modifying to be FLAVORS > compatible given that has hit the tree. > > Now, we currently have ports for 4 different versions of django (1.8, > 1.10, 1.11, 2.0) and the obvious next move is to add django-based > flavouring. Currently, most django ports depend on django-1.8, with a > few depending on django-1.10, but this I think is mostly due to inertia > and django ports should be compatible with more recent versions. Having > four different versions of django in ports seems excessive -- so, for > the sake of argument I'd cut that down to just django-1.11 and django-2.0 > > But this is all python code, and the python flavouring would also apply... > > Given that django-2.0 requires python-3.5+ we end up with the following > combinations: > > py27 django111 > py36 django111 > py36 django20 > > and there's some 104 django ports which will mostly end up needing all > three of these variants built -- so as combinatorial explosions go, it's > not particularly earth-shattering. > > However, my questions are: > > - Is it possible or desirable to have multiple flavourings like this? > > - If so, what should the syntax look like for specifying a particular > combination? eg. www/py-django-mezzanine@py27+django111 ? I asked portmgr@ the same question when I started to work on portmaster and did not want to implement a solution that does only support a single flavor per port (or rather, waste time and effort on a portmaster version that only supported 1 flavor per port, when there were plans to support multiple flavors in the ports framework in the future). The answer I received was very clear: There can only be 1 flavor per port and there are no plans to remove that restriction. I questioned the wise-ness of that decision, but had better use for my time than to continue arguing, that multi-flavor support was probably going to be required very soon. My questions were specifically, how a dependency with multiple flavors should be specified (e.g. "@py36@xyz") and how to query a port for this case. The same notation should be used in the MOVED file in such a case. The order of flavors added to an origin must either be ignored by all tools operating on them (which precludes simple string comparisons to see whether one origin+flavors is identical to another one) or should be required to follow some (e.g.) lexical order. I'd also like to see the flavor(s) (if any) become part of the port origin (or some other variable in the PKG DB that can easily be queried). The value should be identical to the format in dependencies and the MOVED file to simplify tools like portmaster, which currently must execute a complex series of queries to get at that information. The origin@flavor does not encode the information previously contained in just the origin. IMHO, multi-flavor support should have been one of the initial considerations when designing the flavor extension to the ports system! Regards, STefan