test fixes

This commit is contained in:
Andrey Abramov 2019-06-11 20:59:17 +03:00
parent 3eb0edfd75
commit c6d3f250c1
2 changed files with 13 additions and 2 deletions

12
sls/pkg/install.sls Normal file
View File

@ -0,0 +1,12 @@
#!jinja|pyobjects
# -*- mode: python -*-
#from salt://pkg/common.sls import process_target
packages_root = "gentoo:portage:packages"
package_params = pillar(packages_root + ":{{ package_name }}")
version = package_params.get('version', None)
pkgs = {"{{ package_name }}": version} if version else ["{{ package_name }}"]
portage_config_params = { k: v for k: v in package_params.items() if k in ('use', 'mask', 'accept_keywords') }
PortageConfig.flags("{{ package_name }}", **portage_config_params)
Pkg.installed("{{ package_name }}", pkgs=pkgs, watch=PortageConfig("{{ package_name }}"))

View File

@ -1,8 +1,7 @@
{% set package_name = 'app-admin/salt' %}
{% include 'pkg/install.sls.tpl' %}
include:
- python.python2
- pkg.install
# TODO: move cython to another state
cython: