Commit graph

5 commits

Author SHA1 Message Date
Mathieu Arnold
bd94d2c38d 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
},
}

Submitted by:	bapt
Reviewed by:	bapt, mat
Differential Revision:	https://reviews.freebsd.org/D19310
2019-06-03 12:57:44 +00:00
Mathieu Arnold
bf064c8390 SC2006: Use $(..) instead of legacy ...
Backtick command substitution `STATEMENT` is legacy syntax with several
issues.

 - It has a series of undefined behaviors related to quoting in POSIX.
 - It imposes a custom escaping mode with surprising results.
 - It's exceptionally hard to nest.

$(STATEMENT) command substitution has none of these problems, and is
therefore strongly encouraged.

PR:		227109
Submitted by:	mat
Sponsored by:	Absolight
2018-06-01 16:20:54 +00:00
Bryan Drewery
6120a2f751 Exec less rm(1) for existing files.
Reported by:	mjg
Approved by:	portmgr (implicit)
2017-07-28 20:30:44 +00:00
Mathieu Arnold
b79eed7e66 Add a PKGMESSAGES variable that allows the framework to have more than
one PKGMESSAGE file.

This allows the framework to add messages to ports, without touching
their PKGMESSAGE file.

Sponsored by:	Absolight
2016-08-03 12:45:30 +00:00
Mathieu Arnold
5f1b1ae084 Extract create-manifest.
PR:		210198
Submitted by:	mat
Exp-run by:	antoine
Sponsored by:	The FreeBSD Foundation, Absolight
Differential Revision:	https://reviews.freebsd.org/D6779
2016-06-19 11:25:39 +00:00