From 61e9761224d55349f84d37333c150aa2fb6b67cb Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Mon, 11 Apr 2016 14:35:27 -0500 Subject: [PATCH] Add explanation of nonzero epoch requirement to pkg.installed state documentation Resolves #31927. --- salt/states/pkg.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/salt/states/pkg.py b/salt/states/pkg.py index c47d3c231b..8cfbc350c8 100644 --- a/salt/states/pkg.py +++ b/salt/states/pkg.py @@ -613,9 +613,22 @@ def installed( .. code-block:: bash - # salt myminion pkg.latest_version httpd + # salt myminion pkg.latest_version vim-enhanced myminion: - 2.2.15-30.el6.centos + 2:7.4.160-1.el7 + + .. important:: + As of version 2015.8.7, for distros which use yum/dnf, packages + which have a version with a nonzero epoch (that is, versions which + start with a number followed by a colon like in the example above) + must have the epoch included when specifying the version number. + For example: + + .. code-block:: yaml + + vim-enhanced: + pkg.installed: + - version: 2:7.4.160-1.el7 Also, while this function is not yet implemented for all pkg frontends, :mod:`pkg.list_repo_pkgs ` will