diff --git a/pillar/gentoo.sls b/pillar/gentoo.sls deleted file mode 100644 index a0f85dd..0000000 --- a/pillar/gentoo.sls +++ /dev/null @@ -1 +0,0 @@ -overlay: rbkmoney diff --git a/pillar/top.sls b/pillar/top.sls index b9e1980..3b5d9fd 100644 --- a/pillar/top.sls +++ b/pillar/top.sls @@ -1,5 +1,4 @@ {{ saltenv }}: salt-master.linode.rbkmoney.dev: - - gentoo - gentoo.makeconf.default - gentoo.arch.linode diff --git a/sls/gentoo/portage.sls b/sls/gentoo/portage.sls new file mode 100644 index 0000000..de3fede --- /dev/null +++ b/sls/gentoo/portage.sls @@ -0,0 +1,43 @@ +{% import 'pkg/common' as pkg %} +include: + - gentoo.portage.packages + - gentoo.repos.gentoo + - gentoo.repos.rbkmoney + +sys-apps/portage: + pkg.latest: + - reload_modules: True + - refresh: True + - pkgs: + - {{ pkg.gen_atom('sys-apps/portage') }} + - require: + - file: gentoo.portage.packages + # need all repos here since 'refresh' of pkg module is executed once per run + - file: /etc/portage/repos.conf/gentoo.conf + - file: /etc/portage/repos.conf/rbkmoney.conf + +app-portage-purged: + pkg.purged: + - pkgs: + - app-portage/epkg + +/etc/portage/repos.conf/: + file.directory: + - mode: 755 + - user: root + - group: root + +/etc/portage/profile/: + file.directory: + - create: True + - mode: 755 + - user: root + - group: root + +/etc/portage/env/: + file.directory: + - create: True + - mode: 755 + - user: root + - group: root + diff --git a/sls/gentoo/repos/gentoo.sls b/sls/gentoo/repos/gentoo.sls index f7e50da..6e848bb 100644 --- a/sls/gentoo/repos/gentoo.sls +++ b/sls/gentoo/repos/gentoo.sls @@ -8,6 +8,8 @@ include: - replace: False - user: root - mode: 644 + - require: + - file: /etc/portage/repos.conf ini.options_present: - require: - file: /etc/portage/repos.conf/gentoo.conf diff --git a/sls/gentoo/repos/rbkmoney.sls b/sls/gentoo/repos/rbkmoney.sls index 914605b..625d69f 100644 --- a/sls/gentoo/repos/rbkmoney.sls +++ b/sls/gentoo/repos/rbkmoney.sls @@ -23,6 +23,8 @@ include: - replace: False - user: root - mode: 644 + - require: + - file: /etc/portage/repos.conf ini.options_present: - require: - file: /etc/portage/repos.conf/{{ repo_name }}.conf @@ -33,10 +35,3 @@ include: sync-type: git clone-depth: 1 sync-uri: '{{ sync_uri }}' - -/etc/portage/repos.conf/{{ repo_name }}.conf-absent: - ini.options_absent: - - name: /etc/portage/repos.conf/{{ repo_name }}.conf - - sections: - {{ repo_name }}: - - sync-depth