Added ability to specify compatibility in hotfix

This commit is contained in:
2016-12-02 15:23:03 +01:00
parent b5d3754b2f
commit 34f53c0e75
5 changed files with 115 additions and 1 deletions

29
docs/EXPRESSIONS.md Normal file
View File

@ -0,0 +1,29 @@
Matching Expressions
====================
Hotfixes can provide a `for` key with an array of supported systems. The
expressions are evaluated using Symfony's ExpressionLanguage and as such
can handle some pretty complex stuff.
For a hotfix to be considered supported, at least one of the expressions
must evaluate to true.
## Example:
for:
- lsb.id=='raspbian'
- lsb.id=='ubuntu' and lsb.release=>'16.04'
## System facts
### Distribution
Information is retrieved using `lsb_release` or the `/etc/os-release` file.
lsb.id Distribution ID (ex. ubuntu or raspbian)
lsb.description Pretty description
lsb.release Version number (ex. 16.04 or 8)
lsb.codename Release codename (ex. xenial, not always present)