HomeFreeBSD

Use UCL for pkg-message

Description

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

Details

Provenance
matAuthored on
Reviewer
bapt
Differential Revision
D19310: Use UCL for pkg-message
Parents
rP503384: - Update to 0.9.6.10 [1]
Branches
Unknown
Tags
Unknown