Merge branch '2015.5' into '2015.8'

No conflicts.
This commit is contained in:
rallytime 2016-05-19 18:18:10 -06:00
commit 5aec32b20f
2 changed files with 17 additions and 9 deletions

View file

@ -780,11 +780,15 @@ Minion Module Management
Default: ``[]`` (all modules are enabled by default)
The event may occur in which the administrator desires that a minion should not
be able to execute a certain module. The sys module is built into the minion
be able to execute a certain module. The ``sys`` module is built into the minion
and cannot be disabled.
This setting can also tune the minion, as all modules are loaded into ram
disabling modules will lower the minion's ram footprint.
This setting can also tune the minion. Because all modules are loaded into system
memory, disabling modules will lover the minion's memory footprint.
Modules should be specified according to their file name on the system and not by
their virtual name. For example, to disable ``cmd``, use the string ``cmdmod`` which
corresponds to ``salt.modules.cmdmod``.
.. code-block:: yaml

View file

@ -174,12 +174,16 @@ def _check_pkg_version_format(pkg):
ret['version_spec'] = []
else:
ret['result'] = True
ret['prefix'] = re.sub('[^A-Za-z0-9.]+', '-', install_req.name)
if hasattr(install_req, "specifier"):
specifier = install_req.specifier
else:
specifier = install_req.req.specifier
ret['version_spec'] = [(spec.operator, spec.version) for spec in specifier]
try:
ret['prefix'] = install_req.req.project_name
ret['version_spec'] = install_req.req.specs
except Exception:
ret['prefix'] = re.sub('[^A-Za-z0-9.]+', '-', install_req.name)
if hasattr(install_req, "specifier"):
specifier = install_req.specifier
else:
specifier = install_req.req.specifier
ret['version_spec'] = [(spec.operator, spec.version) for spec in specifier]
return ret