From owner-svn-ports-all@freebsd.org  Tue Jun 18 12:46:07 2019
Return-Path: <owner-svn-ports-all@freebsd.org>
Delivered-To: svn-ports-all@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1CED015BA9C7;
 Tue, 18 Jun 2019 12:46:07 +0000 (UTC)
 (envelope-from tijl@freebsd.org)
Received: from mailrelay108.isp.belgacom.be (mailrelay108.isp.belgacom.be
 [195.238.20.135])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "relay.skynet.be",
 Issuer "GlobalSign Organization Validation CA - SHA256 - G2" (verified OK))
 by mx1.freebsd.org (Postfix) with ESMTPS id 454C272F77;
 Tue, 18 Jun 2019 12:46:06 +0000 (UTC)
 (envelope-from tijl@freebsd.org)
X-Belgacom-Dynamic: yes
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: =?us-ascii?q?A2BVAABx2whd/1H1sVtmHAEBAQQBAQc?=
 =?us-ascii?q?EAQGBUQcBAQsBgWEvWRFRASASFBSEFogcX4l8AQGCDDUBh2yCHo4kFIFnCQE?=
 =?us-ascii?q?BAgEBAQEBKwwBAYRAAoJQJDQJDgEDAQEFAQEBAQRtHAyFSwEFIzMjEAsOBgQ?=
 =?us-ascii?q?CAgUhAgIPSAYTgyOCDgupMoExhDIBCwGEX4EKBoEMKAGLdIF/hCM+hCwLDYM?=
 =?us-ascii?q?KglgEi2o0nUIJghKGSIx/J5c0hA2QNJE7OIFYTTAIO4JsixOFQT0DMI0nglA?=
 =?us-ascii?q?BAQ?=
X-IPAS-Result: =?us-ascii?q?A2BVAABx2whd/1H1sVtmHAEBAQQBAQcEAQGBUQcBAQsBg?=
 =?us-ascii?q?WEvWRFRASASFBSEFogcX4l8AQGCDDUBh2yCHo4kFIFnCQEBAgEBAQEBKwwBA?=
 =?us-ascii?q?YRAAoJQJDQJDgEDAQEFAQEBAQRtHAyFSwEFIzMjEAsOBgQCAgUhAgIPSAYTg?=
 =?us-ascii?q?yOCDgupMoExhDIBCwGEX4EKBoEMKAGLdIF/hCM+hCwLDYMKglgEi2o0nUIJg?=
 =?us-ascii?q?hKGSIx/J5c0hA2QNJE7OIFYTTAIO4JsixOFQT0DMI0nglABAQ?=
Received: from 81.245-177-91.adsl-dyn.isp.belgacom.be (HELO
 kalimero.tijl.coosemans.org) ([91.177.245.81])
 by relay.skynet.be with ESMTP; 18 Jun 2019 14:44:55 +0200
Received: from kalimero.tijl.coosemans.org (kalimero.tijl.coosemans.org
 [127.0.0.1])
 by kalimero.tijl.coosemans.org (8.15.2/8.15.2) with ESMTP id x5ICiskU065912;
 Tue, 18 Jun 2019 14:44:55 +0200 (CEST)
 (envelope-from tijl@FreeBSD.org)
Date: Tue, 18 Jun 2019 14:44:53 +0200
From: =?UTF-8?B?VMSzbA==?= Coosemans <tijl@FreeBSD.org>
To: Mathieu Arnold <mat@FreeBSD.org>
Cc: bapt@FreeBSD.org, ports-committers@freebsd.org, svn-ports-all@freebsd.org, 
 svn-ports-head@freebsd.org
Subject: Re: svn commit: r503385 - head/Mk/Scripts
Message-ID: <20190618144446.29662c8f@kalimero.tijl.coosemans.org>
In-Reply-To: <20190618110414.ngqcgv4gydfkmk6z@ogg.in.absolight.net>
References: <201906031257.x53Cvi9P092541@repo.freebsd.org>
 <20190615170158.489616a4@kalimero.tijl.coosemans.org>
 <20190618110414.ngqcgv4gydfkmk6z@ogg.in.absolight.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Rspamd-Queue-Id: 454C272F77
X-Spamd-Bar: ------
Authentication-Results: mx1.freebsd.org
X-Spamd-Result: default: False [-6.97 / 15.00];
 NEURAL_HAM_MEDIUM(-1.00)[-1.000,0];
 NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[];
 NEURAL_HAM_SHORT(-0.97)[-0.968,0]
X-BeenThere: svn-ports-all@freebsd.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: SVN commit messages for the ports tree <svn-ports-all.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/svn-ports-all>,
 <mailto:svn-ports-all-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/svn-ports-all/>
List-Post: <mailto:svn-ports-all@freebsd.org>
List-Help: <mailto:svn-ports-all-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/svn-ports-all>,
 <mailto:svn-ports-all-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 18 Jun 2019 12:46:07 -0000

On Tue, 18 Jun 2019 13:04:14 +0200 Mathieu Arnold <mat@FreeBSD.org>
wrote:
> On Sat, Jun 15, 2019 at 05:01:58PM +0200, T=C4=B3l Coosemans wrote:
>> On Mon, 3 Jun 2019 12:57:44 +0000 (UTC) Mathieu Arnold <mat@FreeBSD.org>
>> wrote:
>>> Author: mat
>>> Date: Mon Jun  3 12:57:44 2019
>>> New Revision: 503385
>>> URL: https://svnweb.freebsd.org/changeset/ports/503385
>>>=20
>>> Log:
>>>   Use UCL for pkg-message
>>>  =20
>>>   Remain backward compatible but use ucl for the pkg-messages, which al=
lows to:
>>>   - append messages one after the other
>>>   - only print message on delete, install, upgrade from a version to an=
other
>>>  =20
>>>   If pkg-message starts with a [ we consider it should be a valid ucl f=
ile
>>>  =20
>>>   The format is the following:
>>>   [
>>>   { message: "Always print" },
>>>   { message: "package being removed", type: remove },
>>>   { message: "package being installed", type: install },
>>>   { message: "package is being upgraded", type: upgrade },
>>>   { message: "Upgrading from lower than 1.0", maximum_version: "1.0", t=
ype: upgrade },
>>>   { message: "Upgrading from higher than 1.0", minimum_version: "1.0", =
type: upgrade  },
>>>   { message: "Upgrading from >1.0 < 3.0", maximum_version: "3.0", minim=
um_version: "1.0",
>>>   ]
>>>  =20
>>>   Because it is ucl one can use some sugar like:
>>>   [
>>>   { message =3D <<EOD
>>>   formatted
>>>   message 'with fancy things'
>>>   EOD
>>>   },
>>>   } =20
>>=20
>> Can this be extended to include these fields:
>> opsys: <operating system this message applies to>
>> osversion: <list of os version ranges this message applies to>
>> arch: <list of architectures this message applies to>
>> options: <list of options that need to be on or off> =20
>=20
> I am not sure adding more fields is a good idea.
> It should remain simple, otherwise there is a risk of the pkg-message
> syntax getting bloated, and it is bound to be misused, especially as the
> use case would be very rare.
> It would probably be better to add files to _PKGMESSAGES when the case
> you want to handle presents itself.

I agree with that actually, but I guess it depends on whether you see
pkg-message as the final version that goes into the package or whether
it's part of the ports tree and still needs to be processed before a
package is created.

What I'd like to see is that messages that apply to a certain
range of FreeBSD versions are clearly documented as such.  The Firefox
message contains something for FreeBSD < 11.3 but the problem has been
fixed already in stable/11.  It would also make it easier to remove the
messages when the FreeBSD versions go EoL.  Similarly for the options,
the firefox message contains something about a Gvfs/GIO option but there
is no such option.  It doesn't really matter to me whether this is done
in the Makefile or in pkg-message.  I'm all for putting everything
(except files/ maybe) in the Makefile (all those tiny files in the ports
tree significantly slow down subversion and other file system operations
like grep).