mirror of
https://github.com/valitydev/salt-common.git
synced 2024-11-06 10:25:23 +00:00
Rename use argument in pkg.installed to uses
This commit is contained in:
parent
002e4477de
commit
4b171aee7f
@ -493,13 +493,13 @@ def process_target(param, version_num):
|
||||
if '[' in target:
|
||||
# Clean target from use flags, since some of them may not exist.
|
||||
# This will raise an AttributeError, or some weird stack trace if portage_config is not patched.
|
||||
uses = portage.dep.dep_getusedeps(atom)
|
||||
pv_target = target[:target.rfind('[')]
|
||||
use = target[target.rfind('['):]
|
||||
if installed:
|
||||
old = __salt__['portage_config.get_flags_from_package_conf']('use', pv_target)
|
||||
else:
|
||||
old = []
|
||||
__salt__['portage_config.append_use_flags'](target)
|
||||
__salt__['portage_config.append_use_flags'](pv_target, uses)
|
||||
new = __salt__['portage_config.get_flags_from_package_conf']('use', pv_target)
|
||||
if old != new:
|
||||
changes[pv_target] = {'old': {'use': old},
|
||||
|
@ -4,4 +4,4 @@
|
||||
app-crypt/mit-krb5:
|
||||
pkg.installed:
|
||||
- version: "{{ krb5_version }}"
|
||||
- use: {{ krb5_use }}
|
||||
- uses: {{ krb5_use }}
|
||||
|
@ -4,4 +4,4 @@
|
||||
net-libs/libtirpc:
|
||||
pkg.installed:
|
||||
- version: "{{ libtirpc_version }}"
|
||||
- use: {{ libtirpc_use }}
|
||||
- uses: {{ libtirpc_use }}
|
||||
|
@ -6,6 +6,6 @@ include:
|
||||
net-nds/rpcbind:
|
||||
pkg.installed:
|
||||
- version: "{{ rpcbind_version }}"
|
||||
- use: {{ rpcbind_use }}
|
||||
- uses: {{ rpcbind_use }}
|
||||
- require:
|
||||
- pkg: net-libs/libtirpc
|
||||
|
@ -1,5 +1,6 @@
|
||||
{% set utils_version = salt['pillar.get']('nfs:utils:version', '>=2.3.1') %}
|
||||
{% set utils_use = salt['pillar.get']('nfs:utils:use', ['caps','kerberos','nfsv4','nfsv41','-tcpd']) %}
|
||||
{% set utils_use_str = '[' + ']' %}
|
||||
include:
|
||||
- nds.rpcbind
|
||||
{% if 'kerberos' in utils_use %}
|
||||
@ -9,7 +10,7 @@ include:
|
||||
net-fs/nfs-utils:
|
||||
pkg.installed:
|
||||
- version: "{{ utils_version }}"
|
||||
- use: {{ utils_use }}
|
||||
- uses: {{ utils_use }}
|
||||
- require:
|
||||
- pkg: net-libs/libtirpc
|
||||
- pkg: net-nds/rpcbind
|
||||
|
Loading…
Reference in New Issue
Block a user