Page MenuHomeFreeBSD

Use UCL for pkg-message
ClosedPublic

Authored by bapt on Feb 23 2019, 6:06 PM.
Tags
None
Referenced Files
F81560573: D19310.id.diff
Thu, Apr 18, 2:15 AM
Unknown Object (File)
Sun, Mar 31, 7:38 PM
Unknown Object (File)
Dec 20 2023, 8:27 AM
Unknown Object (File)
Nov 22 2023, 7:07 AM
Unknown Object (File)
Nov 14 2023, 6:16 PM
Unknown Object (File)
Nov 9 2023, 2:14 PM
Unknown Object (File)
Nov 7 2023, 4:10 PM
Unknown Object (File)
Oct 8 2023, 1:04 PM
Subscribers

Details

Reviewers
None
Group Reviewers
portmgr
Commits
rP503385: Use UCL for pkg-message
Summary

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
},
}

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 22677
Build 21778: arc lint + arc unit

Event Timeline

  • Remove now useless newlines.
  • This too should be ucl.
  • The file is never empty now, but with no messages, it is ok.
  • Don't use echo flags.
  • Put the deprecation date message with the deprecation message.

pkg 1.11 being out I think we can probably commit that one?

This revision was not accepted when it landed; it landed in state Needs Review.Jun 3 2019, 12:58 PM
Closed by commit rP503385: Use UCL for pkg-message (authored by mat). · Explain Why
This revision was automatically updated to reflect the committed changes.