review fixes

This commit is contained in:
Andrey Abramov 2019-06-25 17:01:57 +03:00
parent e57b8c5e85
commit 93cee391de
2 changed files with 8 additions and 17 deletions

View File

@ -1,23 +1,10 @@
# TODO: eselect -> prune
{% set arch_conf = salt['pillar.get']('arch_conf', False) %}
{% set binutils_version = salt['pillar.get']('binutils:version', '2.31.1-r4') %}
{% set binutils_target = arch_conf['CHOST'] + '-' + binutils_version.split('-')[0] %}
{% import 'pkg/common' as pkg %}
sys-devel/binutils:
pkg.installed:
- pkgs:
- sys-devel/binutils: "{{ binutils_version }}[cxx,multitarget]"
- sys-devel/binutils-config: ">=5-r4"
- {{ pkg.gen_atom('sys-devel/binutils') }}
eselect-binutils:
eselect.set:
- name: binutils
- target: {{ binutils_target }}
- require:
- pkg: sys-devel/binutils
'emerge -q --prune sys-devel/binutils':
cmd.run:
- name: 'eselect binutils set {{ binutils_target }}'
- onfail:
- eselect: eselect-binutils
- require:
- onchanges:
- pkg: sys-devel/binutils

View File

@ -1,5 +1,9 @@
#!pyobjects
# -*- mode: python -*-
# To require this state in your state:
# - require:
# - cmd: gentoo:portage:packages
# (yes, cmd!)
from salt.ext import six
import re