From nobody Mon Sep 6 13:33:29 2021 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1DDAA179DA7F for ; Mon, 6 Sep 2021 13:33:40 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from echo.brtsvcs.net (echo.brtsvcs.net [208.111.40.118]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4H38Vr021mz3FYC; Mon, 6 Sep 2021 13:33:39 +0000 (UTC) (envelope-from list_freebsd@bluerosetech.com) Received: from chombo.houseloki.net (unknown [IPv6:2602:41:642b:600::6]) by echo.brtsvcs.net (Postfix) with ESMTPS id 3E1AF38D89; Mon, 6 Sep 2021 13:33:33 +0000 (UTC) Received: from [IPv6:2602:41:642b:630:41d5:e8d1:d896:2e26] (unknown [IPv6:2602:41:642b:630:41d5:e8d1:d896:2e26]) by chombo.houseloki.net (Postfix) with ESMTPSA id 9ADED9D73; Mon, 6 Sep 2021 06:33:30 -0700 (PDT) Subject: Re: Why no flavor_USES helper? To: Baptiste Daroussin Cc: freebsd-ports@freebsd.org References: <8982e300-8b04-f31a-9c49-43d0dd428b38@bluerosetech.com> <20210906081612.rxo2os7dvx5mkvz6@aniel.nours.eu> From: Mel Pilgrim Message-ID: <1f0f9a6c-09a6-86f9-625f-e9e482dc0e83@bluerosetech.com> Date: Mon, 6 Sep 2021 06:33:29 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 In-Reply-To: <20210906081612.rxo2os7dvx5mkvz6@aniel.nours.eu> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4H38Vr021mz3FYC X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-Spam: Yes X-ThisMailContainsUnwantedMimeParts: N On 2021-09-06 1:16, Baptiste Daroussin wrote: > On Sun, Sep 05, 2021 at 10:39:29AM -0700, Mel Pilgrim wrote: >> The flavors helpers like flavor_RUN_DEPENDS are super useful, but I need to >> modify USES based on flavor, and find that there is no helper for it. > > Besause USES are loader 100 lines earlier, meaning only USES are already > processed when we expand the helper. > > Without getting to far in the technical details, USES and FLAVORS are basically > expanded at the moment, in pre and post section, meaning one had to decide > either we should allow USES to define flavors, or we should allow USES helpers. Is this why there odd race conditions between USES and FLAVORS where, for example, if I have a FLAVOR that does USES+=pgsql and WANT_PGSQL, the corresponding postgresqlN-* ports aren't added to *_DEPENDS?