svn commit: r503385 - head/Mk/Scripts

Baptiste Daroussin bapt at FreeBSD.org
Tue Jun 18 12:53:27 UTC 2019


On Tue, Jun 18, 2019 at 02:44:53PM +0200, Tijl Coosemans wrote:
> On Tue, 18 Jun 2019 13:04:14 +0200 Mathieu Arnold <mat at FreeBSD.org>
> wrote:
> > On Sat, Jun 15, 2019 at 05:01:58PM +0200, Tijl Coosemans wrote:
> >> On Mon, 3 Jun 2019 12:57:44 +0000 (UTC) Mathieu Arnold <mat at FreeBSD.org>
> >> wrote:
> >>> Author: mat
> >>> Date: Mon Jun  3 12:57:44 2019
> >>> New Revision: 503385
> >>> URL: https://svnweb.freebsd.org/changeset/ports/503385
> >>> 
> >>> Log:
> >>>   Use UCL for pkg-message
> >>>   
> >>>   Remain backward compatible but use ucl for the pkg-messages, which allows to:
> >>>   - append messages one after the other
> >>>   - only print message on delete, install, upgrade from a version to another
> >>>   
> >>>   If pkg-message starts with a [ we consider it should be a valid ucl file
> >>>   
> >>>   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", type: 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", minimum_version: "1.0",
> >>>   ]
> >>>   
> >>>   Because it is ucl one can use some sugar like:
> >>>   [
> >>>   { message = <<EOD
> >>>   formatted
> >>>   message 'with fancy things'
> >>>   EOD
> >>>   },
> >>>   }  
> >> 
> >> 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>  
> > 
> > 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).

I made my thought

About the OS version this should be done at the framework level in the ports
tee:

This information does not need to be within the package, because packages are
built for a given version.

Same goes for the architecture (maybe with the exception of the noarch packages)

I don't think those specific build time information should remain within the
generated package.

That said, the way it has been done, in the framework so far should allow easily
to do what you do propose, because things are made so we can append messages to
existing pkg-messages. Meaning we can easily extend it. I will soon send patches
to review in that direction.

Best regards,
Bapt
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/svn-ports-all/attachments/20190618/3b0efccc/attachment.sig>


More information about the svn-ports-all mailing list